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;
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");
* @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
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;
/**
(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)
{
{
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;
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>";
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;
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);