Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

winloop2.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

BOOL IsVSlick (PWND pwnd)
BOOL Is31TrayWindow (PWND pwnd)
BOOL IsTrayWindow (PWND pwnd)
void xxxSetTrayWindow (PDESKTOP pdesk, PWND pwnd, PMONITOR pMonitor)
BOOL xxxAddFullScreen (PWND pwnd, PMONITOR pMonitor)
BOOL xxxRemoveFullScreen (PWND pwnd, PMONITOR pMonitor)


Function Documentation

BOOL Is31TrayWindow PWND  pwnd  ) 
 

Definition at line 40 of file winloop2.c.

References BOOL, FALSE, FHas31TrayStyles, IsVSlick(), tagWND::spwndOwner, TestWF, TRUE, and WEFTOOLWINDOW.

Referenced by IsTrayWindow(), and xxxUpdateTray().

00041 { 00042 PWND pwnd2; 00043 00044 if (!(pwnd2 = pwnd->spwndOwner)) 00045 return (!IsVSlick(pwnd)); // unowned -- do we want you? 00046 00047 if (TestWF(pwnd2, WEFTOOLWINDOW)) 00048 return(FALSE); // owned by a tool window -- we don't want 00049 00050 return((FHas31TrayStyles(pwnd2) ? (IsVSlick(pwnd2)) : TRUE)); 00051 }

BOOL IsTrayWindow PWND  pwnd  ) 
 

Definition at line 62 of file winloop2.c.

References BOOL, FALSE, FCallHookTray, FDoTray, FHas31TrayStyles, FPostTray, FTopLevel, tagWND::head, Is31TrayWindow(), NULL, tagWND::spwndOwner, TestWF, TRUE, WEFAPPWINDOW, WEFNOACTIVATE, WEFTOOLWINDOW, and WFWIN40COMPAT.

Referenced by ParkIcon(), xxxArrangeIconicWindows(), xxxCalcValidRects(), xxxDestroyWindow(), xxxFlashWindow(), xxxHandleOwnerSwitch(), xxxMinMaximize(), xxxMNPositionHierarchy(), xxxRedrawFrameAndHook(), xxxRedrawTitle(), xxxSetForegroundWindow(), xxxSetSysMenu(), xxxUpdateTray(), and zzzChangeStates().

00063 { 00064 if ((pwnd==NULL) || !(FDoTray() && (FCallHookTray() || FPostTray(pwnd->head.rpdesk))) || 00065 !FTopLevel(pwnd)) 00066 return(FALSE); 00067 00068 // Check for WS_EX_APPWINDOW or WS_EX_TOOLWINDOW "overriding" bits 00069 if (TestWF(pwnd, WEFAPPWINDOW)) 00070 return(TRUE); 00071 00072 if (TestWF(pwnd, WEFTOOLWINDOW)) 00073 return(FALSE); 00074 00075 if (TestWF(pwnd, WEFNOACTIVATE)) { 00076 return FALSE; 00077 } 00078 00079 if (TestWF(pwnd, WFWIN40COMPAT)) { 00080 if (pwnd->spwndOwner == NULL) 00081 return(TRUE); 00082 if (TestWF(pwnd->spwndOwner, WFWIN40COMPAT)) 00083 return(FALSE); 00084 // if this window is owned by a 3.1 window, check it like a 3.1 window 00085 } 00086 00087 if (!FHas31TrayStyles(pwnd)) 00088 return(FALSE); 00089 00090 return(Is31TrayWindow(pwnd)); 00091 }

BOOL IsVSlick PWND  pwnd  ) 
 

Definition at line 17 of file winloop2.c.

References BOOL, tagDISPLAYINFO::cMonitors, FALSE, gpDispInfo, tagDISPLAYINFO::rcScreen, tagWND::rcWindow, and TRUE.

Referenced by Is31TrayWindow().

00018 { 00019 if (gpDispInfo->cMonitors == 1 && 00020 ((unsigned) pwnd->rcWindow.left > (unsigned) gpDispInfo->rcScreen.right ) && 00021 ((unsigned) pwnd->rcWindow.top > (unsigned) gpDispInfo->rcScreen.bottom) && 00022 (pwnd->rcWindow.top == (gpDispInfo->rcScreen.bottom+100)) && 00023 (pwnd->rcWindow.left == (gpDispInfo->rcScreen.right+100))) 00024 { 00025 // MUST BE THE ONE AND ONLY V-SLICK 00026 return(TRUE); 00027 } 00028 00029 return(FALSE); 00030 }

BOOL xxxAddFullScreen PWND  pwnd,
PMONITOR  pMonitor
 

Definition at line 151 of file winloop2.c.

References BOOL, tagMONITOR::cFullScreen, CheckLock, FALSE, FCallTray, tagWND::head, NULL, tagWND::rcWindow, SetWF, tagWND::spwndOwner, STW_SAME, TestWF, ThreadLock, ThreadUnlock, TRUE, WFCHILD, WFFULLSCREEN, WFVISIBLE, and xxxSetTrayWindow().

Referenced by xxxCheckFullScreen().

00152 { 00153 BOOL fYielded; 00154 00155 PDESKTOP pdesk = pwnd->head.rpdesk; 00156 00157 CheckLock(pwnd); 00158 CheckLock(pMonitor); 00159 00160 if (pdesk == NULL) 00161 return FALSE; 00162 00163 fYielded = FALSE; 00164 if (!TestWF(pwnd, WFFULLSCREEN) && FCallTray(pdesk)) 00165 { 00166 SetWF(pwnd, WFFULLSCREEN); 00167 00168 if (pMonitor->cFullScreen++ == 0) { 00169 xxxSetTrayWindow(pdesk, STW_SAME, pMonitor); 00170 fYielded = TRUE; 00171 } 00172 00173 pwnd = pwnd->spwndOwner; 00174 if ( pwnd && 00175 !TestWF(pwnd, WFCHILD) && 00176 pwnd->rcWindow.right == 0 && 00177 pwnd->rcWindow.left == 0 && 00178 !TestWF(pwnd, WFVISIBLE)) { 00179 00180 TL tlpwnd; 00181 ThreadLock(pwnd, &tlpwnd); 00182 if (xxxAddFullScreen(pwnd, pMonitor)) { 00183 fYielded = TRUE; 00184 } 00185 00186 ThreadUnlock(&tlpwnd); 00187 } 00188 } 00189 00190 return fYielded; 00191 }

BOOL xxxRemoveFullScreen PWND  pwnd,
PMONITOR  pMonitor
 

Definition at line 205 of file winloop2.c.

References BOOL, tagMONITOR::cFullScreen, CheckLock, ClrWF, FALSE, FCallTray, tagWND::head, NULL, STW_SAME, TestWF, TRUE, WFFULLSCREEN, and xxxSetTrayWindow().

Referenced by xxxCheckFullScreen(), and xxxFreeWindow().

00206 { 00207 PDESKTOP pdesk = pwnd->head.rpdesk; 00208 BOOL fYielded; 00209 00210 CheckLock(pwnd); 00211 CheckLock(pMonitor); 00212 00213 if (pdesk == NULL) 00214 return FALSE; 00215 00216 fYielded = FALSE; 00217 if (TestWF(pwnd, WFFULLSCREEN) && FCallTray(pdesk)) { 00218 ClrWF(pwnd, WFFULLSCREEN); 00219 00220 if (--pMonitor->cFullScreen == 0) { 00221 xxxSetTrayWindow(pdesk, STW_SAME, pMonitor); 00222 fYielded = TRUE; 00223 } 00224 00225 /* 00226 * (adams): Remove this assertion temporarily while I work on 00227 * a fix for the problem. 00228 * 00229 * UserAssert(pMonitor->cFullScreen >= 0); 00230 */ 00231 } 00232 00233 return fYielded; 00234 }

void xxxSetTrayWindow PDESKTOP  pdesk,
PWND  pwnd,
PMONITOR  pMonitor
 

Definition at line 100 of file winloop2.c.

References _MonitorFromWindow(), tagMONITOR::cFullScreen, CheckLock, FCallHookTray, FPostTray, GetPrimaryMonitor(), Lock, PostShellHookMessages(), PtoH, tagDESKTOP::spwndTray, STW_SAME, and xxxCallHook().

Referenced by xxxAddFullScreen(), xxxEndDeferWindowPosEx(), xxxRemoveFullScreen(), and xxxUpdateTray().

00101 { 00102 HWND hwnd; 00103 00104 CheckLock(pMonitor); 00105 00106 if (pwnd == STW_SAME) { 00107 pwnd = pdesk->spwndTray; 00108 hwnd = PtoH(pwnd); 00109 } else { 00110 CheckLock(pwnd); 00111 hwnd = PtoH(pwnd); 00112 Lock(&(pdesk->spwndTray), pwnd); 00113 } 00114 00115 if (!pMonitor) { 00116 if (pwnd) { 00117 pMonitor = _MonitorFromWindow(pwnd, MONITOR_DEFAULTTOPRIMARY); 00118 } else { 00119 pMonitor = GetPrimaryMonitor(); 00120 } 00121 } 00122 00123 if ( FPostTray(pdesk)) { 00124 PostShellHookMessages( 00125 pMonitor->cFullScreen ? 00126 HSHELL_RUDEAPPACTIVATED : HSHELL_WINDOWACTIVATED, 00127 (LPARAM) hwnd); 00128 } 00129 00130 if ( FCallHookTray() ) { 00131 xxxCallHook( 00132 HSHELL_WINDOWACTIVATED, 00133 (WPARAM) hwnd, 00134 (pMonitor->cFullScreen ? 1 : 0), 00135 WH_SHELL); 00136 } 00137 }


Generated on Sat May 15 19:46:09 2004 for test by doxygen 1.3.7