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 634994 - Explicitly declare internal reserved bits in GdkModifierType
Explicitly declare internal reserved bits in GdkModifierType
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 597292
 
 
Reported: 2010-11-16 16:07 UTC by Colin Walters
Modified: 2011-05-16 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Explicitly declare internal reserved bits in GdkModifierType (2.73 KB, patch)
2010-11-16 16:07 UTC, Colin Walters
none Details | Review

Description Colin Walters 2010-11-16 16:07:19 UTC
XKB and GDK both add "internal" bits to GdkModifierType.  In C,
this typically doesn't cause problems as bitfields are just integers,
and there's no validation.  However for bindings, it's normal to
convert enumerations to "native" enumeration types, which don't
support unknown bits.  See bug 597292.
Comment 1 Colin Walters 2010-11-16 16:07:22 UTC
Created attachment 174607 [details] [review]
Explicitly declare internal reserved bits in GdkModifierType
Comment 2 Matthias Clasen 2010-11-19 16:00:18 UTC
Review of attachment 174607 [details] [review]:

This is somewhat obnoxious. Isn't this what you are supposed to use GDK_MODIFIER_MASK for ?
Comment 3 Matthias Clasen 2010-11-19 16:00:18 UTC
Review of attachment 174607 [details] [review]:

This is somewhat obnoxious. Isn't this what you are supposed to use GDK_MODIFIER_MASK for ?
Comment 4 Colin Walters 2010-11-19 17:28:45 UTC
(In reply to comment #2)
> Review of attachment 174607 [details] [review]:
> 
> This is somewhat obnoxious. Isn't this what you are supposed to use
> GDK_MODIFIER_MASK for ?

You mean, any time we get a GdkModifierType value from C, we should & it with GDK_MODIFIER_MASK?

The basic answer is we don't have a place to do that anymore with automatic bindings.
Comment 5 Colin Walters 2011-01-20 15:47:12 UTC
Ping on this patch...
Comment 6 Matthias Clasen 2011-01-21 13:27:41 UTC
Go ahead, if you still need this. Any other enumerations where we need such masks ?