about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/ec_client.c8
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)