From: havoc Date: Sun, 7 Dec 2003 08:21:54 +0000 (+0000) Subject: fixed behavior of vid_activewindow and vid_allowhwgamma in x11 event code, now behave... X-Git-Tag: xonotic-v0.1.0preview~6240 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=1acb26b3b6bfc394518ae68b008bba20c861f950;p=xonotic%2Fdarkplaces.git fixed behavior of vid_activewindow and vid_allowhwgamma in x11 event code, now behaves more like the windows version (gamma is now based on whether the window is the focus, not related to mouse entering/leaving anymore) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3690 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_glx.c b/vid_glx.c index 750fc028..37b6d5aa 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -467,31 +467,33 @@ static void HandleEvents(void) case MapNotify: // window restored vid_hidden = false; - vid_allowhwgamma = true; + vid_activewindow = false; + vid_allowhwgamma = false; + VID_RestoreSystemGamma(); break; case UnmapNotify: // window iconified/rolledup/whatever vid_hidden = true; + vid_activewindow = false; vid_allowhwgamma = false; VID_RestoreSystemGamma(); break; case FocusIn: // window is now the input focus vid_allowhwgamma = true; + vid_activewindow = true; break; case FocusOut: // window is no longer the input focus vid_allowhwgamma = false; + vid_activewindow = false; VID_RestoreSystemGamma(); break; case EnterNotify: // mouse entered window - vid_allowhwgamma = true; break; case LeaveNotify: // mouse left window - vid_allowhwgamma = false; - VID_RestoreSystemGamma(); break; } }