diff options
| author | Dominik Geyer <dominik.geyer@gmx.de> | 2008-10-15 13:10:41 +0000 |
|---|---|---|
| committer | Dominik Geyer <dominik.geyer@gmx.de> | 2008-10-15 13:10:41 +0000 |
| commit | cae288fa728aa8cfe29f2fdebe6b329e60b07691 (patch) | |
| tree | 2a8112934e0b7616bca894da72255a6b424acc71 /src/engine/client/ec_client.c | |
| parent | 051ed0c892676e8354e8709fe3121c1fcc880939 (diff) | |
| download | zcatch-cae288fa728aa8cfe29f2fdebe6b329e60b07691.tar.gz zcatch-cae288fa728aa8cfe29f2fdebe6b329e60b07691.zip | |
debugging: release input-focus when hotkey ESC is pressed (and dbg_focus var is set); avoids the need for ALT-TAB while debugging
Diffstat (limited to 'src/engine/client/ec_client.c')
| -rw-r--r-- | src/engine/client/ec_client.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index cdcbf12a..ef0a25af 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -1542,14 +1542,20 @@ static void client_run() perf_end(); } - /* refocus */ + /* release focus */ if(!gfx_window_active()) { if(window_must_refocus == 0) inp_mouse_mode_absolute(); window_must_refocus = 1; } + else if (config.dbg_focus && inp_key_pressed(KEY_ESC)) + { + inp_mouse_mode_absolute(); + window_must_refocus = 1; + } + /* refocus */ if(window_must_refocus && gfx_window_active()) { if(window_must_refocus < 3) |