aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwm.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c312
1 files changed, 113 insertions, 199 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 18d9aedc2..9ee151d95 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -36,13 +36,18 @@
#endif
#include <stdio.h>
#include <stdlib.h>
+#ifndef _MSC_VER
#include <unistd.h>
+#endif
#ifdef __CYGWIN__
#include <sys/select.h>
#endif
#include <fcntl.h>
#include <setjmp.h>
#define HANDLE void *
+#ifdef _MSC_VER
+typedef int pid_t;
+#endif
#include <pthread.h>
#undef HANDLE
#include <X11/X.h>
@@ -61,6 +66,7 @@
#include "winprefs.h"
#include "window.h"
#include "pixmapstr.h"
+#include "winmsg.h"
#include "windowstr.h"
#ifdef XWIN_MULTIWINDOWEXTWM
@@ -75,10 +81,6 @@ extern void winDebug(const char *format, ...);
extern void winReshapeMultiWindow(WindowPtr pWin);
extern void winUpdateRgnMultiWindow(WindowPtr pWin);
-#ifndef CYGDEBUG
-#define CYGDEBUG NO
-#endif
-
/*
* Constant defines
*/
@@ -90,6 +92,7 @@ extern void winUpdateRgnMultiWindow(WindowPtr pWin);
#endif
#define WIN_JMP_OKAY 0
#define WIN_JMP_ERROR_IO 2
+#define AUTH_NAME "MIT-MAGIC-COOKIE-1"
/*
@@ -139,6 +142,10 @@ typedef struct _XMsgProcArgRec {
extern char *display;
extern void ErrorF (const char* /*f*/, ...);
+#if defined(XCSECURITY)
+extern unsigned int g_uiAuthDataLen;
+extern char *g_pAuthData;
+#endif
/*
@@ -155,7 +162,7 @@ static Bool
InitQueue (WMMsgQueuePtr pQueue);
static void
-GetWindowName (Display * pDpy, Window iWin, char **ppName);
+GetWindowName (Display * pDpy, Window iWin, wchar_t **ppName);
static int
SendXMessage (Display *pDisplay, Window iWin, Atom atmType, long nData);
@@ -187,11 +194,6 @@ winRedirectErrorHandler (Display *pDisplay, XErrorEvent *pErr);
static void
winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg);
-#if 0
-static void
-PreserveWin32Stack(WMInfoPtr pWMInfo, Window iWindow, UINT direction);
-#endif
-
static Bool
CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen);
@@ -235,46 +237,6 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
pQueue->pHead = pNode;
}
-
-#if 0
- switch (pNode->msg.msg)
- {
- case WM_WM_MOVE:
- ErrorF ("\tWM_WM_MOVE\n");
- break;
- case WM_WM_SIZE:
- ErrorF ("\tWM_WM_SIZE\n");
- break;
- case WM_WM_RAISE:
- ErrorF ("\tWM_WM_RAISE\n");
- break;
- case WM_WM_LOWER:
- ErrorF ("\tWM_WM_LOWER\n");
- break;
- case WM_WM_MAP:
- ErrorF ("\tWM_WM_MAP\n");
- break;
- case WM_WM_MAP2:
- ErrorF ("\tWM_WM_MAP2\n");
- break;
- case WM_WM_MAP3:
- ErrorF ("\tWM_WM_MAP3\n");
- break;
- case WM_WM_UNMAP:
- ErrorF ("\tWM_WM_UNMAP\n");
- break;
- case WM_WM_KILL:
- ErrorF ("\tWM_WM_KILL\n");
- break;
- case WM_WM_ACTIVATE:
- ErrorF ("\tWM_WM_ACTIVATE\n");
- break;
- default:
- ErrorF ("\tUnknown Message.\n");
- break;
- }
-#endif
-
/* Increase the count of elements in the queue by one */
++(pQueue->nQueueSize);
@@ -286,7 +248,7 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
}
-#if CYGMULTIWINDOW_DEBUG
+#ifdef WINDBG
/*
* QueueSize - Return the size of the queue
*/
@@ -392,22 +354,20 @@ InitQueue (WMMsgQueuePtr pQueue)
/* There are no elements initially */
pQueue->nQueueSize = 0;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
+ winDebug ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
QueueSize(pQueue));
-#endif
- ErrorF ("InitQueue - Calling pthread_mutex_init\n");
+ winDebug ("InitQueue - Calling pthread_mutex_init\n");
/* Create synchronization objects */
pthread_mutex_init (&pQueue->pmMutex, NULL);
- ErrorF ("InitQueue - pthread_mutex_init returned\n");
- ErrorF ("InitQueue - Calling pthread_cond_init\n");
+ winDebug ("InitQueue - pthread_mutex_init returned\n");
+ winDebug ("InitQueue - Calling pthread_cond_init\n");
pthread_cond_init (&pQueue->pcNotEmpty, NULL);
- ErrorF ("InitQueue - pthread_cond_init returned\n");
+ winDebug ("InitQueue - pthread_cond_init returned\n");
return TRUE;
}
@@ -418,15 +378,15 @@ InitQueue (WMMsgQueuePtr pQueue)
*/
static void
-GetWindowName (Display *pDisplay, Window iWin, char **ppName)
+GetWindowName (Display *pDisplay, Window iWin, wchar_t **ppName)
{
int nResult, nNum;
char **ppList;
+ char *pszReturnData;
+ int iLen, i;
XTextProperty xtpName;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName\n");
-#endif
+ winDebug ("GetWindowName\n");
/* Intialize ppName to NULL */
*ppName = NULL;
@@ -435,47 +395,31 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
nResult = XGetWMName (pDisplay, iWin, &xtpName);
if (!nResult || !xtpName.value || !xtpName.nitems)
{
-#if CYGMULTIWINDOW_DEBUG
ErrorF ("GetWindowName - XGetWMName failed. No name.\n");
-#endif
return;
}
-
- /* */
- if (xtpName.encoding == XA_STRING)
- {
- /* */
- if (xtpName.value)
- {
- int size = xtpName.nitems * (xtpName.format >> 3);
- *ppName = malloc(size + 1);
- strncpy(*ppName, xtpName.value, size);
- (*ppName)[size] = 0;
- XFree (xtpName.value);
- }
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName - XA_STRING %s\n", *ppName);
-#endif
- }
- else
- {
- if (XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
- {
- *ppName = strdup (*ppList);
- XFreeStringList (ppList);
- }
- XFree (xtpName.value);
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName - %s %s\n",
- XGetAtomName (pDisplay, xtpName.encoding), *ppName);
-#endif
- }
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName - Returning\n");
-#endif
+ if (Xutf8TextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
+ {
+ iLen = 0;
+ for (i = 0; i < nNum; i++) iLen += strlen(ppList[i]);
+ pszReturnData = (char *) malloc (iLen + 1);
+ pszReturnData[0] = '\0';
+ for (i = 0; i < nNum; i++) strcat (pszReturnData, ppList[i]);
+ }
+ else
+ {
+ pszReturnData = (char *) malloc (1);
+ pszReturnData[0] = '\0';
+ }
+ iLen = MultiByteToWideChar (CP_UTF8, 0, pszReturnData, -1, NULL, 0);
+ *ppName = (wchar_t*)malloc(sizeof(wchar_t)*(iLen + 1));
+ MultiByteToWideChar (CP_UTF8, 0, pszReturnData, -1, *ppName, iLen);
+ XFree (xtpName.value);
+ if (ppList) XFreeStringList (ppList);
+ free (pszReturnData);
+
+ winDebug ("GetWindowName - Returning\n");
}
@@ -508,7 +452,7 @@ SendXMessage (Display *pDisplay, Window iWin, Atom atmType, long nData)
static void
UpdateName (WMInfoPtr pWMInfo, Window iWindow)
{
- char *pszName;
+ wchar_t *pszName;
Atom atmType;
int fmtRet;
unsigned long items, remain;
@@ -552,7 +496,7 @@ UpdateName (WMInfoPtr pWMInfo, Window iWindow)
&attr);
if (!attr.override_redirect)
{
- SetWindowText (hWnd, pszName);
+ SetWindowTextW (hWnd, pszName);
winUpdateIcon (iWindow);
}
@@ -642,9 +586,7 @@ winMultiWindowWMProc (void *pArg)
/* Initialize the Window Manager */
winInitMultiWindowWM (pWMInfo, pProcArg);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMultiWindowWMProc ()\n");
-#endif
+ winDebug ("winMultiWindowWMProc ()\n");
/* Loop until we explicity break out */
for (;;)
@@ -667,48 +609,27 @@ winMultiWindowWMProc (void *pArg)
pthread_exit (NULL);
}
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMultiWindowWMProc - %d ms MSG: %d ID: %d\n",
+ winDebug ("winMultiWindowWMProc - %d ms MSG: %d ID: %d\n",
GetTickCount (), (int)pNode->msg.msg, (int)pNode->msg.dwID);
-#endif
/* Branch on the message type */
switch (pNode->msg.msg)
{
-#if 0
- case WM_WM_MOVE:
- ErrorF ("\tWM_WM_MOVE\n");
- break;
-
- case WM_WM_SIZE:
- ErrorF ("\tWM_WM_SIZE\n");
- break;
-#endif
-
case WM_WM_RAISE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_RAISE\n");
-#endif
+ winDebug ("\tWM_WM_RAISE\n");
/* Raise the window */
XRaiseWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
-#if 0
- PreserveWin32Stack (pWMInfo, pNode->msg.iWindow, GW_HWNDPREV);
-#endif
break;
case WM_WM_LOWER:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_LOWER\n");
-#endif
+ winDebug ("\tWM_WM_LOWER\n");
/* Lower the window */
XLowerWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
break;
case WM_WM_MAP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_MAP\n");
-#endif
+ winDebug ("\tWM_WM_MAP\n");
/* Put a note as to the HWND associated with this Window */
XChangeProperty (pWMInfo->pDisplay,
pNode->msg.iWindow,
@@ -720,12 +641,16 @@ winMultiWindowWMProc (void *pArg)
1);
UpdateName (pWMInfo, pNode->msg.iWindow);
winUpdateIcon (pNode->msg.iWindow);
+ {
+ HWND zstyle = HWND_NOTOPMOST;
+ winApplyHints (pWMInfo->pDisplay, pNode->msg.iWindow, pNode->msg.hwndWindow, &zstyle);
+ winUpdateWindowPosition (pNode->msg.hwndWindow, TRUE, &zstyle);
+ }
break;
case WM_WM_MAP2:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_MAP2\n");
-#endif
+ winDebug ("\tWM_WM_MAP2\n");
+
XChangeProperty (pWMInfo->pDisplay,
pNode->msg.iWindow,
pWMInfo->atmPrivMap,
@@ -737,9 +662,8 @@ winMultiWindowWMProc (void *pArg)
break;
case WM_WM_MAP3:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_MAP3\n");
-#endif
+ winDebug ("\tWM_WM_MAP3\n");
+
/* Put a note as to the HWND associated with this Window */
XChangeProperty (pWMInfo->pDisplay,
pNode->msg.iWindow,
@@ -759,18 +683,14 @@ winMultiWindowWMProc (void *pArg)
break;
case WM_WM_UNMAP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_UNMAP\n");
-#endif
+ winDebug ("\tWM_WM_UNMAP\n");
/* Unmap the window */
XUnmapWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
break;
case WM_WM_KILL:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_KILL\n");
-#endif
+ winDebug ("\tWM_WM_KILL\n");
{
int i, n, found = 0;
Atom *protocols;
@@ -801,9 +721,7 @@ winMultiWindowWMProc (void *pArg)
break;
case WM_WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_ACTIVATE\n");
-#endif
+ winDebug ("\tWM_WM_ACTIVATE\n");
/* Set the input focus */
XSetInputFocus (pWMInfo->pDisplay,
@@ -847,9 +765,7 @@ winMultiWindowWMProc (void *pArg)
/* Free the passed-in argument */
free (pProcArg);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF("-winMultiWindowWMProc ()\n");
-#endif
+ winDebug("-winMultiWindowWMProc ()\n");
return NULL;
}
@@ -872,7 +788,7 @@ winMultiWindowXMsgProc (void *pArg)
int iReturn;
XIconSize *xis;
- ErrorF ("winMultiWindowXMsgProc - Hello\n");
+ winDebug ("winMultiWindowXMsgProc - Hello\n");
/* Check that argument pointer is not invalid */
if (pProcArg == NULL)
@@ -881,7 +797,7 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- ErrorF ("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
+ winDebug ("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
/* Grab the server started mutex - pause until we get it */
iReturn = pthread_mutex_lock (pProcArg->ppmServerStarted);
@@ -893,14 +809,7 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- ErrorF ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
-
- /* Allow multiple threads to access Xlib */
- if (XInitThreads () == 0)
- {
- ErrorF ("winMultiWindowXMsgProc - XInitThreads () failed. Exiting.\n");
- pthread_exit (NULL);
- }
+ winDebug ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
/* See if X supports the current locale */
if (XSupportsLocale () == False)
@@ -913,7 +822,7 @@ winMultiWindowXMsgProc (void *pArg)
/* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);
- ErrorF ("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
+ winDebug ("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
/* Set jump point for IO Error exits */
iReturn = setjmp (g_jmpXMsgProcEntry);
@@ -942,7 +851,7 @@ winMultiWindowXMsgProc (void *pArg)
512, "127.0.0.1:%s.%d", display, (int)pProcArg->dwScreen);
/* Print the display connection string */
- ErrorF ("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
+ winDebug ("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
/* Initialize retry count */
iRetries = 0;
@@ -954,7 +863,7 @@ winMultiWindowXMsgProc (void *pArg)
pProcArg->pDisplay = XOpenDisplay (pszDisplay);
if (pProcArg->pDisplay == NULL)
{
- ErrorF ("winMultiWindowXMsgProc - Could not open display, try: %d, "
+ winDebug ("winMultiWindowXMsgProc - Could not open display, try: %d, "
"sleeping: %d\n\f",
iRetries + 1, WIN_CONNECT_DELAY);
++iRetries;
@@ -974,7 +883,7 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- ErrorF ("winMultiWindowXMsgProc - XOpenDisplay () returned and "
+ winDebug ("winMultiWindowXMsgProc - XOpenDisplay () returned and "
"successfully opened the display.\n");
/* Check if another window manager is already running */
@@ -1067,7 +976,7 @@ winMultiWindowXMsgProc (void *pArg)
event.xcreatewindow.window,
&attr);
- if (!attr.override_redirect)
+ if (!attr.override_redirect && attr.class != InputOnly)
XSetWindowBorderWidth(pProcArg->pDisplay,
event.xcreatewindow.window,
0);
@@ -1098,7 +1007,7 @@ winMultiWindowXMsgProc (void *pArg)
&& event.xclient.message_type == atmWmChange
&& event.xclient.data.l[0] == IconicState)
{
- ErrorF ("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
+ winDebug ("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
memset (&msg, 0, sizeof (msg));
@@ -1182,9 +1091,7 @@ winInitWM (void **ppWMInfo,
return FALSE;
}
-#if CYGDEBUG || YES
winDebug ("winInitWM - Returning.\n");
-#endif
return TRUE;
}
@@ -1201,7 +1108,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
char pszDisplay[512];
int iReturn;
- ErrorF ("winInitMultiWindowWM - Hello\n");
+ winDebug ("winInitMultiWindowWM - Hello\n");
/* Check that argument pointer is not invalid */
if (pProcArg == NULL)
@@ -1210,7 +1117,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- ErrorF ("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n");
+ winDebug ("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n");
/* Grab our garbage mutex to satisfy pthread_cond_wait */
iReturn = pthread_mutex_lock (pProcArg->ppmServerStarted);
@@ -1222,14 +1129,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- ErrorF ("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
-
- /* Allow multiple threads to access Xlib */
- if (XInitThreads () == 0)
- {
- ErrorF ("winInitMultiWindowWM - XInitThreads () failed. Exiting.\n");
- pthread_exit (NULL);
- }
+ winDebug ("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
/* See if X supports the current locale */
if (XSupportsLocale () == False)
@@ -1241,7 +1141,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
/* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);
- ErrorF ("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
+ winDebug ("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
/* Set jump point for IO Error exits */
iReturn = setjmp (g_jmpWMEntry);
@@ -1273,7 +1173,15 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
(int) pProcArg->dwScreen);
/* Print the display connection string */
- ErrorF ("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
+ winDebug ("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
+
+#if defined(XCSECURITY)
+ /* Use our generated cookie for authentication */
+ XSetAuthorization (AUTH_NAME,
+ strlen (AUTH_NAME),
+ g_pAuthData,
+ g_uiAuthDataLen);
+#endif
/* Open the X display */
do
@@ -1302,7 +1210,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- ErrorF ("winInitMultiWindowWM - XOpenDisplay () returned and "
+ winDebug ("winInitMultiWindowWM - XOpenDisplay () returned and "
"successfully opened the display.\n");
@@ -1339,9 +1247,7 @@ winSendMessageToWM (void *pWMInfo, winWMMessagePtr pMsg)
{
WMMsgNodePtr pNode;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winSendMessageToWM ()\n");
-#endif
+ winDebug ("winSendMessageToWM ()\n");
pNode = (WMMsgNodePtr)malloc(sizeof(WMMsgNodeRec));
if (pNode != NULL)
@@ -1373,7 +1279,18 @@ winMultiWindowWMErrorHandler (Display *pDisplay, XErrorEvent *pErr)
pErr->error_code,
pszErrorMsg,
sizeof (pszErrorMsg));
- ErrorF ("winMultiWindowWMErrorHandler - ERROR: %s\n", pszErrorMsg);
+ ErrorF ("winMultiWindowWMErrorHandler - ERROR: %s\n"
+ " errorCode %d\n"
+ " serial %d\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -1411,9 +1328,18 @@ winMultiWindowXMsgProcErrorHandler (Display *pDisplay, XErrorEvent *pErr)
pErr->error_code,
pszErrorMsg,
sizeof (pszErrorMsg));
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n", pszErrorMsg);
-#endif
+ ErrorF ("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n"
+ " errorCode %d\n"
+ " serial %d\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -1484,7 +1410,7 @@ CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen)
void
winDeinitMultiWindowWM (void)
{
- ErrorF ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
+ winDebug ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
g_shutdown = TRUE;
}
@@ -1508,6 +1434,7 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
int format;
unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0;
WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
+ MwmHints *mwm_hint = NULL;
if (!hWnd) return;
if (!IsWindow (hWnd)) return;
@@ -1539,7 +1466,6 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
}
nitems = left = 0;
- MwmHints *mwm_hint = NULL;
if (XGetWindowProperty(pDisplay, iWindow, motif_wm_hints, 0L,
PropMwmHintsElements, False, motif_wm_hints, &type, &format,
&nitems, &left, (unsigned char **)&mwm_hint) == Success)
@@ -1626,12 +1552,6 @@ winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle)
/* Setup a rectangle with the X window position and size */
SetRect (&rcNew, iX, iY, iX + iWidth, iY + iHeight);
-#if 0
- ErrorF ("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top,
- rcNew.right, rcNew.bottom);
-#endif
-
AdjustWindowRectEx (&rcNew, GetWindowLongPtr (hWnd, GWL_STYLE), FALSE, WS_EX_APPWINDOW);
/* Don't allow window decoration to disappear off to top-left as a result of this adjustment */
@@ -1649,12 +1569,6 @@ winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle)
rcNew.bottom += iDy;
}
-#if 0
- ErrorF ("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top,
- rcNew.right, rcNew.bottom);
-#endif
-
/* Position the Windows window */
SetWindowPos (hWnd, *zstyle, rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,