]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
input: activate DP_BUTTONCHAT if the window is hidden or loses focus
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 6 Oct 2023 11:50:56 +0000 (21:50 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 8 Nov 2023 17:26:37 +0000 (03:26 +1000)
Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
cl_input.c
dpdefs/dpextensions.qc

index 0e9bc59d3ae47ee457802bba834392d285838f78..6281e925b6accacc880e48ede1c0da4ee9fb1fb0 100644 (file)
@@ -1806,7 +1806,7 @@ void CL_SendMove(void)
        if (in_button7.state  & 3) bits |=  64;
        if (in_button8.state  & 3) bits |= 128;
        if (in_use.state      & 3) bits |= 256;
-       if (key_dest != key_game || key_consoleactive) bits |= 512;
+       if (key_dest != key_game || key_consoleactive || !vid_activewindow) bits |= 512;
        if (cl_prydoncursor.integer > 0) bits |= 1024;
        if (in_button9.state  & 3)  bits |=   2048;
        if (in_button10.state  & 3) bits |=   4096;
index faf6dcdd2b53f5d31fd11a7a47921e2b4042fba2..3978698cec36641fb0a302245da3e54cbf7fa60b 100644 (file)
@@ -35,7 +35,7 @@ float(string s) checkextension = #99;
 //field definitions:
 .float buttonchat;
 //description:
-//true if the player is currently chatting (in messagemode, menus or console)
+//true if the player is currently chatting (in messagemode, menus or console) or if their game window is not active.
 
 //DP_BUTTONUSE
 //idea: id Software