diff options
Diffstat (limited to 'xorg-server/hw/xwin/winwndproc.c')
-rw-r--r-- | xorg-server/hw/xwin/winwndproc.c | 61 |
1 files changed, 16 insertions, 45 deletions
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c index 5e8451082..ab01f44ea 100644 --- a/xorg-server/hw/xwin/winwndproc.c +++ b/xorg-server/hw/xwin/winwndproc.c @@ -42,10 +42,15 @@ #include "winmsg.h" #include "inputstr.h" +#ifndef XKB_IN_SERVER +#define XKB_IN_SERVER +#endif +#include <xkbsrv.h> /* * Global variables */ +extern Bool g_fClipboardStarted; Bool g_fCursor = TRUE; Bool g_fButton[3] = { FALSE, FALSE, FALSE }; @@ -82,9 +87,7 @@ winWindowProc (HWND hwnd, UINT message, int iScanCode; int i; -#if CYGDEBUG winDebugWin32Message("winWindowProc", hwnd, message, wParam, lParam); -#endif /* Watch for server regeneration */ if (g_ulServerGeneration != s_ulServerGeneration) @@ -97,9 +100,7 @@ winWindowProc (HWND hwnd, UINT message, if ((s_pScreenPriv == NULL || hwnd != s_hwndLastPrivates) && (s_pScreenPriv = GetProp (hwnd, WIN_SCR_PROP)) != NULL) { -#if CYGDEBUG winDebug ("winWindowProc - Setting privates handle\n"); -#endif s_pScreenInfo = s_pScreenPriv->pScreenInfo; s_pScreen = s_pScreenInfo->pScreen; s_hwndLastPrivates = hwnd; @@ -120,9 +121,7 @@ winWindowProc (HWND hwnd, UINT message, s_pScreenPriv); case WM_CREATE: -#if CYGDEBUG winDebug ("winWindowProc - WM_CREATE\n"); -#endif /* * Add a property to our display window that references @@ -155,7 +154,7 @@ winWindowProc (HWND hwnd, UINT message, s_pScreenPriv->hwndScreen = hwnd; - winInitNotifyIcon (s_pScreenPriv); + winInitNotifyIcon (s_pScreenPriv,FALSE); } return 0; @@ -191,13 +190,13 @@ winWindowProc (HWND hwnd, UINT message, break; } - ErrorF ("winWindowProc - WM_DISPLAYCHANGE - orig bpp: %d, last bpp: %d, " + winDebug ("winWindowProc - WM_DISPLAYCHANGE - orig bpp: %d, last bpp: %d, " "new bpp: %d\n", (int) s_pScreenInfo->dwBPP, (int) s_pScreenPriv->dwLastWindowsBitsPixel, wParam); - ErrorF ("winWindowProc - WM_DISPLAYCHANGE - new width: %d " + winDebug ("winWindowProc - WM_DISPLAYCHANGE - new width: %d " "new height: %d\n", LOWORD (lParam), HIWORD (lParam)); @@ -237,7 +236,7 @@ winWindowProc (HWND hwnd, UINT message, )) { /* Cannot display the visual until the depth is restored */ - ErrorF ("winWindowProc - Disruptive change in depth\n"); + winDebug ("winWindowProc - Disruptive change in depth\n"); /* Display Exit dialog */ winDisplayDepthChangeDialog (s_pScreenPriv); @@ -270,25 +269,19 @@ winWindowProc (HWND hwnd, UINT message, * relevant to the current engine (e.g., Shadow GDI). */ -#if CYGDEBUG winDebug ("winWindowProc - WM_DISPLAYCHANGE - Dimensions changed\n"); -#endif /* Release the old primary surface */ (*s_pScreenPriv->pwinReleasePrimarySurface) (s_pScreen); -#if CYGDEBUG winDebug ("winWindowProc - WM_DISPLAYCHANGE - Released " "primary surface\n"); -#endif /* Create the new primary surface */ (*s_pScreenPriv->pwinCreatePrimarySurface) (s_pScreen); -#if CYGDEBUG winDebug ("winWindowProc - WM_DISPLAYCHANGE - Recreated " "primary surface\n"); -#endif #if 0 /* Multi-Window mode uses RandR for resizes */ @@ -300,10 +293,8 @@ winWindowProc (HWND hwnd, UINT message, } else { -#if CYGDEBUG winDebug ("winWindowProc - WM_DISPLAYCHANGE - Dimensions did not " "change\n"); -#endif } /* Store the new display dimensions and depth */ @@ -331,9 +322,7 @@ winWindowProc (HWND hwnd, UINT message, RECT rcWindow; int iWidth, iHeight; -#if CYGDEBUG winDebug ("winWindowProc - WM_SIZE\n"); -#endif /* Break if we do not use scrollbars */ if (!s_pScreenInfo->fScrollbars @@ -369,7 +358,7 @@ winWindowProc (HWND hwnd, UINT message, iWidth = rcWindow.right - rcWindow.left; iHeight = rcWindow.bottom - rcWindow.top; - ErrorF ("winWindowProc - WM_SIZE - window w: %d h: %d, " + winDebug ("winWindowProc - WM_SIZE - window w: %d h: %d, " "new client area w: %d h: %d\n", iWidth, iHeight, LOWORD (lParam), HIWORD (lParam)); @@ -433,9 +422,7 @@ winWindowProc (HWND hwnd, UINT message, SCROLLINFO si; int iVertPos; -#if CYGDEBUG winDebug ("winWindowProc - WM_VSCROLL\n"); -#endif /* Get vertical scroll bar info */ si.cbSize = sizeof (si); @@ -518,9 +505,7 @@ winWindowProc (HWND hwnd, UINT message, SCROLLINFO si; int iHorzPos; -#if CYGDEBUG winDebug ("winWindowProc - WM_HSCROLL\n"); -#endif /* Get horizontal scroll bar info */ si.cbSize = sizeof (si); @@ -604,10 +589,8 @@ winWindowProc (HWND hwnd, UINT message, int iCaptionHeight; int iBorderHeight, iBorderWidth; -#if CYGDEBUG winDebug ("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %08x\n", s_pScreenInfo); -#endif /* Can't do anything without screen info */ if (s_pScreenInfo == NULL @@ -650,9 +633,7 @@ winWindowProc (HWND hwnd, UINT message, return 0; case WM_ERASEBKGND: -#if CYGDEBUG winDebug ("winWindowProc - WM_ERASEBKGND\n"); -#endif /* * Pretend that we did erase the background but we don't care, * the application uses the full window estate. This avoids some @@ -661,9 +642,6 @@ winWindowProc (HWND hwnd, UINT message, return TRUE; case WM_PAINT: -#if CYGDEBUG - winDebug ("winWindowProc - WM_PAINT\n"); -#endif /* Only paint if we have privates and the server is enabled */ if (s_pScreenPriv == NULL || !s_pScreenPriv->fEnabled @@ -684,9 +662,7 @@ winWindowProc (HWND hwnd, UINT message, case WM_PALETTECHANGED: { -#if CYGDEBUG winDebug ("winWindowProc - WM_PALETTECHANGED\n"); -#endif /* * Don't process if we don't have privates or a colormap, * or if we have an invalid depth. @@ -954,9 +930,7 @@ winWindowProc (HWND hwnd, UINT message, case WM_MOUSEWHEEL: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; -#if CYGDEBUG winDebug ("winWindowProc - WM_MOUSEWHEEL\n"); -#endif winMouseWheel (s_pScreen, GET_WHEEL_DELTA_WPARAM(wParam)); break; @@ -1014,7 +988,7 @@ winWindowProc (HWND hwnd, UINT message, * user enters Alt + F4 and is surprised when the application * quits. */ - ErrorF ("winWindowProc - WM_*KEYDOWN - Closekey hit, quitting\n"); + winDebug ("winWindowProc - WM_*KEYDOWN - Closekey hit, quitting\n"); /* Display Exit dialog */ winDisplayExitDialog (s_pScreenPriv); @@ -1107,7 +1081,7 @@ winWindowProc (HWND hwnd, UINT message, /* TODO: Override display of window when we have a bad depth */ if (LOWORD(wParam) != WA_INACTIVE && s_pScreenPriv->fBadDepth) { - ErrorF ("winWindowProc - WM_ACTIVATE - Bad depth, trying " + winDebug ("winWindowProc - WM_ACTIVATE - Bad depth, trying " "to override window activation\n"); /* Minimize the window */ @@ -1129,9 +1103,7 @@ winWindowProc (HWND hwnd, UINT message, return 0; } -#if CYGDEBUG winDebug ("winWindowProc - WM_ACTIVATE\n"); -#endif /* * Focus is being changed to another window. @@ -1157,9 +1129,7 @@ winWindowProc (HWND hwnd, UINT message, || s_pScreenInfo->fIgnoreInput) break; -#if CYGDEBUG || TRUE winDebug ("winWindowProc - WM_ACTIVATEAPP\n"); -#endif /* Activate or deactivate */ s_pScreenPriv->fActive = wParam; @@ -1229,6 +1199,7 @@ winWindowProc (HWND hwnd, UINT message, if (s_pScreenInfo->fMultiWindow) winDeinitMultiWindowWM (); #endif + g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */ GiveUp (0); return 0; @@ -1247,7 +1218,7 @@ winWindowProc (HWND hwnd, UINT message, #ifdef XWIN_MULTIWINDOWEXTWM case WM_MANAGE: - ErrorF ("winWindowProc - WM_MANAGE\n"); + winDebug ("winWindowProc - WM_MANAGE\n"); s_pScreenInfo->fAnotherWMRunning = FALSE; if (s_pScreenInfo->fInternalWM) @@ -1258,7 +1229,7 @@ winWindowProc (HWND hwnd, UINT message, break; case WM_UNMANAGE: - ErrorF ("winWindowProc - WM_UNMANAGE\n"); + winDebug ("winWindowProc - WM_UNMANAGE\n"); s_pScreenInfo->fAnotherWMRunning = TRUE; if (s_pScreenInfo->fInternalWM) @@ -1272,7 +1243,7 @@ winWindowProc (HWND hwnd, UINT message, default: if(message == s_uTaskbarRestart) { - winInitNotifyIcon (s_pScreenPriv); + winInitNotifyIcon (s_pScreenPriv,FALSE); } break; } |