No, the problem is in the grabbing code:
https://github.com/GNOME/gnome-shell/blob/2997e4950ba31747b5e3260c306456b0de413421/js/misc/keyboardManager.js#L37
https://github.com/GNOME/mutter/blob/49f029571cc425a878e520310a8db616fa5c4b70/src/core/keybindings.c#L1803
This grabs the keyboard.
>From https://www.x.org/wiki/Development/Documentation/GrabProcessing :
'There can only be one grab on a device ...'
See the xev output below, of me pressing META+SPACE to change layout:

FocusOut event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  70  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusOut event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyGrab, detail NotifyNonlinear

FocusIn event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

The issue is that it is losing grab, as the FocusOut event shows the
mode is notifyGrab. Or at least that is my interpretation. I don't know
why the grab and ungrab events are the wrong way round.

** Changed in: gnome-shell (Ubuntu)
     Assignee: (unassigned) => Penn Mackintosh (penn-mackintosh)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity-settings-daemon in Ubuntu.
https://bugs.launchpad.net/bugs/1244090

Title:
  Pressing any global keyboard shortcut causes temporary loss of focus

Status in GNOME Settings Daemon:
  Confirmed
Status in compiz package in Ubuntu:
  Confirmed
Status in gnome-settings-daemon package in Ubuntu:
  Triaged
Status in gnome-shell package in Ubuntu:
  Confirmed
Status in unity-settings-daemon package in Ubuntu:
  Triaged
Status in gnome-settings-daemon package in ALT Linux:
  Unknown
Status in gnome-shell package in Fedora:
  Confirmed
Status in gnome package in openSUSE:
  Unknown

Bug description:
  When pressing any global keyboard shourtcut (configurable via System
  settings -> Keyboard -> Shortcuts; i.e. for switching keyboard layout,
  volume up/down), focus temporary switches from active text input to
  something else, then restores back shortly. Maybe even active window
  loses focus, but window frame does not shows this (window header
  remains to look active).

  For example: when I press ctrl+shift here to switch keyboard layout,
  when writing this description, yellow frame disappears from text input
  box, text caret disappears too; they appear again when releasing
  ctrl+shift. The same occurs in all other programs, i.e. terminal.

  It causes serious annoyance, for example in Twitter when losing focus
  in Reply text box, reply rolls up and I have to click it again with
  mouse and set caret to correct place each time I switch keyboard
  layouts.

  Other key combinations, not only ctrl+shift, also cause this.

  It is especially annoying when using keyboard layout switch shortcut
  handled by the same subsystem (media-keys plugin):

          case SWITCH_INPUT_SOURCE_KEY:
          case SWITCH_INPUT_SOURCE_BACKWARD_KEY:
                  do_switch_input_source_action (manager, type);
                  break;

  (Original gnome-settings-daemon, from which unity-settings-daemon was
  forked, does not use media-keys plugin to switch keyboard layout).

  ----------
  For other layout switching problems introduced in Ubuntu 13.10 you can see 
bug 1218322.
  ----------

  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: gnome-session 3.9.90-0ubuntu3
  ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
  Uname: Linux 3.11.0-12-generic x86_64
  ApportVersion: 2.12.5-0ubuntu2
  Architecture: amd64
  Date: Thu Oct 24 11:42:19 2013
  InstallationDate: Installed on 2013-10-23 (0 days ago)
  InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 
(20131016.1)
  MarkForUpload: True
  PackageArchitecture: all
  SourcePackage: gnome-session
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-settings-daemon/+bug/1244090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to