From: terencehill Date: Sun, 21 Jul 2013 11:11:04 +0000 (+0200) Subject: Fix this bug: If you open up a dialog/menu in game, and then leave focus of the Xonot... X-Git-Tag: xonotic-v0.8.0~361^2 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=0fa5ff39271b4675c46666ae2114342fa5bb41d2;p=xonotic%2Fxonotic-data.pk3dir.git 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. --- 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;