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 536581 - Handle consumed shift state
Handle consumed shift state
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2008-06-04 11:38 UTC by Bastien Nocera
Modified: 2008-06-13 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Handle shift being needed for the consumption. (2.50 KB, patch)
2008-06-04 11:38 UTC, Bastien Nocera
reviewed Details | Review

Description Bastien Nocera 2008-06-04 11:38:19 UTC
Currently, if a keybinding uses the Shift modifier, but it would be consumed by resolving the keysym, we need to remove it from the consumed modifiers, otherwise the matching would fail.

The test case is using "Alt+Shift+>" as a shortcut for one of the builtin keybindings.
Comment 1 Bastien Nocera 2008-06-04 11:38:48 UTC
Created attachment 112116 [details] [review]
Handle shift being needed for the consumption.
Comment 2 Jens Granseuer 2008-06-04 17:47:57 UTC
+			consumed = ~consumed & GDK_SHIFT_MASK;

Did you mean consumed &= ~GDK_SHIFT_MASK?

Also, can we please not use g_print? I'd prefer not adding all that debug dump stuff in the first place.
Comment 3 Bastien Nocera 2008-06-04 17:50:58 UTC
(In reply to comment #2)
> +                       consumed = ~consumed & GDK_SHIFT_MASK;
> 
> Did you mean consumed &= ~GDK_SHIFT_MASK?

That should work too.

> Also, can we please not use g_print? I'd prefer not adding all that debug dump
> stuff in the first place.

It's not called anywhere by default, and it's useful for debugging.
Comment 4 Jens Granseuer 2008-06-04 18:10:59 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > +                       consumed = ~consumed & GDK_SHIFT_MASK;
> > 
> > Did you mean consumed &= ~GDK_SHIFT_MASK?
> 
> That should work too.

It's a fundamentally different result, though...

> > Also, can we please not use g_print? I'd prefer not adding all that debug dump
> > stuff in the first place.
> 
> It's not called anywhere by default, and it's useful for debugging.

g_debug is even better for debugging, and I dislike debugging functions appearing in "public" api.
Comment 5 Jens Granseuer 2008-06-13 16:46:23 UTC
Committed the fix.