Discovered that loss of focus is caused by GrabAccelerator dbus method,
handled by compiz. Gnome/unity-settings-daemon does not make focus go
away by itself. You can try following script:

#!/usr/bin/python
import dbus
bus = dbus.SessionBus()
o = bus.get_object('org.gnome.Shell', '/org/gnome/Shell')
code = o.GrabAccelerator('1', 0, dbus_interface='org.gnome.Shell')
try:
  raw_input("Grab set to key '1', press Enter to continue and ungrab")
finally:
  print o.UngrabAccelerator(code, dbus_interface='org.gnome.Shell')

It sets grab to '1' key, then pressing '1' causes the same effects of
losing focus (blink of cursor in terminal; cancel of rename in Nautilus,
etc).

I didn't remove unity-settings-daemon from this bug because maybe it
uses this dbus method for wrong purpose (maybe it's not suited for
binding keys for switching keyboard).

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-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:
  New
Status in Unity Settings Daemon:
  New
Status in “gnome-settings-daemon” package in Ubuntu:
  Triaged
Status in “unity-settings-daemon” package in Ubuntu:
  Triaged
Status in “gnome-settings-daemon” package in ALT Linux:
  Unknown
Status in “gnome-settings-daemon” package in Fedora:
  Unknown
Status in “gnome-settings-daemon” package in openSUSE:
  Confirmed

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     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to