gtk: disable Screenshot hotkey when the GUI is active
Like pause/resume, GTK+ handles screenshots using an accelerator. The hotkey was also being triggered, so 2 screenshots were taken every time F12 was pressed.
This commit is contained in:
parent
de992b79a0
commit
2c9fac5f2f
|
@ -1796,8 +1796,9 @@ unsigned short GDKToSDLKeyval(int gdk_key)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// ignore Pause hotkey since it is handled by GTK+ as an accelerator
|
||||
if (sdl_key == Hotkeys[HK_PAUSE]) return 0;
|
||||
// ignore pause and screenshot hotkeys since they is handled by GTK+ as accelerators
|
||||
if (sdl_key == Hotkeys[HK_PAUSE] || sdl_key == Hotkeys[HK_SCREENSHOT])
|
||||
return 0;
|
||||
|
||||
return sdl_key;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue