diff options
Diffstat (limited to 'xorg-server/hw/xwin/windialogs.c')
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/windialogs.c | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c index 054ee95b5..3e3bd401c 100644..100755 --- a/xorg-server/hw/xwin/windialogs.c +++ b/xorg-server/hw/xwin/windialogs.c @@ -189,8 +189,8 @@ winInitDialog(HWND hwndDlg) */ if (GetSystemMetrics(SM_CMONITORS) > 1) { /* Still need to refresh the frame change. */ - SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); + SetWindowPos (hwndDlg, HWND_TOP, 0,0,0,0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); } else { GetWindowRect(hwndDesk, &rcDesk); @@ -229,12 +229,8 @@ winInitDialog(HWND hwndDlg) PostMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); } -/* - * Display the Exit dialog box - */ - -void -winDisplayExitDialog(winPrivScreenPtr pScreenPriv) +int +GetLiveClients (winPrivScreenPtr pScreenPriv) { int i; int liveClients = 0; @@ -257,6 +253,20 @@ winDisplayExitDialog(winPrivScreenPtr pScreenPriv) if (liveClients < 0) liveClients = 0; + pScreenPriv->iConnectedClients = liveClients; + + return liveClients; +} + +/* + * Display the Exit dialog box + */ + +void +winDisplayExitDialog (winPrivScreenPtr pScreenPriv) +{ + int liveClients = GetLiveClients(pScreenPriv); + /* Don't show the exit confirmation dialog if SilentExit & no clients, or ForceExit, is enabled */ if ((pref.fSilentExit && liveClients <= 0) || pref.fForceExit) { @@ -268,8 +278,6 @@ winDisplayExitDialog(winPrivScreenPtr pScreenPriv) return; } - pScreenPriv->iConnectedClients = liveClients; - /* Check if dialog already exists */ if (g_hDlgExit != NULL) { /* Dialog box already exists, display it */ @@ -428,50 +436,40 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message, static winPrivScreenPtr s_pScreenPriv = NULL; static winScreenInfo *s_pScreenInfo = NULL; -#if CYGDEBUG winDebug("winChangeDepthDlgProc\n"); -#endif /* Branch on message type */ switch (message) { case WM_INITDIALOG: -#if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG\n"); -#endif /* Store pointers to private structures for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; s_pScreenInfo = s_pScreenPriv->pScreenInfo; -#if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %08x, " "s_pScreenInfo: %08x\n", s_pScreenPriv, s_pScreenInfo); -#endif -#if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG - orig bpp: %d, " "current bpp: %d\n", s_pScreenInfo->dwBPP, GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL)); -#endif winInitDialog(hwndDialog); return TRUE; case WM_DISPLAYCHANGE: -#if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_DISPLAYCHANGE - orig bpp: %d, " "new bpp: %d\n", s_pScreenInfo->dwBPP, GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL)); -#endif /* Dismiss the dialog if the display returns to the original depth */ if (GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL) == s_pScreenInfo->dwBPP) { - ErrorF("winChangeDelthDlgProc - wParam == s_pScreenInfo->dwBPP\n"); + winDebug ("winChangeDelthDlgProc - wParam == s_pScreenInfo->dwBPP\n"); /* Depth has been restored, dismiss dialog */ DestroyWindow(g_hDlgDepthChange); @@ -557,16 +555,12 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; -#if CYGDEBUG winDebug("winAboutDlgProc\n"); -#endif /* Branch on message type */ switch (message) { case WM_INITDIALOG: -#if CYGDEBUG winDebug("winAboutDlgProc - WM_INITDIALOG\n"); -#endif /* Store pointer to private structure for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; |