diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 7dcf3c4b6..aae6fa1cc 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -568,7 +568,7 @@ typedef struct _winPrivScreenRec } winPrivScreenRec; - typedef struct { +typedef struct { RootlessWindowPtr pFrame; HWND hWnd; int dwWidthBytes; @@ -579,6 +579,7 @@ typedef struct _winPrivScreenRec BOOL fResized; BOOL fRestackingNow; BOOL fClose; + BOOL fMovingOrSizing; BOOL fDestroyed;//for debug char *pfb; } win32RootlessWindowRec, *win32RootlessWindowPtr; @@ -1515,6 +1516,9 @@ winMoveXWindow (WindowPtr pWin, int x, int y); void winResizeXWindow (WindowPtr pWin, int w, int h); +void +winWin32RootlessMoveResizeXWindow (WindowPtr pWin, int x, int y, int w, int h); + XID winGetWindowID (WindowPtr pWin); @@ -1655,6 +1659,10 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, * winwindowswm.c */ +void +winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg, + Window window, int x, int y, int w, int h); + void winWindowsWMExtensionInit (void); diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index b4d2c2ae2..096b31584 100755 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -51,7 +51,6 @@ #define ULW_ALPHA 0x00000002 #define ULW_OPAQUE 0x00000004 #define AC_SRC_ALPHA 0x01 -#define CYGMULTIWINDOW_DEBUG YES /* * Global variables @@ -77,7 +76,7 @@ Bool winWin32RootlessQueryDIBFormat (win32RootlessWindowPtr pRLWinPriv, BITMAPINFOHEADER *pbmih) { HBITMAP hbmp; -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG LPDWORD pdw = NULL; #endif @@ -106,12 +105,12 @@ winWin32RootlessQueryDIBFormat (win32RootlessWindowPtr pRLWinPriv, BITMAPINFOHEA return FALSE; } -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG /* Get a pointer to bitfields */ pdw = (DWORD*) ((CARD8*)pbmih + sizeof (BITMAPINFOHEADER)); ErrorF ("winWin32RootlessQueryDIBFormat - First call masks: %08x %08x %08x\n", - pdw[0], pdw[1], pdw[2]); + (unsigned int)pdw[0], (unsigned int)pdw[1], (unsigned int)pdw[2]); #endif /* Get optimal color table, or the optimal bitfields */ @@ -236,6 +235,7 @@ winWin32RootlessCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen, pRLWinPriv->fClose = FALSE; pRLWinPriv->fRestackingNow = FALSE; pRLWinPriv->fDestroyed = FALSE; + pRLWinPriv->fMovingOrSizing = FALSE; // Store the implementation private frame ID pFrame->wid = (RootlessFrameID) pRLWinPriv; @@ -616,7 +616,7 @@ winWin32RootlessStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesP } else { -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWin32RootlessStartDrawing - Shadow buffer allocated\n"); #endif } @@ -624,19 +624,20 @@ winWin32RootlessStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesP /* Get information about the bitmap that was allocated */ GetObject (hbmpNew, sizeof (dibsection), &dibsection); -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG /* Print information about bitmap allocated */ ErrorF ("winWin32RootlessStartDrawing - Dibsection width: %d height: %d " "depth: %d size image: %d\n", - dibsection.dsBmih.biWidth, dibsection.dsBmih.biHeight, - dibsection.dsBmih.biBitCount, - dibsection.dsBmih.biSizeImage); + (unsigned int)dibsection.dsBmih.biWidth, + (unsigned int)dibsection.dsBmih.biHeight, + (unsigned int)dibsection.dsBmih.biBitCount, + (unsigned int)dibsection.dsBmih.biSizeImage); #endif /* Select the shadow bitmap into the shadow DC */ SelectObject (hdcNew, hbmpNew); -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWin32RootlessStartDrawing - Attempting a shadow blit\n"); #endif @@ -649,7 +650,7 @@ winWin32RootlessStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesP SRCCOPY); if (fReturn) { -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWin32RootlessStartDrawing - Shadow blit success\n"); #endif } @@ -671,9 +672,9 @@ winWin32RootlessStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesP pRLWinPriv->dwWidthBytes = dibsection.dsBm.bmWidthBytes; -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWin32RootlessStartDrawing - bytesPerRow: %d\n", - dibsection.dsBm.bmWidthBytes); + (unsigned int)dibsection.dsBm.bmWidthBytes); #endif /* Free the old shadow bitmap */ @@ -690,9 +691,9 @@ winWin32RootlessStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesP { ErrorF ("winWin32RootlessStartDrawing - Already window was destoroyed \n"); } -#if CYGDEBUG +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWin32RootlessStartDrawing - 0x%08x %d\n", - pRLWinPriv->pfb, dibsection.dsBm.bmWidthBytes); + (unsigned int)pRLWinPriv->pfb, (unsigned int)dibsection.dsBm.bmWidthBytes); #endif *pixelData = pRLWinPriv->pfb; *bytesPerRow = pRLWinPriv->dwWidthBytes; @@ -876,12 +877,14 @@ winWin32RootlessCopyWindow (RootlessFrameID wid, int nDstRects, const BoxRec *pD for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++) { +#if CYGMULTIWINDOW_DEBUG ErrorF ("BitBlt (%d, %d, %d, %d) (%d, %d)\n", pDstRects->x1, pDstRects->y1, pDstRects->x2 - pDstRects->x1, pDstRects->y2 - pDstRects->y1, pDstRects->x1 + nDx, pDstRects->y1 + nDy); +#endif if (!BitBlt (pRLWinPriv->hdcShadow, pDstRects->x1, pDstRects->y1, diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c index 9ca04efb2..26adeb88e 100755 --- a/hw/xwin/winwin32rootlesswindow.c +++ b/hw/xwin/winwin32rootlesswindow.c @@ -135,6 +135,25 @@ winWin32RootlessResizeXWindow (WindowPtr pWin, int w, int h) } +/* + * winWin32RootlessMoveResizeXWindow + */ + +void +winWin32RootlessMoveResizeXWindow (WindowPtr pWin, int x, int y, int w, int h) +{ + XID *vlist = malloc(sizeof(long)*4); + + (CARD32*)vlist[0] = x; + (CARD32*)vlist[1] = y; + (CARD32*)vlist[2] = w; + (CARD32*)vlist[3] = h; + + ConfigureWindow (pWin, CWX | CWY | CWWidth | CWHeight, vlist, wClient(pWin)); + free(vlist); +} + + /* * winWin32RootlessUpdateIcon * Change the Windows window icon diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c index b52bf7f02..b4a6e5c39 100755 --- a/hw/xwin/winwin32rootlesswndproc.c +++ b/hw/xwin/winwin32rootlesswndproc.c @@ -34,6 +34,8 @@ #define _WINDOWSWM_SERVER_ #include "windowswmstr.h" #include "dixevents.h" +#include "propertyst.h" +#include "Xatom.h" #include "winmultiwindowclass.h" @@ -42,7 +44,8 @@ */ #define MOUSE_POLLING_INTERVAL 500 -#define CYGMULTIWINDOW_DEBUG YES + + /* * Global variables @@ -273,6 +276,163 @@ ValidateSizing (HWND hwnd, WindowPtr pWin, } +/* + * IsRaiseOnClick + */ + +static Bool +IsRaiseOnClick (WindowPtr pWin) +{ + + struct _Window *pwin; + struct _Property *prop; + static Atom atmWindowsWmRaiseOnClick = 0; + WindowPtr pRoot = GetCurrentRootWindow (); + + if (!pWin) + { + ErrorF ("IsRaiseOnClick - pWin was NULL\n"); + return 0; + } + + if (!atmWindowsWmRaiseOnClick) + atmWindowsWmRaiseOnClick = MakeAtom (WINDOWSWM_RAISE_ON_CLICK, + strlen(WINDOWSWM_RAISE_ON_CLICK), + 1); + + pwin = (struct _Window*) pWin; + + if (pwin->optional) + prop = (struct _Property *) pwin->optional->userProps; + else + prop = NULL; + + while (prop) + { + if (prop->propertyName == atmWindowsWmRaiseOnClick + && prop->type == XA_INTEGER + && prop->format == 32) + { + return *(int*)prop->data; + } + else + prop = prop->next; + } + + if (pWin != pRoot) + { + IsRaiseOnClick (pRoot); + } + else + { + return 0; + } +} + + +/* + * IsMouseActive + */ + +static Bool +IsMouseActive (WindowPtr pWin) +{ + + struct _Window *pwin; + struct _Property *prop; + static Atom atmWindowsWMMouseActivate = 0; + WindowPtr pRoot = GetCurrentRootWindow (); + + if (!pWin) + { + ErrorF ("IsMouseActive - pWin was NULL\n"); + return 0; + } + + if (!atmWindowsWMMouseActivate) + atmWindowsWMMouseActivate = MakeAtom (WINDOWSWM_MOUSE_ACTIVATE, + strlen(WINDOWSWM_MOUSE_ACTIVATE), + 1); + + pwin = (struct _Window*) pWin; + + if (pwin->optional) + prop = (struct _Property *) pwin->optional->userProps; + else + prop = NULL; + + while (prop) + { + if (prop->propertyName == atmWindowsWMMouseActivate + && prop->type == XA_INTEGER + && prop->format == 32) + { + return *(int*)prop->data; + } + else + prop = prop->next; + } + + if (pWin != pRoot) + { + IsMouseActive (pRoot); + } + else + { + return 0; + } + + return 0; +} + + +/* + * WWMPropClientWindow + */ + +static WindowPtr +WWMPropClientWindow (WindowPtr pWin) +{ + + struct _Window *pwin; + struct _Property *prop; + static Atom atmWindowsWMClientWindow = 0; + + if (!pWin) + { + ErrorF ("WWMPropClientWindow - pWin was NULL\n"); + return 0; + } + + if (!atmWindowsWMClientWindow) + atmWindowsWMClientWindow = MakeAtom (WINDOWSWM_CLIENT_WINDOW, + strlen(WINDOWSWM_CLIENT_WINDOW), + 1); + + pwin = (struct _Window*) pWin; + + if (pwin->optional) + prop = (struct _Property *) pwin->optional->userProps; + else + prop = NULL; + + while (prop) + { + if (prop->propertyName == atmWindowsWMClientWindow + && prop->type == XA_INTEGER + && prop->format == 32) + { + pWin = LookupIDByType (*(int*)prop->data, RT_WINDOW); + return pWin; + } + else + prop = prop->next; + } + + return 0; +} + + /* * winWin32RootlessWindowProc - Window procedure */ @@ -291,6 +451,9 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, static Bool s_fTracking = FALSE; HDC hdcUpdate; PAINTSTRUCT ps; + LPWINDOWPOS pWinPos = NULL; + RECT rcClient; + WindowPtr pClientWin = NULL; /* Check if the Windows window property for our X window pointer is valid */ if ((pRLWinPriv = (win32RootlessWindowPtr)GetProp (hwnd, WIN_WINDOW_PROP)) != NULL) @@ -300,14 +463,14 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, if (pScreen) pScreenPriv = winGetScreenPriv(pScreen); if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo; if (pScreenPriv) hwndScreen = pScreenPriv->hwndScreen; -#if 1 +#if 0 ErrorF ("hWnd %08X\n", hwnd); ErrorF ("pScreenPriv %08X\n", pScreenPriv); ErrorF ("pScreenInfo %08X\n", pScreenInfo); ErrorF ("hwndScreen %08X\n", hwndScreen); -#endif ErrorF ("winWin32RootlessWindowProc (%08x) %08x %08x %08x\n", pRLWinPriv, message, wParam, lParam); +#endif } /* Branch on message type */ switch (message) @@ -346,7 +509,7 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, #if CYGMULTIWINDOW_DEBUG ErrorF ("winWin32RootlessWindowProc - WM_DESTROY\n"); #endif - /* Free the shadow DC; which allows the bitmap to be freed */ + /* Free the shaodw DC; which allows the bitmap to be freed */ DeleteDC (pRLWinPriv->hdcShadow); pRLWinPriv->hdcShadow = NULL; @@ -552,6 +715,8 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, return MA_NOACTIVATE; } #endif + if (!IsMouseActive (pWin)) return MA_NOACTIVATE; + break; case WM_KILLFOCUS: @@ -665,47 +830,31 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, } return 0; -#if 0 +#if 1 case WM_WINDOWPOSCHANGING: pWinPos = (LPWINDOWPOS)lParam; - /* Window manager does restacking */ if (!(pWinPos->flags & SWP_NOZORDER)) { if (pRLWinPriv->fRestackingNow) { - ErrorF ("Win %08x is now restacking.\n", pRLWinPriv); - return 0; - } - - //if (pRLWinPriv->fXTop) - if (pScreenPriv->widTop == pRLWinPriv) - { -#if 0 - if ((pWinPos->hwndInsertAfter == HWND_TOP)|| - (pWinPos->hwndInsertAfter == HWND_TOPMOST)|| - (pWinPos->hwndInsertAfter == HWND_NOTOPMOST)) - { - ErrorF ("Win %08x is top and become top/topmost/notopmost.\n", pRLWinPriv); - return 0; - } - - for (hInsWnd = GetNextWindow (hwnd, GW_HWNDPREV); - hInsWnd; hInsWnd = GetNextWindow (hInsWnd, GW_HWNDPREV)) - { - if (hInsWnd == pWinPos->hwndInsertAfter) - { - ErrorF ("Win %08x is top and go above.\n", - pRLWinPriv); - return 0; - } - hInsWnd = GetNextWindow (hInsWnd, GW_HWNDPREV); - } - ErrorF ("Win %08x is top but forbid.\n", pRLWinPriv); +#if CYGMULTIWINDOW_DEBUG + ErrorF ("Win %08x is now restacking.\n", (unsigned int)pRLWinPriv); #endif return 0; } + + if (IsRaiseOnClick (pWin)) + { +#if CYGMULTIWINDOW_DEBUG + ErrorF ("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n", (unsigned int)pRLWinPriv); +#endif + return 0; + } + +#if CYGMULTIWINDOW_DEBUG ErrorF ("Win %08x forbid to change z order (%08x).\n", - pRLWinPriv, pWinPos->hwndInsertAfter); + (unsigned int)pRLWinPriv, (unsigned int)pWinPos->hwndInsertAfter); +#endif pWinPos->flags |= SWP_NOZORDER; } break; @@ -713,7 +862,8 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, case WM_MOVE: #if CYGMULTIWINDOW_DEBUG - ErrorF ("winWin32RootlessWindowProc - WM_MOVE - %d ms\n", GetTickCount ()); + ErrorF ("winWin32RootlessWindowProc - WM_MOVE - %d ms\n", + (unsigned int)GetTickCount ()); #endif if (g_fNoConfigureWindow) break; #if 0 @@ -750,17 +900,25 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, (HIWORD(lParam) - wBorderWidth (pWin) - GetSystemMetrics (SM_YVIRTUALSCREEN)), 0, 0); #else - winWin32RootlessMoveXWindow (pWin, - (LOWORD(lParam) - wBorderWidth (pWin) - - GetSystemMetrics (SM_XVIRTUALSCREEN)), - (HIWORD(lParam) - wBorderWidth (pWin) - - GetSystemMetrics (SM_YVIRTUALSCREEN))); + if (!pRLWinPriv->fMovingOrSizing) + { + WindowPtr pClientWin = WWMPropClientWindow (pWin); + + if (pClientWin == NULL) pClientWin = pWin; + + winWin32RootlessMoveXWindow (pClientWin, + (LOWORD(lParam) - wBorderWidth (pWin) + - GetSystemMetrics (SM_XVIRTUALSCREEN)), + (HIWORD(lParam) - wBorderWidth (pWin) + - GetSystemMetrics (SM_YVIRTUALSCREEN))); + } #endif return 0; case WM_SHOWWINDOW: #if CYGMULTIWINDOW_DEBUG - ErrorF ("winWin32RootlessWindowProc - WM_SHOWWINDOW - %d ms\n", GetTickCount ()); + ErrorF ("winWin32RootlessWindowProc - WM_SHOWWINDOW - %d ms\n", + (unsigned int)GetTickCount ()); #endif /* Bail out if the window is being hidden */ if (!wParam) @@ -800,7 +958,8 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, /* see dix/window.c */ /* FIXME: Maximize/Restore? */ #if CYGMULTIWINDOW_DEBUG - ErrorF ("winWin32RootlessWindowProc - WM_SIZE - %d ms\n", GetTickCount ()); + ErrorF ("winWin32RootlessWindowProc - WM_SIZE - %d ms\n", + (unsigned int)GetTickCount ()); #endif #if CYGMULTIWINDOW_DEBUG ErrorF ("\t(%d, %d) %d\n", (short) LOWORD(lParam), (short) HIWORD(lParam), g_fNoConfigureWindow); @@ -863,9 +1022,16 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, 0, 0, LOWORD(lParam), HIWORD(lParam)); #else - winWin32RootlessResizeXWindow (pWin, - (short) LOWORD(lParam), - (short) HIWORD(lParam)); + if (!pRLWinPriv->fMovingOrSizing) + { + WindowPtr pClientWin = WWMPropClientWindow (pWin); + + if (pClientWin == NULL) pClientWin = pWin; + + winWin32RootlessResizeXWindow (pClientWin, + (short) LOWORD(lParam), + (short) HIWORD(lParam)); + } #endif break; @@ -900,6 +1066,30 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, } break; + case WM_ENTERSIZEMOVE: + pRLWinPriv->fMovingOrSizing = TRUE; + break; + + case WM_EXITSIZEMOVE: + pRLWinPriv->fMovingOrSizing = FALSE; + + GetClientRect (hwnd, &rcClient); + + pClientWin = WWMPropClientWindow (pWin); + if (pClientWin == NULL) pClientWin = pWin; + + MapWindowPoints (hwnd, HWND_DESKTOP, (LPPOINT)&rcClient, 2); + winWin32RootlessMoveResizeXWindow (pClientWin, + rcClient.left - wBorderWidth (pWin) + - GetSystemMetrics (SM_XVIRTUALSCREEN), + rcClient.top - wBorderWidth (pWin) + - GetSystemMetrics (SM_YVIRTUALSCREEN), + rcClient.right - rcClient.left + - wBorderWidth (pWin)*2, + rcClient.bottom - rcClient.top + - wBorderWidth (pWin)*2); + break; + default: break; } diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 224a71409..b52118b27 100755 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -296,22 +296,27 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg, WMEventPtr *pHead, pEvent; ClientPtr client; xWindowsWMNotifyEvent se; - +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n", type, mask, which, arg, x, y, w, h); +#endif pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); if (!pHead) return; for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { client = pEvent->client; +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWindowsWMSendEvent - x%08x\n", (int) client); +#endif if ((pEvent->mask & mask) == 0 || client == serverClient || client->clientGone) { continue; } +#if CYGMULTIWINDOW_DEBUG ErrorF ("winWindowsWMSendEvent - send\n"); +#endif se.type = type + WMEventBase; se.kind = which; se.window = window; @@ -380,8 +385,10 @@ ProcWindowsWMFrameGetRect (register ClientPtr client) RECT rcNew; REQUEST(xWindowsWMFrameGetRectReq); +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameGetRect %d %d\n", (sizeof(xWindowsWMFrameGetRectReq) >> 2), (int) client->req_len); +#endif REQUEST_SIZE_MATCH(xWindowsWMFrameGetRectReq); rep.type = X_Reply; @@ -400,8 +407,11 @@ ProcWindowsWMFrameGetRect (register ClientPtr client) SetRect (&rcNew, stuff->ix, stuff->iy, stuff->ix + stuff->iw, stuff->iy + stuff->ih); +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameGetRect - %d %d %d %d\n", stuff->ix, stuff->iy, stuff->ix + stuff->iw, stuff->iy + stuff->ih); +#endif + /* * Calculate the required size of the Windows window rectangle, * given the size of the Windows window client area. @@ -411,8 +421,10 @@ ProcWindowsWMFrameGetRect (register ClientPtr client) rep.y = rcNew.top; rep.w = rcNew.right - rcNew.left; rep.h = rcNew.bottom - rcNew.top; +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameGetRect - %d %d %d %d\n", rep.x, rep.y, rep.w, rep.h); +#endif WriteToClient(client, sizeof(xWindowsWMFrameGetRectReply), (char *)&rep); return (client->noClientException); @@ -431,24 +443,30 @@ ProcWindowsWMFrameDraw (register ClientPtr client) REQUEST_SIZE_MATCH (xWindowsWMFrameDrawReq); +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameDraw\n"); +#endif if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, client, SecurityReadAccess))) { return BadValue; } +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameDraw - Window found\n"); +#endif ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin, TRUE); if (pRLWinPriv == 0) return BadWindow; +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameDraw - HWND 0x%08x 0x%08x 0x%08x", (int) pRLWinPriv->hWnd, (int) stuff->frame_style, (int) stuff->frame_style_ex); ErrorF ("ProcWindowsWMFrameDraw - %d %d %d %d\n", stuff->ix, stuff->iy, stuff->iw, stuff->ih); +#endif GetWindowPlacement (pRLWinPriv->hWnd, &wndpl); @@ -488,7 +506,9 @@ ProcWindowsWMFrameDraw (register ClientPtr client) winWin32RootlessUpdateIcon (pWin->drawable.id); +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameDraw - done\n"); +#endif return (client->noClientException); } @@ -504,7 +524,9 @@ ProcWindowsWMFrameSetTitle( WindowPtr pWin; win32RootlessWindowPtr pRLWinPriv; +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameSetTitle\n"); +#endif REQUEST_AT_LEAST_SIZE(xWindowsWMFrameSetTitleReq); @@ -513,7 +535,9 @@ ProcWindowsWMFrameSetTitle( { return BadValue; } +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameSetTitle - Window found\n"); +#endif title_length = stuff->title_length; title_max = (stuff->length << 2) - sizeof(xWindowsWMFrameSetTitleReq); @@ -521,7 +545,9 @@ ProcWindowsWMFrameSetTitle( if (title_max < title_length) return BadValue; +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameSetTitle - length is valid\n"); +#endif title_bytes = malloc (title_length+1); strncpy (title_bytes, (unsigned char *) &stuff[1], title_length); @@ -540,7 +566,9 @@ ProcWindowsWMFrameSetTitle( free (title_bytes); +#if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameSetTitle - done\n"); +#endif return (client->noClientException); }