Commit 295ed003 authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Matthias Clasen

cellrendereraccel: don't translate Alt+Print to SysRq

We want to use Alt+Print for screenshot keybindings, so we have to avoid
translating it into SysRq, since that's what the keymap would dictate.
After talking with Owen, it sounds like doing this generically would be
a lot of work and quite hairy code, so hardcoding this should be OK.

https://bugzilla.gnome.org/show_bug.cgi?id=671006
parent 909fe122
......@@ -452,12 +452,24 @@ grab_key_callback (GtkWidget *widget,
accel_mods = event->state;
_gtk_translate_keyboard_accel_state (gdk_keymap_get_for_display (display),
event->hardware_keycode,
event->state,
gtk_accelerator_get_default_mod_mask (),
event->group,
&keyval, NULL, NULL, &consumed_modifiers);
if (event->keyval == GDK_KEY_Sys_Req &&
(accel_mods & GDK_MOD1_MASK) != 0)
{
/* HACK: we don't want to use SysRq as a keybinding (but we do
* want Alt+Print), so we avoid translation from Alt+Print to SysRq
*/
keyval = GDK_KEY_Print;
consumed_modifiers = 0;
}
else
{
_gtk_translate_keyboard_accel_state (gdk_keymap_get_for_display (display),
event->hardware_keycode,
event->state,
gtk_accelerator_get_default_mod_mask (),
event->group,
&keyval, NULL, NULL, &consumed_modifiers);
}
accel_key = gdk_keyval_to_lower (keyval);
if (accel_key == GDK_KEY_ISO_Left_Tab)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment