Index: code/win32/win_gamma.c =================================================================== --- code/win32/win_gamma.c (revision 816) +++ code/win32/win_gamma.c (working copy) @@ -140,6 +140,9 @@ return; } + if (!g_wv.activeApp) + return; + //mapGammaMax(); for ( i = 0; i < 256; i++ ) { Index: code/win32/win_wndproc.c =================================================================== --- code/win32/win_wndproc.c (revision 816) +++ code/win32/win_wndproc.c (working copy) @@ -47,12 +47,7 @@ if ( s_alttab_disabled ) return; - if ( !Q_stricmp( Cvar_VariableString( "arch" ), "winnt" ) ) { - RegisterHotKey( 0, 0, MOD_ALT, VK_TAB ); - } - else - { BOOL old; SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0 ); @@ -64,17 +59,9 @@ { if ( s_alttab_disabled ) { - if ( !Q_stricmp( Cvar_VariableString( "arch" ), "winnt" ) ) - { - UnregisterHotKey( 0, 0 ); - } - else - { - BOOL old; + BOOL old; - SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0 ); - } - + SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0 ); s_alttab_disabled = qfalse; } } @@ -84,6 +71,9 @@ VID_AppActivate ================== */ +extern void R_SetColorMappings( void ); +extern void WG_RestoreGamma( void ); + static void VID_AppActivate(BOOL fActive, BOOL minimize) { g_wv.isMinimized = minimize; @@ -96,16 +86,21 @@ if (fActive && !g_wv.isMinimized ) { g_wv.activeApp = qtrue; + R_SetColorMappings(); } else { g_wv.activeApp = qfalse; + WG_RestoreGamma(); } // minimize/restore mouse-capture on demand if (!g_wv.activeApp ) { IN_Activate (qfalse); + + if ( r_fullscreen->integer ) + ShowWindow( g_wv.hWnd, SW_MINIMIZE ); } else {