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:
plombo 2011-03-23 00:02:58 +00:00
parent de992b79a0
commit 2c9fac5f2f
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}