From 1acb26b3b6bfc394518ae68b008bba20c861f950 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 7 Dec 2003 08:21:54 +0000 Subject: [PATCH] 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 --- vid_glx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } } -- 2.39.2