diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js index 267ef205ee..6cb576d40c 100644 --- a/gdk/broadway/broadway.js +++ b/gdk/broadway/broadway.js @@ -75,7 +75,7 @@ const GDK_CROSSING_GRAB = 1; const GDK_CROSSING_UNGRAB = 2; // GdkModifierType -const GDK_SHIFT_MASK = 1 << 0; +const GDK_SHIFT_MASK = 1 << 0; const GDK_LOCK_MASK = 1 << 1; const GDK_CONTROL_MASK = 1 << 2; const GDK_MOD1_MASK = 1 << 3; @@ -91,7 +91,6 @@ const GDK_BUTTON5_MASK = 1 << 12; const GDK_SUPER_MASK = 1 << 26; const GDK_HYPER_MASK = 1 << 27; const GDK_META_MASK = 1 << 28; -const GDK_RELEASE_MASK = 1 << 30; var useDataUrls = window.location.search.includes("datauri"); diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 5b0f6be7cc..7eb74b080f 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -232,8 +232,7 @@ typedef enum * @GDK_HYPER_MASK: the Hyper modifier * @GDK_META_MASK: the Meta modifier * @GDK_MODIFIER_RESERVED_29_MASK: A reserved bit flag; do not use in your own code - * @GDK_RELEASE_MASK: not used in GDK itself. GTK uses it to differentiate - * between (keyval, modifiers) pairs from key press and release events. + * @GDK_MODIFIER_RESERVED_30_MASK: A reserved bit flag; do not use in your own code * @GDK_MODIFIER_MASK: a mask covering all modifier types. * * A set of bit-flags to indicate the state of modifier keys and mouse buttons @@ -294,12 +293,11 @@ typedef enum GDK_META_MASK = 1 << 28, GDK_MODIFIER_RESERVED_29_MASK = 1 << 29, - - GDK_RELEASE_MASK = 1 << 30, + GDK_MODIFIER_RESERVED_30_MASK = 1 << 30, /* Combination of GDK_SHIFT_MASK..GDK_BUTTON5_MASK + GDK_SUPER_MASK - + GDK_HYPER_MASK + GDK_META_MASK + GDK_RELEASE_MASK */ - GDK_MODIFIER_MASK = 0x5c001fff + + GDK_HYPER_MASK + GDK_META_MASK */ + GDK_MODIFIER_MASK = 0x1c001fff } GdkModifierType; /** diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 0dea8cd6f7..59f9af2590 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -1087,20 +1087,6 @@ is_control (const gchar *string) (string[8] == '>')); } -static inline gboolean -is_release (const gchar *string) -{ - return ((string[0] == '<') && - (string[1] == 'r' || string[1] == 'R') && - (string[2] == 'e' || string[2] == 'E') && - (string[3] == 'l' || string[3] == 'L') && - (string[4] == 'e' || string[4] == 'E') && - (string[5] == 'a' || string[5] == 'A') && - (string[6] == 's' || string[6] == 'S') && - (string[7] == 'e' || string[7] == 'E') && - (string[8] == '>')); -} - static inline gboolean is_meta (const gchar *string) { @@ -1210,13 +1196,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator, { if (*accelerator == '<') { - if (len >= 9 && is_release (accelerator)) - { - accelerator += 9; - len -= 9; - mods |= GDK_RELEASE_MASK; - } - else if (len >= 9 && is_primary (accelerator)) + if (len >= 9 && is_primary (accelerator)) { accelerator += 9; len -= 9; @@ -1505,7 +1485,6 @@ gchar* gtk_accelerator_name (guint accelerator_key, GdkModifierType accelerator_mods) { - static const gchar text_release[] = ""; static const gchar text_primary[] = ""; static const gchar text_shift[] = ""; static const gchar text_control[] = ""; @@ -1530,8 +1509,6 @@ gtk_accelerator_name (guint accelerator_key, saved_mods = accelerator_mods; l = 0; - if (accelerator_mods & GDK_RELEASE_MASK) - l += sizeof (text_release) - 1; if (accelerator_mods & _gtk_get_primary_accel_mod ()) { l += sizeof (text_primary) - 1; @@ -1564,11 +1541,6 @@ gtk_accelerator_name (guint accelerator_key, accelerator_mods = saved_mods; l = 0; accelerator[l] = 0; - if (accelerator_mods & GDK_RELEASE_MASK) - { - strcpy (accelerator + l, text_release); - l += sizeof (text_release) - 1; - } if (accelerator_mods & _gtk_get_primary_accel_mod ()) { strcpy (accelerator + l, text_primary);