aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-28 15:43:29 +0000
committermarha <marha@users.sourceforge.net>2011-01-28 15:43:29 +0000
commitb3be16ace28c0a51052c3b76162efbab811abf84 (patch)
tree72aca06573b4901ee11033a54c837ae857b94481 /xorg-server
parent3dc6a410655083df5831c5b607c2bb0626446aca (diff)
parentc4d402326310d620866b1ad82ef0691526e2c311 (diff)
downloadvcxsrv-b3be16ace28c0a51052c3b76162efbab811abf84.tar.gz
vcxsrv-b3be16ace28c0a51052c3b76162efbab811abf84.tar.bz2
vcxsrv-b3be16ace28c0a51052c3b76162efbab811abf84.zip
Enabled ROOTLESS option in dix (currenlty not really used)
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/xwin/InitOutput.c2
-rw-r--r--xorg-server/hw/xwin/glx/makefile6
-rw-r--r--xorg-server/hw/xwin/makefile145
-rw-r--r--xorg-server/hw/xwin/win.h12
-rw-r--r--xorg-server/hw/xwin/winengine.c6
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c19
-rw-r--r--xorg-server/hw/xwin/winprocarg.c6
-rw-r--r--xorg-server/hw/xwin/winscrinit.c4
-rw-r--r--xorg-server/hw/xwin/winwin32rootless.c116
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswindow.c13
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswndproc.c126
-rw-r--r--xorg-server/hw/xwin/winwndproc.c6
-rw-r--r--xorg-server/makefile1
14 files changed, 228 insertions, 236 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 12e2743c1..8d5f4dbfb 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -774,7 +774,7 @@ winUseMsg (void)
ErrorF ("-ignoreinput\n"
"\tIgnore keyboard and mouse input.\n");
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
ErrorF ("-internalwm\n"
"\tRun the internal window manager.\n");
#endif
diff --git a/xorg-server/hw/xwin/glx/makefile b/xorg-server/hw/xwin/glx/makefile
index e52da16a1..6d1cbeb21 100644
--- a/xorg-server/hw/xwin/glx/makefile
+++ b/xorg-server/hw/xwin/glx/makefile
@@ -5,10 +5,10 @@ DEFINES += GLAPIENTRY=__stdcall _GLAPI_NO_EXPORTS
DEFINES += XWIN_CLIPBOARD
DEFINES += XWIN_MULTIWINDOW
-DEFINES += XWIN_NATIVEGDI
-DEFINES += XWIN_RANDR RELOCATE_PROJECTROOT
+DEFINES += XWIN_RANDR
+DEFINES += RELOCATE_PROJECTROOT
INCLUDES += ..\..\..\miext\rootless
-DEFINES += HAVE_XWIN_CONFIG_H BUILD_DATE=0-0-0000 PTW32_STATIC_LIB
+DEFINES += HAVE_XWIN_CONFIG_H PTW32_STATIC_LIB
CSRCS = \
winpriv.c \
diff --git a/xorg-server/hw/xwin/makefile b/xorg-server/hw/xwin/makefile
index 62867368c..d1d95274d 100644
--- a/xorg-server/hw/xwin/makefile
+++ b/xorg-server/hw/xwin/makefile
@@ -1,5 +1,15 @@
LIBRARY = libXWin
+XWIN_MULTIWINDOW=1
+XWIN_CLIPBOARD=1
+XWIN_MULTIWINDOWEXTWM=0 # currently not working correctly
+XWIN_MULTIWINDOWINTWM=0 # currently not working correctly
+XWIN_RANDR=1
+XWIN_NATIVEGDI=0 # currently not working correctly
+XWIN_PRIMARYFB=0 # currently not working correctly
+XWIN_GLX_WINDOWS=0 # everything is in the glx makefile
+
+if XWIN_CLIPBOARD
SRCS_CLIPBOARD = \
winclipboardinit.c \
winclipboardtextconv.c \
@@ -8,46 +18,69 @@ SRCS_CLIPBOARD = \
winclipboardwndproc.c \
winclipboardwrappers.c \
winclipboardxevents.c
+DEFS_CLIPBOARD = -DXWIN_CLIPBOARD
+endif
-DEFINES += XWIN_CLIPBOARD
+if XWIN_GLX_WINDOWS
+GLX_DIR = glx
+DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS
+XWIN_GLX_LIBS = $(top_builddir)/hw/xwin/glx/libXwinGLX.la
+XWIN_GLX_LINK_FLAGS = -lopengl32
+endif
+if XWIN_MULTIWINDOW
SRCS_MULTIWINDOW = \
winmultiwindowshape.c \
winmultiwindowwindow.c \
winmultiwindowwm.c \
winmultiwindowwndproc.c
-
-DEFINES += XWIN_MULTIWINDOW
-
-#SRCS_MULTIWINDOWEXTWM = \
-# winwin32rootless.c \
-# winwin32rootlesswindow.c \
-# winwin32rootlesswndproc.c \
-# winwindowswm.c
-#DEFINES += XWIN_MULTIWINDOWEXTWM
-
-#SRCS_NATIVEGDI = \
-# winclip.c \
-# winfillsp.c \
-# winfont.c \
-# wingc.c \
-# wingetsp.c \
-# winnativegdi.c \
-# winpixmap.c \
-# winpolyline.c \
-# winrop.c \
-# winsetsp.c
-#DEFINES += XWIN_NATIVEGDI
-
-#SRCS_PRIMARYFB = \
-# winpfbdd.c
-#DEFINES += XWIN_PRIMARYFB
-
+DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
+endif
+
+if XWIN_MULTIWINDOWEXTWM
+SRCS_MULTIWINDOWEXTWM = \
+ winwin32rootless.c \
+ winwin32rootlesswindow.c \
+ winwin32rootlesswndproc.c \
+ winwindowswm.c
+DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
+MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la
+endif
+
+if XWIN_NATIVEGDI
+SRCS_NATIVEGDI = \
+ winclip.c \
+ winfillsp.c \
+ winfont.c \
+ wingc.c \
+ wingetsp.c \
+ winnativegdi.c \
+ winpixmap.c \
+ winpolyline.c \
+ winrop.c \
+ winsetsp.c
+DEFS_NATIVEGDI = -DXWIN_NATIVEGDI
+endif
+
+if XWIN_PRIMARYFB
+SRCS_PRIMARYFB = \
+ winpfbdd.c
+DEFS_PRIMARYFB = -DXWIN_PRIMARYFB
+endif
+
+if XWIN_RANDR
SRCS_RANDR = \
winrandr.c
-DEFINES += XWIN_RANDR RELOCATE_PROJECTROOT
+DEFS_RANDR = -DXWIN_RANDR
+endif
+
+if XWIN_XV
+SRCS_XV = \
+ winvideo.c
+DEFS_XV = -DXWIN_XV
+endif
-CSRCS = InitInput.c \
+SRCS = InitInput.c \
InitOutput.c \
winallpriv.c \
winauth.c \
@@ -69,6 +102,8 @@ CSRCS = InitInput.c \
winmultiwindowclass.c \
winmultiwindowicons.c \
winprefs.c \
+ winprefsyacc.y \
+ winprefslex.l \
winprocarg.c \
winregistry.c \
winscrinit.c \
@@ -79,42 +114,58 @@ CSRCS = InitInput.c \
winvalargs.c \
winwakeup.c \
winwindow.c \
- winprefslex.c \
- winprefsyacc.c \
winwndproc.c \
+ ddraw.h \
+ winclipboard.h \
+ winconfig.h \
+ win.h \
+ winkeybd.h \
+ winkeynames.h \
+ winlayouts.h \
+ winmessages.h \
+ winmsg.h \
+ winms.h \
+ winmultiwindowclass.h \
+ winprefs.h \
+ winresource.h \
+ winwindow.h \
windisplay.c \
+ XWin.rc \
$(SRCS_CLIPBOARD) \
$(SRCS_MULTIWINDOW) \
$(SRCS_MULTIWINDOWEXTWM) \
$(SRCS_NATIVEGDI) \
$(SRCS_PRIMARYFB) \
$(SRCS_RANDR) \
+ $(SRCS_XV)
+CSRCS=$(filter %.c,$(SRCS)) $(filter %.y,$(SRCS)) $(filter %.l,$(SRCS))
+CSRCS := $(CSRCS:%.y=%.c)
+CSRCS := $(CSRCS:%.l=%.c)
-DEFINES += YY_NO_UNISTD_H
+ DEFS = $(DEFS_CLIPBOARD) \
+ $(DEFS_GLX_WINDOWS) \
+ $(DEFS_MULTIWINDOW) \
+ $(DEFS_MULTIWINDOWEXTWM) \
+ $(DEFS_NATIVEGDI) \
+ $(DEFS_PRIMARYFB) \
+ $(DEFS_RANDR) \
+ $(DEFS_XV)
-# XWin.rc \
-# $(top_srcdir)/Xext/dpmsstubs.c \
-# $(top_srcdir)/Xi/stubs.c \
-# $(top_srcdir)/mi/miinitext.c \
-# $(top_srcdir)/fb/fbcmap_mi.c \
-# $(SRCS_PRIMARYFB) \
-# $(SRCS_XV)
+DEFINES += $(DEFS:-D%=%) HAVE_XWIN_CONFIG_H PTW32_STATIC_LIB RELOCATE_PROJECTROOT
INCLUDES += ..\..\miext\rootless
-#.rc.o:
-# $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include -DPROJECT_NAME=\"$(VENDOR_NAME_SHORT)\" -DPROJECT_VERSION=\"$(PACKAGE_VERSION)\" -DBUILD_DATE=\"$(BUILD_DATE)\"
-DEFINES += HAVE_XWIN_CONFIG_H BUILD_DATE=0-0-0000 PTW32_STATIC_LIB
-
-#CSRCS=winkeybd.c
INCLUDES += $(OBJDIR)
+AM_YFLAGS = -d
+AM_LFLAGS = -i
+
$(OBJDIR)\winprefslex.c: winprefslex.l $(OBJDIR)\winprefsyacc.h
- flex -i -o$@ $<
+ flex $(AM_LFLAGS) -o$@ $<
$(OBJDIR)\winprefsyacc.c $(OBJDIR)\winprefsyacc.h: winprefsyacc.y
- bison -d -o$(OBJDIR)\winprefsyacc.c $<
+ bison $(AM_YFLAGS) -o$(OBJDIR)\winprefsyacc.c $<
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index 00261d163..f24bc399a 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -395,9 +395,11 @@ typedef struct
Bool fDecoration;
#ifdef XWIN_MULTIWINDOWEXTWM
Bool fMWExtWM;
- Bool fInternalWM;
Bool fAnotherWMRunning;
#endif
+#ifdef XWIN_MULTIWINDOWINTWM
+ Bool fInternalWM;
+#endif
Bool fRootless;
#ifdef XWIN_MULTIWINDOW
Bool fMultiWindow;
@@ -1393,13 +1395,13 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
wBOOL CALLBACK
winMWExtWMDecorateWindow (HWND hwnd, LPARAM lParam);
-Bool
-winIsInternalWMRunning (winScreenInfoPtr pScreenInfo);
-
void
winMWExtWMRestackWindows (ScreenPtr pScreen);
#endif
-
+#ifdef XWIN_MULTIWINDOWINTWM
+Bool
+winIsInternalWMRunning (winScreenInfoPtr pScreenInfo);
+#endif
#ifdef XWIN_MULTIWINDOWEXTWM
/*
diff --git a/xorg-server/hw/xwin/winengine.c b/xorg-server/hw/xwin/winengine.c
index a1fecacdd..d9d0d476c 100644
--- a/xorg-server/hw/xwin/winengine.c
+++ b/xorg-server/hw/xwin/winengine.c
@@ -212,8 +212,8 @@ winSetEngine (ScreenPtr pScreen)
return TRUE;
}
- /* If the user's choice is supported, we'll use that */
- if (g_dwEnginesSupported & pScreenInfo->dwEnginePreferred)
+ /* If there is a user's choice, we'll use that */
+ if (pScreenInfo->dwEnginePreferred)
{
winDebug ("winSetEngine - Using user's preference: %d\n",
(int) pScreenInfo->dwEnginePreferred);
@@ -242,7 +242,7 @@ winSetEngine (ScreenPtr pScreen)
break;
#endif
default:
- FatalError ("winSetEngine - Invalid engine type\n");
+ FatalError ("winSetEngine - Invalid engine type %d\n",pScreenInfo->dwEngine);
}
return TRUE;
}
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 42b2d6221..6c7debd15 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -808,7 +808,7 @@ winMinimizeWindow (Window id)
if (pScreen) pScreenPriv = winGetScreenPriv(pScreen);
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
if (pScreenPriv && pScreenInfo->fInternalWM)
{
pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin, FALSE);
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 0f3e36504..03951ee8d 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -69,6 +69,7 @@ typedef int pid_t;
#include "winmultiwindowclass.h"
#ifdef XWIN_MULTIWINDOWEXTWM
+#define _WINDOWSWM_SERVER_
#include <X11/extensions/windowswmstr.h>
#else
/* We need the native HWND atom for intWM, so for consistency use the
@@ -115,7 +116,9 @@ typedef struct _WMInfo {
Atom atmWmProtos;
Atom atmWmDelete;
Atom atmPrivMap;
+#ifdef XWIN_MULTIWINDOWINTWM
Bool fAllowOtherWM;
+#endif
} WMInfoRec, *WMInfoPtr;
typedef struct _WMProcArgRec {
@@ -591,11 +594,13 @@ winMultiWindowWMProc (void *pArg)
{
WMMsgNodePtr pNode;
+#ifdef XWIN_MULTIWINDOWINTWM
if(g_fAnotherWMRunning)/* Another Window manager exists. */
{
Sleep (1000);
continue;
}
+#endif
/* Pop a message off of our queue */
pNode = PopMessage (&pWMInfo->wmMsgQueue, pWMInfo);
@@ -891,9 +896,17 @@ winMultiWindowXMsgProc (void *pArg)
"successfully opened the display.\n");
/* Check if another window manager is already running */
+#ifdef XWIN_MULTIWINDOWINTWM
g_fAnotherWMRunning = CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, pProcArg->pWMInfo->fAllowOtherWM);
+#else
+ g_fAnotherWMRunning = CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, FALSE);
+#endif
- if (g_fAnotherWMRunning && !pProcArg->pWMInfo->fAllowOtherWM)
+ if (g_fAnotherWMRunning
+#ifdef XWIN_MULTIWINDOWINTWM
+ && !pProcArg->pWMInfo->fAllowOtherWM
+#endif
+ )
{
ErrorF ("winMultiWindowXMsgProc - "
"another window manager is running. Exiting.\n");
@@ -940,6 +953,7 @@ winMultiWindowXMsgProc (void *pArg)
if (g_shutdown)
break;
+#ifdef XWIN_MULTIWINDOWINTWM
if (pProcArg->pWMInfo->fAllowOtherWM && !XPending (pProcArg->pDisplay))
{
if (CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, TRUE))
@@ -961,6 +975,7 @@ winMultiWindowXMsgProc (void *pArg)
Sleep (500);
continue;
}
+#endif
/* Fetch next event */
XNextEvent (pProcArg->pDisplay, &event);
@@ -1138,7 +1153,9 @@ winInitWM (void **ppWMInfo,
/* Set a return pointer to the Window Manager info structure */
*ppWMInfo = pWMInfo;
+#ifdef XWIN_MULTIWINDOWINTWM
pWMInfo->fAllowOtherWM = allowOtherWM;
+#endif
/* Setup the argument structure for the thread function */
pArg->dwScreen = dwScreen;
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c
index e637ec581..96db9fec2 100644
--- a/xorg-server/hw/xwin/winprocarg.c
+++ b/xorg-server/hw/xwin/winprocarg.c
@@ -113,6 +113,8 @@ winInitializeScreenDefaults(void)
defaultScreenInfo.fDecoration = TRUE;
#ifdef XWIN_MULTIWINDOWEXTWM
defaultScreenInfo.fMWExtWM = FALSE;
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
defaultScreenInfo.fInternalWM = FALSE;
#endif
defaultScreenInfo.fRootless = FALSE;
@@ -573,7 +575,9 @@ ddxProcessArgument (int argc, char *argv[], int i)
/* Indicate that we have processed this argument */
return 1;
}
- /*
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
+ /*
* Look for the '-internalwm' argument
*/
if (IS_OPTION ("-internalwm"))
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index bcae2ddac..c67eb6de8 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -563,7 +563,7 @@ winFinishScreenInitFB (int index,
#ifdef XWIN_MULTIWINDOW
|| pScreenInfo->fMultiWindow
#endif
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
|| pScreenInfo->fInternalWM
#endif
)
@@ -577,7 +577,7 @@ winFinishScreenInitFB (int index,
&pScreenPriv->pmServerStarted,
pScreenInfo->dwScreen,
(HWND)&pScreenPriv->hwndScreen,
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
pScreenInfo->fInternalWM ||
#endif
FALSE))
diff --git a/xorg-server/hw/xwin/winwin32rootless.c b/xorg-server/hw/xwin/winwin32rootless.c
index f638c9891..e1c2da7f4 100644
--- a/xorg-server/hw/xwin/winwin32rootless.c
+++ b/xorg-server/hw/xwin/winwin32rootless.c
@@ -83,7 +83,7 @@ Bool
winMWExtWMQueryDIBFormat (win32RootlessWindowPtr pRLWinPriv, BITMAPINFOHEADER *pbmih)
{
HBITMAP hbmp;
-#if CYGMULTIWINDOW_DEBUG
+#ifdef _DEBUG
LPDWORD pdw = NULL;
#endif
@@ -112,7 +112,7 @@ winMWExtWMQueryDIBFormat (win32RootlessWindowPtr pRLWinPriv, BITMAPINFOHEADER *p
return FALSE;
}
-#if CYGMULTIWINDOW_DEBUG
+#ifdef _DEBUG
/* Get a pointer to bitfields */
pdw = (DWORD*) ((CARD8*)pbmih + sizeof (BITMAPINFOHEADER));
@@ -228,10 +228,8 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
char *res_name, *res_class, *res_role;
static int s_iWindowID = 0;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCreateFrame %d %d - %d %d\n",
newX, newY, pFrame->width, pFrame->height);
-#endif
pRLWinPriv = (win32RootlessWindowPtr) malloc (sizeof (win32RootlessWindowRec));
pRLWinPriv->pFrame = pFrame;
@@ -282,9 +280,7 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
pszWindowID[sizeof(pszWindowID)-1] = 0;
strcat (pszClass, pszWindowID);
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winCreateWindowsWindow - Creating class: %s\n", pszClass);
-#endif
/* Setup our window class */
wc.cbSize = sizeof(wc);
@@ -332,28 +328,8 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
winMWExtWMReshapeFrame (pFrame->wid, pShape);
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCreateFrame - (%08x) %08x\n",
(int) pFrame->wid, (int) pRLWinPriv->hWnd);
-#if 0
- {
- WindowPtr pWin2 = NULL;
- win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
- /* Check if the Windows window property for our X window pointer is valid */
- if ((pWin2 = (WindowPtr)GetProp (pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL)
- {
- pRLWinPriv2 = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin2, FALSE);
- }
- winDebug ("winMWExtWMCreateFrame2 (%08x) %08x\n",
- pRLWinPriv2, pRLWinPriv2->hWnd);
- if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd)
- {
- winDebug ("Error param missmatch\n");
- }
- }
-#endif
-#endif
winMWExtWMSetNativeProperty (pFrame);
@@ -364,40 +340,19 @@ void
winMWExtWMDestroyFrame (RootlessFrameID wid)
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
- HICON hicon;
- HICON hiconSm;
+ HICON hiconClass;
+ HICON hiconSmClass;
HMODULE hInstance;
int iReturn;
char pszClass[CLASS_NAME_LENGTH];
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFrame (%08x) %08x\n",
(int) pRLWinPriv, (int) pRLWinPriv->hWnd);
-#if 0
- {
- WindowPtr pWin2 = NULL;
- win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
- /* Check if the Windows window property for our X window pointer is valid */
- if ((pWin2 = (WindowPtr)GetProp (pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL)
- {
- pRLWinPriv2 = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin2, FALSE);
- }
- winDebug ("winMWExtWMDestroyFrame2 (%08x) %08x\n",
- pRLWinPriv2, pRLWinPriv2->hWnd);
- if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd)
- {
- winDebug ("Error param missmatch\n");
- *(int*)0 = 1;//raise exseption
- }
- }
-#endif
-#endif
/* Store the info we need to destroy after this window is gone */
hInstance = (HINSTANCE) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HMODULE);
- hicon = (HICON) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HICON);
- hiconSm = (HICON) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HICONSM);
+ hiconClass = (HICON) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HICON);
+ hiconSmClass = (HICON) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HICONSM);
iReturn = GetClassName (pRLWinPriv->hWnd, pszClass, CLASS_NAME_LENGTH);
pRLWinPriv->fClose = TRUE;
@@ -409,22 +364,16 @@ winMWExtWMDestroyFrame (RootlessFrameID wid)
/* Only if we were able to get the name */
if (iReturn)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFrame - Unregistering %s: ", pszClass);
-#endif
iReturn = UnregisterClass (pszClass, hInstance);
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFramew - %d Deleting Icon: ", iReturn);
-#endif
}
winDestroyIcon(hiconClass);
winDestroyIcon(hiconSmClass);
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFrame - done\n");
-#endif
}
void
@@ -436,9 +385,7 @@ winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iNew
DWORD dwStyle;
int iX, iY, iWidth, iHeight;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMMoveFrame (%08x) (%d %d)\n", (int) pRLWinPriv, iNewX, iNewY);
-#endif
/* Get the Windows window style and extended style */
dwExStyle = GetWindowLongPtr (pRLWinPriv->hWnd, GWL_EXSTYLE);
@@ -455,29 +402,23 @@ winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iNew
/* Store the origin, height, and width in a rectangle structure */
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,
* given the size of the Windows window client area.
*/
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;
SetWindowPos (pRLWinPriv->hWnd, NULL, rcNew.left, rcNew.top, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
g_fNoConfigureWindow = FALSE;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMMoveFrame (%08x) done\n", (int) pRLWinPriv);
-#endif
}
void
@@ -493,10 +434,8 @@ winMWExtWMResizeFrame (RootlessFrameID wid, ScreenPtr pScreen,
DWORD dwStyle;
int iX, iY;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMResizeFrame (%08x) (%d %d)-(%d %d)\n",
(int) pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight);
-#endif
pRLWinPriv->fResized = TRUE;
@@ -545,9 +484,9 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
HWND hWnd;
Bool fFirst = TRUE;
Bool fNeedRestack = TRUE;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv);
-#endif
+
if (pScreenPriv->fRestacking) return;
@@ -561,19 +500,17 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
if (pRLNextWinPriv == NULL)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x is top\n", pRLWinPriv);
-#endif
pScreenPriv->widTop = wid;
SetWindowPos (pRLWinPriv->hWnd, HWND_TOP,
0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
}
+#ifdef XWIN_MULTIWINDOWINTWM
else if (winIsInternalWMRunning(pScreenInfo))
{
/* using mulwinidow wm */
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x is not top\n", pRLWinPriv);
-#endif
+
for (hWnd = GetNextWindow (pRLWinPriv->hWnd, GW_HWNDPREV);
fNeedRestack && hWnd != NULL;
hWnd = GetNextWindow (hWnd, GW_HWNDPREV))
@@ -588,18 +525,15 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
/* Enable interleave X window and Windows window */
if (!fFirst)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("raise: Insert after Win %08x\n", pRLNextWinPriv);
-#endif
+
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
}
else
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("No change\n");
-#endif
}
fNeedRestack = FALSE;
break;
@@ -619,9 +553,8 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
{
if (hWnd == pRLNextWinPriv->hWnd)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("lower: Insert after Win %08x\n", pRLNextWinPriv);
-#endif
+
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
@@ -631,19 +564,16 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
}
}
}
- else
+#endif
+ else
{
/* using general wm like twm, wmaker etc.
Interleave X window and Windows window will cause problem. */
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
-#if 0
-#endif
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv);
-#endif
pRLWinPriv->fRestackingNow = FALSE;
}
@@ -654,9 +584,8 @@ winMWExtWMReshapeFrame (RootlessFrameID wid, RegionPtr pShape)
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
HRGN hRgn, hRgnWindow, hRgnClient;
RECT rcWindow, rcClient;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMReshapeFrame (%08x)\n", (int) pRLWinPriv);
-#endif
hRgn = winMWExtWMCreateRgnFromRegion (pShape);
@@ -683,9 +612,8 @@ void
winMWExtWMUnmapFrame (RootlessFrameID wid)
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMUnmapFrame (%08x)\n", (int) pRLWinPriv);
-#endif
g_fNoConfigureWindow = TRUE;
//ShowWindow (pRLWinPriv->hWnd, SW_MINIMIZE);
@@ -707,9 +635,8 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
Bool fReturn = TRUE;
HDC hdcNew;
HBITMAP hbmpNew;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMStartDrawing (%08x) %08x\n", (int) pRLWinPriv, pRLWinPriv->fDestroyed);
-#endif
if (!pRLWinPriv->fDestroyed)
{
@@ -717,12 +644,11 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
if (pScreen) pScreenPriv = winGetScreenPriv(pScreen);
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tpScreenPriv %08X\n", (int) pScreenPriv);
winDebug ("\tpScreenInfo %08X\n", (int) pScreenInfo);
winDebug ("\t(%d, %d)\n", (int)pRLWinPriv->pFrame->width,
(int) pRLWinPriv->pFrame->height);
-#endif
+
if (pRLWinPriv->hdcScreen == NULL)
{
InitWin32RootlessEngine (pRLWinPriv);
@@ -762,15 +688,12 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
}
else
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - Shadow buffer allocated\n");
-#endif
}
/* Get information about the bitmap that was allocated */
GetObject (hbmpNew, sizeof (dibsection), &dibsection);
-#if CYGMULTIWINDOW_DEBUG
/* Print information about bitmap allocated */
winDebug ("winMWExtWMStartDrawing - Dibsection width: %d height: %d "
"depth: %d size image: %d\n",
@@ -778,14 +701,11 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
(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 CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - Attempting a shadow blit\n");
-#endif
/* Blit from the old shadow to the new shadow */
fReturn = BitBlt (hdcNew,
diff --git a/xorg-server/hw/xwin/winwin32rootlesswindow.c b/xorg-server/hw/xwin/winwin32rootlesswindow.c
index 60e1f8bea..bfb35e70f 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswindow.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswindow.c
@@ -230,23 +230,18 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
/* Get current window placement */
GetWindowPlacement (pRLWinPriv->hWnd, &wndPlace);
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
if (!pRLWinPriv->pFrame->win->overrideRedirect)
fDecorate = TRUE;
}
-#if 0
- if (wndPlace.showCmd == SW_HIDE)
- return;//showCmd = SWP_HIDEWINDOW;
- else
- showCmd = SWP_SHOWWINDOW;
-#else
+#endif
if (wndPlace.showCmd == SW_HIDE)
return;
if (IsWindowVisible (pRLWinPriv->hWnd))
showCmd = SWP_SHOWWINDOW;
-#endif
showCmd |= SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER;
@@ -388,7 +383,7 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
}
}
-
+#ifdef XWIN_MULTIWINDOWINTWM
/*
* winIsInternalWMRunning (winScreenInfoPtr pScreenInfo)
*/
@@ -397,7 +392,7 @@ winIsInternalWMRunning (winScreenInfoPtr pScreenInfo)
{
return pScreenInfo->fInternalWM && !pScreenInfo->fAnotherWMRunning;
}
-
+#endif
/*
* winMWExtWMRestackWindows
diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
index 1c3583594..c8a6e66c3 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
@@ -456,9 +456,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_CLOSE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_CLOSE %d\n", pRLWinPriv->fClose);
-#endif
+
/* Tell window-manager to close window */
if (pRLWinPriv->fClose)
{
@@ -466,6 +465,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
else
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
/* Tell our Window Manager thread to kill the window */
@@ -473,6 +473,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -692,23 +693,24 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_MOUSEACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_MOUSEACTIVATE\n");
-#endif
-#if 1
+
+#ifdef XWIN_MULTIWINDOWINTWM
/* Check if this window needs to be made active when clicked */
if (winIsInternalWMRunning(pScreenInfo) && pWin->overrideRedirect)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_MOUSEACTIVATE - "
"MA_NOACTIVATE\n");
-#endif
/* */
return MA_NOACTIVATE;
}
#endif
- if (!winIsInternalWMRunning(pScreenInfo) && !IsMouseActive (pWin))
+ if (
+#ifdef XWIN_MULTIWINDOWINTWM
+ !winIsInternalWMRunning(pScreenInfo) &&
+#endif
+ !IsMouseActive (pWin))
return MA_NOACTIVATE;
break;
@@ -818,11 +820,10 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_ACTIVATE\n");
-#endif
if (LOWORD(wParam) != WA_INACTIVE)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
#if 0
@@ -837,6 +838,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (!pWin || !pWin->overrideRedirect) /* for OOo menus */
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -854,24 +856,23 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
{
if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x is now restacking.\n", (unsigned int)pRLWinPriv);
-#endif
break;
}
- if (winIsInternalWMRunning(pScreenInfo) || IsRaiseOnClick (pWin))
+ if (
+#ifdef XWIN_MULTIWINDOWINTWM
+ winIsInternalWMRunning(pScreenInfo) ||
+#endif
+ IsRaiseOnClick (pWin))
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n", (unsigned int)pRLWinPriv);
-#endif
break;
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x forbid to change z order (%08x).\n",
(unsigned int)pRLWinPriv, (unsigned int)pWinPos->hwndInsertAfter);
-#endif
+
pWinPos->flags |= SWP_NOZORDER;
}
break;
@@ -904,14 +905,14 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
#endif
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\t(%d, %d)\n", (short) LOWORD(lParam), (short) HIWORD(lParam));
-#endif
+
if (!pRLWinPriv->fMovingOrSizing)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveXWindow (pWin,
(LOWORD(lParam) - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN)),
@@ -921,14 +922,14 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_SHOWWINDOW:
-#if CYGMULTIWINDOW_DEBUG || TRUE
winDebug ("winMWExtWMWindowProc - WM_SHOWWINDOW - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
+
/* Bail out if the window is being hidden */
if (!wParam)
return 0;
+#ifdef XWIN_MULTIWINDOWINTWM
if (!pScreenInfo->fInternalWM)//XXXX
return 0;
@@ -936,9 +937,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (winIsInternalWMRunning(pScreenInfo))
{
-#if CYGMULTIWINDOW_DEBUG || TRUE
winDebug ("\tMapWindow\n");
-#endif
+
/* Tell X to map the window */
MapWindow (pWin, wClient(pWin));
@@ -955,6 +955,9 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#else
+ return 0;
+#endif
break;
case WM_SIZING:
@@ -965,7 +968,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
case WM_WINDOWPOSCHANGED:
{
pWinPos = (LPWINDOWPOS) lParam;
-#if CYGMULTIWINDOW_DEBUG
+#ifdef _DEBUG
winDebug("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED\n");
winDebug("\tflags: %s%s%s%s%s%s%s%s%s%s%s%s\n",
(pWinPos->flags & SWP_DRAWFRAME)?"SWP_DRAWFRAME ":"",
@@ -987,22 +990,21 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
#endif
if (pWinPos->flags & SWP_HIDEWINDOW) break;
+#ifdef XWIN_MULTIWINDOWINTWM
/* Reorder if window z order was changed */
if ((pScreenPriv != NULL)
&& !(pWinPos->flags & SWP_NOZORDER)
&& !(pWinPos->flags & SWP_SHOWWINDOW)
&& winIsInternalWMRunning(pScreenInfo))
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\twindow z order was changed\n");
-#endif
+
if (pWinPos->hwndInsertAfter == HWND_TOP
||pWinPos->hwndInsertAfter == HWND_TOPMOST
||pWinPos->hwndInsertAfter == HWND_NOTOPMOST)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\traise to top\n");
-#endif
+
/* Raise the window to the top in Z order */
wmMsg.msg = WM_WM_RAISE;
if (fWMMsgInitialized)
@@ -1036,9 +1038,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
raise it in X stack. */
if (hWndAbove == NULL)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\traise to top\n");
-#endif
+
/* Raise the window to the top in Z order */
wmMsg.msg = WM_WM_RAISE;
if (fWMMsgInitialized)
@@ -1047,12 +1048,12 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
#endif
}
+#endif
if (!(pWinPos->flags & SWP_NOSIZE)) {
if (IsIconic(hwnd)){
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tIconic -> MINIMIZED\n");
-#endif
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
/* Raise the window to the top in Z order */
@@ -1060,6 +1061,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1067,9 +1069,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
pWin->drawable.id,
0, 0, 0, 0);
} else if (IsZoomed(hwnd)){
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tZoomed -> MAXIMIZED\n");
-#endif
+
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1077,9 +1078,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
pWin->drawable.id,
0, 0, 0, 0);
} else {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tnone -> RESTORED\n");
-#endif
+
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1097,12 +1097,12 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (!(pWinPos->flags & SWP_NOMOVE)
&&!(pWinPos->flags & SWP_NOSIZE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tmove & resize\n");
-#endif
+
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN),
@@ -1113,12 +1113,11 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
rcClient.bottom - rcClient.top
- wBorderWidth (pWin)*2);
} else if (!(pWinPos->flags & SWP_NOMOVE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tmove\n");
-#endif
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN),
@@ -1129,24 +1128,23 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
rcClient.bottom - rcClient.top
- wBorderWidth (pWin)*2);
} else if (!(pWinPos->flags & SWP_NOMOVE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tmove\n");
-#endif
+
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN),
rcClient.top - wBorderWidth (pWin)
- GetSystemMetrics (SM_YVIRTUALSCREEN));
} else if (!(pWinPos->flags & SWP_NOSIZE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tresize\n");
-#endif
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMResizeXWindow (pWin,
rcClient.right - rcClient.left
- wBorderWidth (pWin)*2,
@@ -1156,30 +1154,27 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
}
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED - done.\n");
-#endif
+
return 0;
case WM_SIZE:
/* see dix/window.c */
/* FIXME: Maximize/Restore? */
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_SIZE - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("\t(%d, %d) %d\n", (short) LOWORD(lParam), (short) HIWORD(lParam), g_fNoConfigureWindow);
-#endif
+
if (g_fNoConfigureWindow) break;
/* Branch on type of resizing occurring */
switch (wParam)
{
case SIZE_MINIMIZED:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tSIZE_MINIMIZED\n");
-#endif
+
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
/* Raise the window to the top in Z order */
@@ -1187,6 +1182,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1197,9 +1193,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case SIZE_RESTORED:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tSIZE_RESTORED\n");
-#endif
+
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1226,9 +1221,10 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
/* Perform the resize and notify the X client */
if (!pRLWinPriv->fMovingOrSizing)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMResizeXWindow (pWin,
(short) LOWORD(lParam)
- wBorderWidth (pWin)*2,
@@ -1244,12 +1240,14 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
#endif
if (wParam)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
}
else
{
}
+#endif
winWindowsWMSendEvent(WindowsWMActivationNotify,
WindowsWMActivationNotifyMask,
1,
@@ -1279,26 +1277,26 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case WM_ENTERSIZEMOVE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_ENTERSIZEMOVE - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
+
pRLWinPriv->fMovingOrSizing = TRUE;
break;
case WM_EXITSIZEMOVE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_EXITSIZEMOVE - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
+
pRLWinPriv->fMovingOrSizing = FALSE;
GetClientRect (hwnd, &rcClient);
MapWindowPoints (hwnd, HWND_DESKTOP, (LPPOINT)&rcClient, 2);
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
+#endif
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 97a8f854f..aa158674e 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -1198,7 +1198,7 @@ winWindowProc (HWND hwnd, UINT message,
/* Call engine specific screen activation/deactivation function */
(*s_pScreenPriv->pwinActivateApp) (s_pScreen);
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
if (s_pScreenPriv->fActive)
{
/* Restack all window unless using built-in wm. */
@@ -1268,22 +1268,26 @@ winWindowProc (HWND hwnd, UINT message,
winDebug ("winWindowProc - WM_MANAGE\n");
s_pScreenInfo->fAnotherWMRunning = FALSE;
+#ifdef XWIN_MULTIWINDOWINTWM
if (s_pScreenInfo->fInternalWM)
{
EnumThreadWindows (g_dwCurrentThreadID, winMWExtWMDecorateWindow, 0);
//RootlessRepositionWindows (s_pScreen);
}
+#endif
break;
case WM_UNMANAGE:
winDebug ("winWindowProc - WM_UNMANAGE\n");
s_pScreenInfo->fAnotherWMRunning = TRUE;
+#ifdef XWIN_MULTIWINDOWINTWM
if (s_pScreenInfo->fInternalWM)
{
EnumThreadWindows (g_dwCurrentThreadID, winMWExtWMDecorateWindow, 0);
winMWExtWMRestackWindows (s_pScreen);
}
+#endif
break;
#endif
diff --git a/xorg-server/makefile b/xorg-server/makefile
index a7b931a16..f107c379c 100644
--- a/xorg-server/makefile
+++ b/xorg-server/makefile
@@ -16,6 +16,7 @@ INCLUDELIBFILES = \
miext\damage\$(OBJDIR)\libdamage.lib \
miext\shadow\$(OBJDIR)\libshadow.lib \
miext\sync\$(OBJDIR)\libsync.lib \
+ miext\rootless\$(OBJDIR)\librootless.lib \
os\$(OBJDIR)\libos.lib \
randr\$(OBJDIR)\librandr.lib \
record\$(OBJDIR)\librecord.lib \