From 0fa5ff39271b4675c46666ae2114342fa5bb41d2 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 21 Jul 2013 13:11:04 +0200 Subject: [PATCH] Fix this bug: If you open up a dialog/menu in game, and then leave focus of the Xonotic window, when you click back onto the Xonotic window it ALWAYS unfocuses the active dialog. --- qcsrc/menu/menu.qc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index a76efb8e3..78c196995 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -257,6 +257,19 @@ void m_keydown(float key, float ascii) return; if(!Menu_Active) return; + + if(menuMouseMode) + if(key >= K_MOUSE1 && key <= K_MOUSE3) + { + // detect a click outside of the game window + vector p = getmousepos(); + if(p_x < 0 || p_x > realconwidth || p_y < 0 || p_y > realconheight) + { + ++mouseButtonsPressed; + return; + } + } + if(keyGrabber) { entity e; -- 2.39.2