aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winwndproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winwndproc.c49
1 files changed, 14 insertions, 35 deletions
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index bccd6f9f2..5bd85a104 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -43,10 +43,15 @@
#include "winmonitors.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 };
@@ -71,9 +76,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)
@@ -86,9 +89,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;
@@ -109,9 +110,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
@@ -144,7 +143,7 @@ winWindowProc (HWND hwnd, UINT message,
s_pScreenPriv->hwndScreen = hwnd;
- winInitNotifyIcon (s_pScreenPriv);
+ winInitNotifyIcon (s_pScreenPriv,FALSE);
}
return 0;
@@ -178,7 +177,7 @@ winWindowProc (HWND hwnd, UINT message,
break;
}
- ErrorF ("winWindowProc - WM_DISPLAYCHANGE - new width: %d "
+ winDebug ("winWindowProc - WM_DISPLAYCHANGE - new width: %d "
"new height: %d new bpp: %d\n",
LOWORD (lParam), HIWORD (lParam), wParam);
@@ -201,7 +200,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 depth change dialog */
winDisplayDepthChangeDialog (s_pScreenPriv);
@@ -330,9 +329,7 @@ winWindowProc (HWND hwnd, UINT message,
RECT rcWindow;
int iWidth, iHeight;
-#if CYGDEBUG
winDebug ("winWindowProc - WM_SIZE\n");
-#endif
/* Break if we do not allow resizing */
if ((s_pScreenInfo->iResizeMode == notAllowed)
@@ -470,9 +467,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);
@@ -555,9 +550,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);
@@ -641,10 +634,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
@@ -687,9 +678,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
@@ -698,9 +687,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
@@ -721,9 +707,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.
@@ -991,9 +975,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;
@@ -1045,7 +1027,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);
@@ -1138,7 +1120,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 */
@@ -1160,9 +1142,7 @@ winWindowProc (HWND hwnd, UINT message,
return 0;
}
-#if CYGDEBUG
winDebug ("winWindowProc - WM_ACTIVATE\n");
-#endif
/*
* Focus is being changed to another window.
@@ -1188,9 +1168,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;
@@ -1260,6 +1238,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;
@@ -1278,7 +1257,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)
@@ -1289,7 +1268,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)
@@ -1303,7 +1282,7 @@ winWindowProc (HWND hwnd, UINT message,
default:
if(message == s_uTaskbarRestart)
{
- winInitNotifyIcon (s_pScreenPriv);
+ winInitNotifyIcon (s_pScreenPriv,FALSE);
}
break;
}