forked from AuroraMiddleware/gtk
gdk: Remove GDK_RELEASE_MASK
It was only ever supported by keybindings and those are gone now.
This commit is contained in:
parent
c3af47f5d9
commit
2244eeb727
@ -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");
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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[] = "<Release>";
|
||||
static const gchar text_primary[] = "<Primary>";
|
||||
static const gchar text_shift[] = "<Shift>";
|
||||
static const gchar text_control[] = "<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);
|
||||
|
Loading…
Reference in New Issue
Block a user