After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672011 - AppMenuButton: Check input mode only on application focus changes
AppMenuButton: Check input mode only on application focus changes
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-13 18:34 UTC by Rui Matos
Modified: 2012-03-17 00:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AppMenuButton: Check input mode only on application focus changes (2.67 KB, patch)
2012-03-13 18:34 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2012-03-13 18:34:43 UTC
Bailing out of _sync() early if the application lost keyboard focus to
the shell can only be done on actual application focus changes. In
particular, doing this check on a switch to an empty workspace while
the keyboard focus is already on the shell prevents the AppMenuButton
from being hidden as it should.
Comment 1 Rui Matos 2012-03-13 18:34:46 UTC
Created attachment 209636 [details] [review]
AppMenuButton: Check input mode only on application focus changes
Comment 2 Florian Müllner 2012-03-16 16:35:54 UTC
Review of attachment 209636 [details] [review]:

Looks good.

::: js/ui/panel.js
@@ +301,3 @@
         let tracker = Shell.WindowTracker.get_default();
         let appSys = Shell.AppSystem.get_default();
+        tracker.connect('notify::focus-app', Lang.bind(this, this._maybeSync));

Now that we have a dedicated signal handler, should we call it _focusAppChanged or something? The code wasn't that obvious to me before I read the commit message, I suspect with the different name it'll be a bit more obvious.
Comment 3 Rui Matos 2012-03-17 00:15:45 UTC
Pushed with a renamed handler. Thanks

Attachment 209636 [details] pushed as 985f28b - AppMenuButton: Check input mode only on application focus changes