redone ddraw.h to be able to mix it with w32api style COM header files.

obj_base.h is not needed anymore. Using <objbase.h> instead.
Use Xwindows.h instead of windows.h
do not include win_ms.h
remove extra definition of sleep()
Set HOME to Documents and Settings/username if not set
Use Xming basedir instead of ProjectRoot for system.XWinrc
Fix callback functions to use wBOOL instead of BOOL
Fix compiler warnings. Added debug output.
Fix warning about undefined macro max
This commit is contained in:
Alexander Gottwald 2004-12-05 21:24:48 +00:00
parent bf0a760331
commit 9bd1328c49
14 changed files with 932 additions and 834 deletions

View File

@ -1,3 +1,43 @@
2004-12-05 Alexander Gottwald <ago at freedesktop dot org>
* ddraw.h:
redone ddraw.h to be able to mix it with w32api style COM header
files.
* winmultiwindowwm.c:
* obj_base.h:
* ddraw.h:
obj_base.h is not needed anymore. Using <objbase.h> instead.
* winms.h:
Use Xwindows.h instead of windows.h
* winresource.h:
do not include win_ms.h
* win.h:
remove extra definition of sleep()
* InitOutput.c:
Set HOME to Documents and Settings/username if not set
* winprefs.c:
Use Xming basedir instead of ProjectRoot for system.XWinrc
* windialogs.c:
* winshadgdi.c:
* winprefs.c:
Fix callback functions to use wBOOL instead of BOOL
* winmultiwindowwindow.c:
* winwin32rootless.c:
* winwin32rootlesswindow.c:
* winerror.c:
Fix compiler warnings. Added debug output.
* winconfig.c:
Fix warning about undefined macro max
2004-12-03 Alexander Gottwald <ago at freedesktop dot org> 2004-12-03 Alexander Gottwald <ago at freedesktop dot org>
* windialogs.c: * windialogs.c:
@ -314,4 +354,4 @@
to prevent our window appearing twice in the clipboard chain. Also to prevent our window appearing twice in the clipboard chain. Also
detect loops when they occur and try to behave in a reasonable way. detect loops when they occur and try to behave in a reasonable way.
# vim:ts=8:noexpandtab # vim:ts=8:noexpandtab:encoding=utf8

View File

