From 2c9fac5f2f3ae504861a64fa81f094cf197cccfd Mon Sep 17 00:00:00 2001 From: plombo Date: Wed, 23 Mar 2011 00:02:58 +0000 Subject: [PATCH] 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. --- src/drivers/sdl/gui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/sdl/gui.cpp b/src/drivers/sdl/gui.cpp index 5979bf6d..703eb99c 100644 --- a/src/drivers/sdl/gui.cpp +++ b/src/drivers/sdl/gui.cpp @@ -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; }