summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-05 09:39:03 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-06 01:40:49 -0400
commitb02db72e17e570ab837f38ac2dfa7345a9824519 (patch)
tree26b107ae11615e52c358f8504bb5005fd1ccdc4f /gtk
parente8f30c836decfa446b563524cb4a86cca955845c (diff)
downloadgtk+-b02db72e17e570ab837f38ac2dfa7345a9824519.tar.gz
Rename GDK_MOD1_MASK to GDK_ALT_MASK
We've hardcoded Mod1 = Alt for a long time, there is no need to keep the confusing naming around anymore.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/a11y/gtkbuttonaccessible.c4
-rw-r--r--gtk/a11y/gtkcomboboxaccessible.c2
-rw-r--r--gtk/a11y/gtkentryaccessible.c2
-rw-r--r--gtk/a11y/gtkexpanderaccessible.c2
-rw-r--r--gtk/a11y/gtktextaccessible.c2
-rw-r--r--gtk/gtkaccelgroup.c24
-rw-r--r--gtk/gtkapplication-quartz-menu.c2
-rw-r--r--gtk/gtkcolorplane.c2
-rw-r--r--gtk/gtkcombobox.c8
-rw-r--r--gtk/gtkfilechooserwidget.c22
-rw-r--r--gtk/gtklabel.c4
-rw-r--r--gtk/gtknotebook.c8
-rw-r--r--gtk/gtkplacessidebar.c2
-rw-r--r--gtk/gtkpopover.c4
-rw-r--r--gtk/gtksearchentry.c2
-rw-r--r--gtk/gtkshortcutcontroller.c4
-rw-r--r--gtk/gtkshortcutlabel.c2
-rw-r--r--gtk/gtktreeview.c4
-rw-r--r--gtk/gtkwindow.c4
19 files changed, 52 insertions, 52 deletions
diff --git a/gtk/a11y/gtkbuttonaccessible.c b/gtk/a11y/gtkbuttonaccessible.c
index 1a2e85e9f2..d296699ee2 100644
--- a/gtk/a11y/gtkbuttonaccessible.c
+++ b/gtk/a11y/gtkbuttonaccessible.c
@@ -267,7 +267,7 @@ gtk_button_accessible_get_keybinding (AtkAction *action,
{
key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
if (key_val != GDK_KEY_VoidSymbol)
- return_value = gtk_accelerator_name (key_val, GDK_MOD1_MASK);
+ return_value = gtk_accelerator_name (key_val, GDK_ALT_MASK);
}
if (return_value == NULL)
{
@@ -294,7 +294,7 @@ gtk_button_accessible_get_keybinding (AtkAction *action,
{
key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
if (key_val != GDK_KEY_VoidSymbol)
- return_value = gtk_accelerator_name (key_val, GDK_MOD1_MASK);
+ return_value = gtk_accelerator_name (key_val, GDK_ALT_MASK);
}
}
return return_value;
diff --git a/gtk/a11y/gtkcomboboxaccessible.c b/gtk/a11y/gtkcomboboxaccessible.c
index 1c6b294ab2..b98a71a6f2 100644
--- a/gtk/a11y/gtkcomboboxaccessible.c
+++ b/gtk/a11y/gtkcomboboxaccessible.c
@@ -287,7 +287,7 @@ gtk_combo_box_accessible_get_keybinding (AtkAction *action,
{
key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
if (key_val != GDK_KEY_VoidSymbol)
- return_value = gtk_accelerator_name (key_val, GDK_MOD1_MASK);
+ return_value = gtk_accelerator_name (key_val, GDK_ALT_MASK);
}
return return_value;
diff --git a/gtk/a11y/gtkentryaccessible.c b/gtk/a11y/gtkentryaccessible.c
index 01bd1c9ac2..324a79f31c 100644
--- a/gtk/a11y/gtkentryaccessible.c
+++ b/gtk/a11y/gtkentryaccessible.c
@@ -1533,7 +1533,7 @@ gtk_entry_accessible_get_keybinding (AtkAction *action,
{
key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
if (key_val != GDK_KEY_VoidSymbol)
- return gtk_accelerator_name (key_val, GDK_MOD1_MASK);
+ return gtk_accelerator_name (key_val, GDK_ALT_MASK);
}
return NULL;
diff --git a/gtk/a11y/gtkexpanderaccessible.c b/gtk/a11y/gtkexpanderaccessible.c
index 6986e50899..d2bd0d9bce 100644
--- a/gtk/a11y/gtkexpanderaccessible.c
+++ b/gtk/a11y/gtkexpanderaccessible.c
@@ -258,7 +258,7 @@ gtk_expander_accessible_get_keybinding (AtkAction *action,
key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
if (key_val != GDK_KEY_VoidSymbol)
- return_value = gtk_accelerator_name (key_val, GDK_MOD1_MASK);
+ return_value = gtk_accelerator_name (key_val, GDK_ALT_MASK);
}
return return_value;
diff --git a/gtk/a11y/gtktextaccessible.c b/gtk/a11y/gtktextaccessible.c
index 4d086b83c7..ea20e4bde1 100644
--- a/gtk/a11y/gtktextaccessible.c
+++ b/gtk/a11y/gtktextaccessible.c
@@ -963,7 +963,7 @@ gtk_text_accessible_get_keybinding (AtkAction *action,
{
key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
if (key_val != GDK_KEY_VoidSymbol)
- return gtk_accelerator_name (key_val, GDK_MOD1_MASK);
+ return gtk_accelerator_name (key_val, GDK_ALT_MASK);
}
return NULL;
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 2b544737af..6a1e5a5bec 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -338,7 +338,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator,
else if (len >= 6 && is_modx (accelerator))
{
static const guint mod_vals[] = {
- GDK_MOD1_MASK, GDK_MOD2_MASK, GDK_MOD3_MASK,
+ GDK_ALT_MASK, GDK_MOD2_MASK, GDK_MOD3_MASK,
GDK_MOD4_MASK, GDK_MOD5_MASK
};
@@ -357,7 +357,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator,
{
accelerator += 5;
len -= 5;
- mods |= GDK_MOD1_MASK;
+ mods |= GDK_ALT_MASK;
}
else if (len >= 6 && is_meta (accelerator))
{
@@ -598,7 +598,7 @@ gtk_accelerator_name (guint accelerator_key,
static const gchar text_primary[] = "<Primary>";
static const gchar text_shift[] = "<Shift>";
static const gchar text_control[] = "<Control>";
- static const gchar text_mod1[] = "<Alt>";
+ static const gchar text_alt[] = "<Alt>";
static const gchar text_mod2[] = "<Mod2>";
static const gchar text_mod3[] = "<Mod3>";
static const gchar text_mod4[] = "<Mod4>";
@@ -628,8 +628,8 @@ gtk_accelerator_name (guint accelerator_key,
l += sizeof (text_shift) - 1;
if (accelerator_mods & GDK_CONTROL_MASK)
l += sizeof (text_control) - 1;
- if (accelerator_mods & GDK_MOD1_MASK)
- l += sizeof (text_mod1) - 1;
+ if (accelerator_mods & GDK_ALT_MASK)
+ l += sizeof (text_alt) - 1;
if (accelerator_mods & GDK_MOD2_MASK)
l += sizeof (text_mod2) - 1;
if (accelerator_mods & GDK_MOD3_MASK)
@@ -667,10 +667,10 @@ gtk_accelerator_name (guint accelerator_key,
strcpy (accelerator + l, text_control);
l += sizeof (text_control) - 1;
}
- if (accelerator_mods & GDK_MOD1_MASK)
+ if (accelerator_mods & GDK_ALT_MASK)
{
- strcpy (accelerator + l, text_mod1);
- l += sizeof (text_mod1) - 1;
+ strcpy (accelerator + l, text_alt);
+ l += sizeof (text_alt) - 1;
}
if (accelerator_mods & GDK_MOD2_MASK)
{
@@ -945,7 +945,7 @@ gtk_accelerator_print_label (GString *gstring,
seen_mod = TRUE;
}
- if (accelerator_mods & GDK_MOD1_MASK)
+ if (accelerator_mods & GDK_ALT_MASK)
{
if (seen_mod)
append_separator (gstring);
@@ -1098,7 +1098,7 @@ gtk_accelerator_print_label (GString *gstring,
* Sets the modifiers that will be considered significant for keyboard
* accelerators. The default mod mask depends on the GDK backend in use,
* but will typically include #GDK_CONTROL_MASK | #GDK_SHIFT_MASK |
- * #GDK_MOD1_MASK | #GDK_SUPER_MASK | #GDK_HYPER_MASK | #GDK_META_MASK.
+ * #GDK_ALT_MASK | #GDK_SUPER_MASK | #GDK_HYPER_MASK | #GDK_META_MASK.
* In other words, Control, Shift, Alt, Super, Hyper and Meta. Other
* modifiers will by default be ignored by #GtkAccelGroup.
*
@@ -1112,7 +1112,7 @@ void
gtk_accelerator_set_default_mod_mask (GdkModifierType default_mod_mask)
{
default_accel_mod_mask = (default_mod_mask & GDK_MODIFIER_MASK) |
- (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK);
+ (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_ALT_MASK);
}
/**
@@ -1135,7 +1135,7 @@ gtk_accelerator_get_default_mod_mask (void)
display = gdk_display_get_default ();
if (!display)
- return GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK;
+ return GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_ALT_MASK;
default_accel_mod_mask =
gdk_display_get_modifier_mask (display,
diff --git a/gtk/gtkapplication-quartz-menu.c b/gtk/gtkapplication-quartz-menu.c
index 4a8a135c0e..9b72b8e3c2 100644
--- a/gtk/gtkapplication-quartz-menu.c
+++ b/gtk/gtkapplication-quartz-menu.c
@@ -346,7 +346,7 @@ icon_loaded (GObject *object,
modifiers |= NSShiftKeyMask;
if (mask & GDK_CONTROL_MASK)
modifiers |= NSControlKeyMask;
- if (mask & GDK_MOD1_MASK)
+ if (mask & GDK_ALT_MASK)
modifiers |= NSAlternateKeyMask;
if (mask & GDK_META_MASK)
modifiers |= NSCommandKeyMask;
diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c
index a11b0752e2..bbe7ac0f2d 100644
--- a/gtk/gtkcolorplane.c
+++ b/gtk/gtkcolorplane.c
@@ -321,7 +321,7 @@ key_controller_key_pressed (GtkEventControllerKey *controller,
GtkColorPlane *plane = GTK_COLOR_PLANE (widget);
gdouble step;
- if ((state & GDK_MOD1_MASK) != 0)
+ if ((state & GDK_ALT_MASK) != 0)
step = 0.1;
else
step = 0.01;
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index c1e97debb0..47e3f0cd5b 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -561,20 +561,20 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
/* key bindings */
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_Down, GDK_MOD1_MASK,
+ GDK_KEY_Down, GDK_ALT_MASK,
"popup",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_KP_Down, GDK_MOD1_MASK,
+ GDK_KEY_KP_Down, GDK_ALT_MASK,
"popup",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_Up, GDK_MOD1_MASK,
+ GDK_KEY_Up, GDK_ALT_MASK,
"popdown",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_KP_Up, GDK_MOD1_MASK,
+ GDK_KEY_KP_Up, GDK_ALT_MASK,
"popdown",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index f62b861e71..689c8e9eb1 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -7500,29 +7500,29 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
NULL);
add_normal_and_shifted_binding (widget_class,
- GDK_KEY_Up, GDK_MOD1_MASK,
+ GDK_KEY_Up, GDK_ALT_MASK,
"up-folder");
add_normal_and_shifted_binding (widget_class,
- GDK_KEY_KP_Up, GDK_MOD1_MASK,
+ GDK_KEY_KP_Up, GDK_ALT_MASK,
"up-folder");
add_normal_and_shifted_binding (widget_class,
- GDK_KEY_Down, GDK_MOD1_MASK,
+ GDK_KEY_Down, GDK_ALT_MASK,
"down-folder");
add_normal_and_shifted_binding (widget_class,
- GDK_KEY_KP_Down, GDK_MOD1_MASK,
+ GDK_KEY_KP_Down, GDK_ALT_MASK,
"down-folder");
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_Home, GDK_MOD1_MASK,
+ GDK_KEY_Home, GDK_ALT_MASK,
"home-folder",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_KP_Home, GDK_MOD1_MASK,
+ GDK_KEY_KP_Home, GDK_ALT_MASK,
"home-folder",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_d, GDK_MOD1_MASK,
+ GDK_KEY_d, GDK_ALT_MASK,
"desktop-folder",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
@@ -7530,7 +7530,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
"show-hidden",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_s, GDK_MOD1_MASK,
+ GDK_KEY_s, GDK_ALT_MASK,
"search-shortcut",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
@@ -7538,11 +7538,11 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
"search-shortcut",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_r, GDK_MOD1_MASK,
+ GDK_KEY_r, GDK_ALT_MASK,
"recent-shortcut",
NULL);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_p, GDK_MOD1_MASK,
+ GDK_KEY_p, GDK_ALT_MASK,
"places-shortcut",
NULL);
gtk_widget_class_add_binding (widget_class,
@@ -7564,7 +7564,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
for (i = 0; i < G_N_ELEMENTS (quick_bookmark_keyvals); i++)
gtk_widget_class_add_binding_signal (widget_class,
- quick_bookmark_keyvals[i], GDK_MOD1_MASK,
+ quick_bookmark_keyvals[i], GDK_ALT_MASK,
"quick-bookmark",
"(i)", i);
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 9bcdec32e9..2bba929146 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1090,10 +1090,10 @@ gtk_label_class_init (GtkLabelClass *class)
"move-cursor",
"(iib)", GTK_MOVEMENT_PARAGRAPH_ENDS, 0, FALSE);
- add_move_binding (widget_class, GDK_KEY_f, GDK_MOD1_MASK,
+ add_move_binding (widget_class, GDK_KEY_f, GDK_ALT_MASK,
GTK_MOVEMENT_WORDS, 1);
- add_move_binding (widget_class, GDK_KEY_b, GDK_MOD1_MASK,
+ add_move_binding (widget_class, GDK_KEY_b, GDK_ALT_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (widget_class, GDK_KEY_Home, 0,
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 3dd45e6535..57f90c8338 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -968,11 +968,11 @@ add_reorder_bindings (GtkWidgetClass *widget_class,
guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
gtk_widget_class_add_binding_signal (widget_class,
- keysym, GDK_MOD1_MASK,
+ keysym, GDK_ALT_MASK,
"reorder_tab",
"(ib)", direction, move_to_last);
gtk_widget_class_add_binding_signal (widget_class,
- keypad_keysym, GDK_MOD1_MASK,
+ keypad_keysym, GDK_ALT_MASK,
"reorder_tab",
"(ib)", direction, move_to_last);
}
@@ -1349,11 +1349,11 @@ gtk_notebook_class_init (GtkNotebookClass *class)
"(i)", 1);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_Page_Up, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+ GDK_KEY_Page_Up, GDK_CONTROL_MASK | GDK_ALT_MASK,
"change-current-page",
"(i)", -1);
gtk_widget_class_add_binding_signal (widget_class,
- GDK_KEY_Page_Down, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+ GDK_KEY_Page_Down, GDK_CONTROL_MASK | GDK_ALT_MASK,
"change-current-page",
"(i)", 1);
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index cdcffab742..934a834762 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -3061,7 +3061,7 @@ on_key_pressed (GtkEventControllerKey *controller,
}
if (keyval == GDK_KEY_Down &&
- (state & modifiers) == GDK_MOD1_MASK)
+ (state & modifiers) == GDK_ALT_MASK)
return eject_or_unmount_selection (sidebar);
if ((keyval == GDK_KEY_Delete ||
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 1c90dc2af9..0f598fa74e 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -600,7 +600,7 @@ gtk_popover_has_mnemonic_modifier_pressed (GtkPopover *popover)
GdkModifierType mask;
gdk_device_get_state (dev, priv->surface, NULL, &mask);
- if ((mask & gtk_accelerator_get_default_mod_mask ()) == GDK_MOD1_MASK)
+ if ((mask & gtk_accelerator_get_default_mod_mask ()) == GDK_ALT_MASK)
{
retval = TRUE;
break;
@@ -678,7 +678,7 @@ update_mnemonics_visible (GtkPopover *popover,
return;
if ((keyval == GDK_KEY_Alt_L || keyval == GDK_KEY_Alt_R) &&
- ((state & (gtk_accelerator_get_default_mod_mask ()) & ~(GDK_MOD1_MASK)) == 0))
+ ((state & (gtk_accelerator_get_default_mod_mask ()) & ~(GDK_ALT_MASK)) == 0))
{
if (visible)
gtk_popover_schedule_mnemonics_visible (popover);
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index 93073e70b7..b8c224dd84 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -550,7 +550,7 @@ gtk_search_entry_is_keynav (guint keyval,
keyval == GDK_KEY_End || keyval == GDK_KEY_KP_End ||
keyval == GDK_KEY_Page_Up || keyval == GDK_KEY_KP_Page_Up ||
keyval == GDK_KEY_Page_Down || keyval == GDK_KEY_KP_Page_Down ||
- ((state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) != 0))
+ ((state & (GDK_CONTROL_MASK | GDK_ALT_MASK)) != 0))
return TRUE;
/* Other navigation events should get automatically
diff --git a/gtk/gtkshortcutcontroller.c b/gtk/gtkshortcutcontroller.c
index 9a817ac286..6398b04831 100644
--- a/gtk/gtkshortcutcontroller.c
+++ b/gtk/gtkshortcutcontroller.c
@@ -513,7 +513,7 @@ gtk_shortcut_controller_class_init (GtkShortcutControllerClass *klass)
P_("Mnemonic modifers"),
P_("The modifiers to be pressed to allow mnemonics activation"),
GDK_TYPE_MODIFIER_TYPE,
- GDK_MOD1_MASK,
+ GDK_ALT_MASK,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
@@ -547,7 +547,7 @@ gtk_shortcut_controller_class_init (GtkShortcutControllerClass *klass)
static void
gtk_shortcut_controller_init (GtkShortcutController *self)
{
- self->mnemonics_modifiers = GDK_MOD1_MASK;
+ self->mnemonics_modifiers = GDK_ALT_MASK;
}
void
diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c
index 90471af3ee..6062d9db04 100644
--- a/gtk/gtkshortcutlabel.c
+++ b/gtk/gtkshortcutlabel.c
@@ -137,7 +137,7 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods)
labels[i++] = C_("keyboard label", "Shift");
if (modifier & GDK_CONTROL_MASK)
labels[i++] = C_("keyboard label", "Ctrl");
- if (modifier & GDK_MOD1_MASK)
+ if (modifier & GDK_ALT_MASK)
labels[i++] = C_("keyboard label", "Alt");
if (modifier & GDK_MOD2_MASK)
labels[i++] = "Mod2";
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 548034619c..36449aba41 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5348,7 +5348,7 @@ gtk_tree_view_key_controller_key_pressed (GtkEventControllerKey *key,
}
if (focus_column &&
- (state & GDK_SHIFT_MASK) && (state & GDK_MOD1_MASK) &&
+ (state & GDK_SHIFT_MASK) && (state & GDK_ALT_MASK) &&
(keyval == GDK_KEY_Left || keyval == GDK_KEY_KP_Left
|| keyval == GDK_KEY_Right || keyval == GDK_KEY_KP_Right))
{
@@ -5380,7 +5380,7 @@ gtk_tree_view_key_controller_key_pressed (GtkEventControllerKey *key,
}
if (focus_column &&
- (state & GDK_MOD1_MASK) &&
+ (state & GDK_ALT_MASK) &&
(keyval == GDK_KEY_Left || keyval == GDK_KEY_KP_Left
|| keyval == GDK_KEY_Right || keyval == GDK_KEY_KP_Right
|| keyval == GDK_KEY_Home || keyval == GDK_KEY_KP_Home
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d7a62f52ab..42135b8bb9 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5238,7 +5238,7 @@ gtk_window_has_mnemonic_modifier_pressed (GtkWindow *window)
GdkModifierType mask;
gdk_device_get_state (dev, priv->surface, NULL, &mask);
- if ((mask & gtk_accelerator_get_default_mod_mask ()) == GDK_MOD1_MASK)
+ if ((mask & gtk_accelerator_get_default_mod_mask ()) == GDK_ALT_MASK)
{
retval = TRUE;
break;
@@ -5287,7 +5287,7 @@ update_mnemonics_visible (GtkWindow *window,
gboolean visible)
{
if ((keyval == GDK_KEY_Alt_L || keyval == GDK_KEY_Alt_R) &&
- ((state & (gtk_accelerator_get_default_mod_mask ()) & ~(GDK_MOD1_MASK)) == 0))
+ ((state & (gtk_accelerator_get_default_mod_mask ()) & ~(GDK_ALT_MASK)) == 0))
{
if (visible)
_gtk_window_schedule_mnemonics_visible (window);