]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed behavior of vid_activewindow and vid_allowhwgamma in x11 event code, now behave...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Dec 2003 08:21:54 +0000 (08:21 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Dec 2003 08:21:54 +0000 (08:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3690 d7cf8633-e32d-0410-b094-e92efae38249

vid_glx.c

index 750fc028eb37840f1bb422512c9421cde2104eaf..37b6d5aa24f7fdcb2baf4fc6654f0f58571f4d1b 100644 (file)
--- 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;
                }
        }