@ -41,6 +41,9 @@ from The Open Group.
#if defined(XKB) && defined(WIN32) #if defined(XKB) && defined(WIN32)
#include "XKBsrv.h" #include "XKBsrv.h"
#endif #endif
#ifdef RELOCATE_PROJECTROOT
#include <shlobj.h>
#endif
/* /*
@ -622,6 +625,14 @@ winFixupPaths (void)
buffer[sizeof(buffer)-1] = 0; buffer[sizeof(buffer)-1] = 0;
putenv(buffer); putenv(buffer);
} }
if (getenv("HOME") == NULL)
{
char buffer[MAX_PATH + 5];
strncpy(buffer, "HOME=", 5);
if(SHGetFolderPath(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0,
buffer + 5) == 0)
putenv(buffer);
}
if (!g_fLogFileChanged) { if (!g_fLogFileChanged) {
static char buffer[MAX_PATH]; static char buffer[MAX_PATH];
DWORD size = GetTempPath(sizeof(buffer), buffer); DWORD size = GetTempPath(sizeof(buffer), buffer);

File diff suppressed because it is too large Load Diff

View File

@ -140,10 +140,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifndef __CYGWIN__
#define sleep(x) Sleep(1000 * (x))
#endif
#include <errno.h> #include <errno.h>
#if defined(XWIN_MULTIWINDOWEXTWM) || defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) #if defined(XWIN_MULTIWINDOWEXTWM) || defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
#include <pthread.h> #include <pthread.h>

View File

@ -56,15 +56,15 @@ extern Bool g_fSoftwareCursor;
* Local function prototypes * Local function prototypes
*/ */
static BOOL CALLBACK static wBOOL CALLBACK
winExitDlgProc (HWND hDialog, UINT message, winExitDlgProc (HWND hDialog, UINT message,
WPARAM wParam, LPARAM lParam); WPARAM wParam, LPARAM lParam);
static BOOL CALLBACK static wBOOL CALLBACK
winChangeDepthDlgProc (HWND hDialog, UINT message, winChangeDepthDlgProc (HWND hDialog, UINT message,
WPARAM wParam, LPARAM lParam); WPARAM wParam, LPARAM lParam);
static BOOL CALLBACK static wBOOL CALLBACK
winAboutDlgProc (HWND hDialog, UINT message, winAboutDlgProc (HWND hDialog, UINT message,
WPARAM wParam, LPARAM lParam); WPARAM wParam, LPARAM lParam);
@ -295,7 +295,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
* Exit dialog window procedure * Exit dialog window procedure
*/ */
static BOOL CALLBACK static wBOOL CALLBACK
winExitDlgProc (HWND hDialog, UINT message, winExitDlgProc (HWND hDialog, UINT message,
WPARAM wParam, LPARAM lParam) WPARAM wParam, LPARAM lParam)
{ {
@ -439,7 +439,7 @@ winDisplayDepthChangeDialog (winPrivScreenPtr pScreenPriv)
* disruptive screen depth changes. * disruptive screen depth changes.
*/ */
static BOOL CALLBACK static wBOOL CALLBACK
winChangeDepthDlgProc (HWND hwndDialog, UINT message, winChangeDepthDlgProc (HWND hwndDialog, UINT message,
WPARAM wParam, LPARAM lParam) WPARAM wParam, LPARAM lParam)
{ {
@ -594,7 +594,7 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv)
* Process messages for the about dialog. * Process messages for the about dialog.
*/ */
static BOOL CALLBACK static wBOOL CALLBACK
winAboutDlgProc (HWND hwndDialog, UINT message, winAboutDlgProc (HWND hwndDialog, UINT message,
WPARAM wParam, LPARAM lParam) WPARAM wParam, LPARAM lParam)
{ {

View File

@ -93,7 +93,6 @@ OsVendorFatalError (void)
void void
winMessageBoxF (const char *pszError, UINT uType, ...) winMessageBoxF (const char *pszError, UINT uType, ...)
{ {
int i;
char * pszErrorF = NULL; char * pszErrorF = NULL;
char * pszMsgBox = NULL; char * pszMsgBox = NULL;
va_list args; va_list args;

View File

@ -30,33 +30,17 @@
* Authors: Harold L Hunt II * Authors: Harold L Hunt II
*/ */
#undef MINSHORT
#undef MAXSHORT
#undef CARD8
#undef INT32
#undef ATOM
#define NONAMELESSUNION #define NONAMELESSUNION
#define DIRECTDRAW_VERSION 0x0300 #define DIRECTDRAW_VERSION 0x0300
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif #endif
#ifndef XFree86Server #include <Xwindows.h>
#define XFree86Server
#endif
#include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#include "obj_base.h"
#include "ddraw.h" #include "ddraw.h"
/*
* Undefine unneeded Windows symbols that conflict
* with X symbols
*/
#undef CreateWindow #undef CreateWindow
#undef FreeResource
#endif /* _WINMS_H_ */ #endif /* _WINMS_H_ */

View File

@ -91,7 +91,7 @@ winCreateWindowMultiWindow (WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
#if CYGMULTIWINDOW_DEBUG #if CYGMULTIWINDOW_DEBUG
ErrorF ("winCreateWindowMultiWindow - pWin: %08x\n", pWin); ErrorF ("winCreateWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
/* Call any wrapped CreateWindow function */ /* Call any wrapped CreateWindow function */
@ -119,7 +119,7 @@ winDestroyWindowMultiWindow (WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
#if CYGMULTIWINDOW_DEBUG #if CYGMULTIWINDOW_DEBUG
ErrorF ("winDestroyWindowMultiWindow - pWin: %08x\n", pWin); ErrorF ("winDestroyWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
/* Call any wrapped DestroyWindow function */ /* Call any wrapped DestroyWindow function */
@ -161,7 +161,7 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y)
DWORD dwStyle; DWORD dwStyle;
#if CYGMULTIWINDOW_DEBUG #if CYGMULTIWINDOW_DEBUG
ErrorF ("winPositionWindowMultiWindow - pWin: %08x\n", pWin); ErrorF ("winPositionWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
/* Call any wrapped PositionWindow function */ /* Call any wrapped PositionWindow function */
@ -952,12 +952,28 @@ winAdjustXWindow (WindowPtr pWin, HWND hwnd)
x = pDraw->x + GetSystemMetrics (SM_XVIRTUALSCREEN); x = pDraw->x + GetSystemMetrics (SM_XVIRTUALSCREEN);
y = pDraw->y + GetSystemMetrics (SM_YVIRTUALSCREEN); y = pDraw->y + GetSystemMetrics (SM_YVIRTUALSCREEN);
SetRect (&rcDraw, x, y, x + pDraw->width, y + pDraw->height); SetRect (&rcDraw, x, y, x + pDraw->width, y + pDraw->height);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tDrawable extend {%d, %d, %d, %d}, {%d, %d}\n",
rcDraw.left, rcDraw.top, rcDraw.right, rcDraw.bottom,
rcDraw.right - rcDraw.left, rcDraw.bottom - rcDraw.top);
#endif
dwExStyle = GetWindowLongPtr (hwnd, GWL_EXSTYLE); dwExStyle = GetWindowLongPtr (hwnd, GWL_EXSTYLE);
dwStyle = GetWindowLongPtr (hwnd, GWL_STYLE); dwStyle = GetWindowLongPtr (hwnd, GWL_STYLE);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindowStyle: %08x %08x\n", dwStyle, dwExStyle);
#endif
AdjustWindowRectEx (&rcDraw, dwStyle, FALSE, dwExStyle); AdjustWindowRectEx (&rcDraw, dwStyle, FALSE, dwExStyle);
/* The source of adjust */ /* The source of adjust */
GetWindowRect (hwnd, &rcWin); GetWindowRect (hwnd, &rcWin);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
rcWin.left, rcWin.top, rcWin.right, rcWin.bottom,
rcWin.right - rcWin.left, rcWin.bottom - rcWin.top);
winDebug("\tDraw extend {%d, %d, %d, %d}, {%d, %d}\n",
rcDraw.left, rcDraw.top, rcDraw.right, rcDraw.bottom,
rcDraw.right - rcDraw.left, rcDraw.bottom - rcDraw.top);
#endif
if (EqualRect (&rcDraw, &rcWin)) { if (EqualRect (&rcDraw, &rcWin)) {
/* Bail if no adjust is needed */ /* Bail if no adjust is needed */

View File

@ -58,7 +58,7 @@
#endif #endif
/* Local headers */ /* Local headers */
#include "obj_base.h" #include "objbase.h"
#include "ddraw.h" #include "ddraw.h"
#include "winwindow.h" #include "winwindow.h"
#include "windowswmstr.h" #include "windowswmstr.h"

View File

@ -36,9 +36,7 @@
#endif #endif
#include "win.h" #include "win.h"
/* Fixups to prevent collisions between Windows and X headers */ #include <Xwindows.h>
#define ATOM DWORD
#include <windows.h>
#include <shellapi.h> #include <shellapi.h>
#include "winprefs.h" #include "winprefs.h"
@ -52,6 +50,8 @@
extern DWORD g_dwCurrentThreadID; extern DWORD g_dwCurrentThreadID;
#endif #endif
extern const char *winGetBaseDir(void);
/* From winmultiwindowflex.l, the real parser */ /* From winmultiwindowflex.l, the real parser */
extern void parse_file (FILE *fp); extern void parse_file (FILE *fp);
@ -171,7 +171,7 @@ MakeMenu (char *name,
* Callback routine that is executed once per window class. * Callback routine that is executed once per window class.
* Removes or creates custom window settings depending on LPARAM * Removes or creates custom window settings depending on LPARAM
*/ */
static BOOL CALLBACK static wBOOL CALLBACK
ReloadEnumWindowsProc (HWND hwnd, LPARAM lParam) ReloadEnumWindowsProc (HWND hwnd, LPARAM lParam)
{ {
HICON hicon; HICON hicon;
@ -734,10 +734,16 @@ LoadPreferences ()
/* No home file found, check system default */ /* No home file found, check system default */
if (!prefFile) if (!prefFile)
{ {
prefFile = fopen (PROJECTROOT"/lib/X11/system.XWinrc", "r"); char buffer[MAX_PATH];
#ifdef RELOCATE_PROJECTROOT
snprintf(buffer, sizeof(buffer), "%s\\system.XWinrc", winGetBaseDir());
#else
strncpy(buffer, PROJECTROOT"/lib/X11/system.XWinrc", sizeof(buffer));
#endif
buffer[sizeof(buffer)-1] = 0;
prefFile = fopen (buffer, "r");
if (prefFile) if (prefFile)
ErrorF ("winPrefsLoadPreferences: %s\n", ErrorF ("winPrefsLoadPreferences: %s\n", buffer);
PROJECTROOT"/lib/X11/system.XWinrc");
} }
/* If we could open it, then read the settings and close it */ /* If we could open it, then read the settings and close it */

View File

@ -30,8 +30,6 @@
* Authors: Harold L Hunt II * Authors: Harold L Hunt II
*/ */
#include "winms.h"
/* /*
* Local defines * Local defines

View File

@ -46,10 +46,10 @@ extern HWND g_hDlgExit;
*/ */
#ifdef XWIN_MULTIWINDOW #ifdef XWIN_MULTIWINDOW
static BOOL CALLBACK static wBOOL CALLBACK
winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam); winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam);
static BOOL CALLBACK static wBOOL CALLBACK
winRedrawDamagedWindowShadowGDI (HWND hwnd, LPARAM lParam); winRedrawDamagedWindowShadowGDI (HWND hwnd, LPARAM lParam);
#endif #endif
@ -293,7 +293,7 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen)
* Redraw all ---? * Redraw all ---?
*/ */
static BOOL CALLBACK static wBOOL CALLBACK
winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam) winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam)
{ {
if (hwnd == (HWND)lParam) if (hwnd == (HWND)lParam)
@ -303,7 +303,7 @@ winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam)
return TRUE; return TRUE;
} }
static BOOL CALLBACK static wBOOL CALLBACK
winRedrawDamagedWindowShadowGDI (HWND hwnd, LPARAM lParam) winRedrawDamagedWindowShadowGDI (HWND hwnd, LPARAM lParam)
{ {
BoxPtr pDamage = (BoxPtr)lParam; BoxPtr pDamage = (BoxPtr)lParam;

View File

@ -53,7 +53,6 @@
#define ULW_OPAQUE 0x00000004 #define ULW_OPAQUE 0x00000004
#define AC_SRC_ALPHA 0x01 #define AC_SRC_ALPHA 0x01
/* /*
* Local function * Local function
*/ */
@ -455,16 +454,29 @@ winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iNew
/* Store the origin, height, and width in a rectangle structure */ /* Store the origin, height, and width in a rectangle structure */
SetRect (&rcNew, iX, iY, iX + iWidth, iY + iHeight); SetRect (&rcNew, iX, iY, iX + iWidth, iY + iHeight);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
#endif
/* /*
* Calculate the required size of the Windows window rectangle, * Calculate the required size of the Windows window rectangle,
* given the size of the Windows window client area. * given the size of the Windows window client area.
*/ */
AdjustWindowRectEx (&rcNew, dwStyle, FALSE, dwExStyle); AdjustWindowRectEx (&rcNew, dwStyle, FALSE, dwExStyle);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
#endif
g_fNoConfigureWindow = TRUE; g_fNoConfigureWindow = TRUE;
SetWindowPos (pRLWinPriv->hWnd, NULL, rcNew.left, rcNew.top, 0, 0, SetWindowPos (pRLWinPriv->hWnd, NULL, rcNew.left, rcNew.top, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER); SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
g_fNoConfigureWindow = FALSE; g_fNoConfigureWindow = FALSE;
#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMMoveFrame (%08x) done\n", (int) pRLWinPriv);
#endif
} }
void void
@ -708,7 +720,7 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
winDebug ("\tpScreenPriv %08X\n", (int) pScreenPriv); winDebug ("\tpScreenPriv %08X\n", (int) pScreenPriv);
winDebug ("\tpScreenInfo %08X\n", (int) pScreenInfo); winDebug ("\tpScreenInfo %08X\n", (int) pScreenInfo);
winDebug ("\t(%d, %d)\n", (int)pRLWinPriv->pFrame->width, winDebug ("\t(%d, %d)\n", (int)pRLWinPriv->pFrame->width,
(int) -pRLWinPriv->pFrame->height); (int) pRLWinPriv->pFrame->height);
#endif #endif
if (pRLWinPriv->hdcScreen == NULL) if (pRLWinPriv->hdcScreen == NULL)
{ {
@ -796,10 +808,11 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
if (dibsection.dsBmih.biHeight < 0) if (dibsection.dsBmih.biHeight < 0)
{ {
/* FIXME: Figure out why biHeight is sometimes negative */ /* FIXME: Figure out why biHeight is sometimes negative */
ErrorF ("winMWExtWMStartDrawing - WEIRDNESS - biHeight " ErrorF ("winMWExtWMStartDrawing - WEIRDNESS - "
"still negative: %d\n" "biHeight still negative: %d\n",
"winAllocateFBShadowGDI - WEIRDNESS - Flipping biHeight sign\n",
(int) dibsection.dsBmih.biHeight); (int) dibsection.dsBmih.biHeight);
ErrorF ("winMWExtWMStartDrawing - WEIRDNESS - "
"Flipping biHeight sign\n");
dibsection.dsBmih.biHeight = -dibsection.dsBmih.biHeight; dibsection.dsBmih.biHeight = -dibsection.dsBmih.biHeight;
} }
@ -829,8 +842,8 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
{ {
ErrorF ("winMWExtWMStartDrawing - Already window was destroyed \n"); ErrorF ("winMWExtWMStartDrawing - Already window was destroyed \n");
} }
#if CYGMULTIWINDOW_DEBUG && FALSE #if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - done (0x08%x) 0x%08x %d\n", winDebug ("winMWExtWMStartDrawing - done (0x%08x) 0x%08x %d\n",
(int) pRLWinPriv, (int) pRLWinPriv,
(unsigned int)pRLWinPriv->pfb, (unsigned int)pRLWinPriv->dwWidthBytes); (unsigned int)pRLWinPriv->pfb, (unsigned int)pRLWinPriv->dwWidthBytes);
#endif #endif

View File

@ -106,10 +106,10 @@ winMWExtWMReorderWindows (ScreenPtr pScreen)
void void
winMWExtWMMoveXWindow (WindowPtr pWin, int x, int y) winMWExtWMMoveXWindow (WindowPtr pWin, int x, int y)
{ {
XID *vlist = malloc(sizeof(long)*2); CARD32 *vlist = malloc(sizeof(CARD32)*2);
(CARD32*)vlist[0] = x; vlist[0] = x;
(CARD32*)vlist[1] = y; vlist[1] = y;
ConfigureWindow (pWin, CWX | CWY, vlist, wClient(pWin)); ConfigureWindow (pWin, CWX | CWY, vlist, wClient(pWin));
free(vlist); free(vlist);
} }
@ -122,10 +122,10 @@ winMWExtWMMoveXWindow (WindowPtr pWin, int x, int y)
void void
winMWExtWMResizeXWindow (WindowPtr pWin, int w, int h) winMWExtWMResizeXWindow (WindowPtr pWin, int w, int h)
{ {
XID *vlist = malloc(sizeof(long)*2); CARD32 *vlist = malloc(sizeof(CARD32)*2);
(CARD32*)vlist[0] = w; vlist[0] = w;
(CARD32*)vlist[1] = h; vlist[1] = h;
ConfigureWindow (pWin, CWWidth | CWHeight, vlist, wClient(pWin)); ConfigureWindow (pWin, CWWidth | CWHeight, vlist, wClient(pWin));
free(vlist); free(vlist);
} }
@ -138,12 +138,12 @@ winMWExtWMResizeXWindow (WindowPtr pWin, int w, int h)
void void
winMWExtWMMoveResizeXWindow (WindowPtr pWin, int x, int y, int w, int h) winMWExtWMMoveResizeXWindow (WindowPtr pWin, int x, int y, int w, int h)
{ {
XID *vlist = malloc(sizeof(long)*4); CARD32 *vlist = malloc(sizeof(long)*4);
(CARD32*)vlist[0] = x; vlist[0] = x;
(CARD32*)vlist[1] = y; vlist[1] = y;
(CARD32*)vlist[2] = w; vlist[2] = w;
(CARD32*)vlist[3] = h; vlist[3] = h;
ConfigureWindow (pWin, CWX | CWY | CWWidth | CWHeight, vlist, wClient(pWin)); ConfigureWindow (pWin, CWX | CWY | CWWidth | CWHeight, vlist, wClient(pWin));
free(vlist); free(vlist);
@ -272,12 +272,22 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
pRLWinPriv->pFrame->x + pRLWinPriv->pFrame->width, pRLWinPriv->pFrame->x + pRLWinPriv->pFrame->width,
pRLWinPriv->pFrame->y + pRLWinPriv->pFrame->height); pRLWinPriv->pFrame->y + pRLWinPriv->pFrame->height);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
#endif
/* */ /* */
AdjustWindowRectEx (&rcNew, AdjustWindowRectEx (&rcNew,
WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW, WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW,
FALSE, FALSE,
WS_EX_APPWINDOW); WS_EX_APPWINDOW);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
#endif
/* Calculate position deltas */ /* Calculate position deltas */
iDx = pRLWinPriv->pFrame->x - rcNew.left; iDx = pRLWinPriv->pFrame->x - rcNew.left;
iDy = pRLWinPriv->pFrame->y - rcNew.top; iDy = pRLWinPriv->pFrame->y - rcNew.top;
@ -295,12 +305,23 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
SetWindowLongPtr (pRLWinPriv->hWnd, GWL_STYLE, SetWindowLongPtr (pRLWinPriv->hWnd, GWL_STYLE,
WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW); WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW);
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindowStyle: %08x %08x\n",
WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW,
WS_EX_APPWINDOW);
#endif
/* Position the Windows window */ /* Position the Windows window */
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tMoved {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
#endif
SetWindowPos (pRLWinPriv->hWnd, NULL, SetWindowPos (pRLWinPriv->hWnd, NULL,
rcNew.left, rcNew.top, rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
showCmd); showCmd);
wmMsg.hwndWindow = pRLWinPriv->hWnd; wmMsg.hwndWindow = pRLWinPriv->hWnd;
wmMsg.iWindow = (Window)pRLWinPriv->pFrame->win->drawable.id; wmMsg.iWindow = (Window)pRLWinPriv->pFrame->win->drawable.id;
wmMsg.msg = WM_WM_NAME_EVENT; wmMsg.msg = WM_WM_NAME_EVENT;