summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/winmultiwindowwm.c46
-rw-r--r--hw/xwin/winscrinit.c4
-rw-r--r--hw/xwin/winwindow.h2
3 files changed, 9 insertions, 43 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index d3dff9baf..1d67f1e35 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -121,7 +121,6 @@ typedef struct _WMInfo {
Atom atmWmDelete;
Atom atmWmTakeFocus;
Atom atmPrivMap;
- Bool fAllowOtherWM;
} WMInfoRec, *WMInfoPtr;
typedef struct _WMProcArgRec {
@@ -187,9 +186,7 @@ static void
#endif
static Bool
-
-CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen,
- Bool fAllowOtherWM);
+CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen);
static void
winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle);
@@ -209,7 +206,6 @@ static XIOErrorHandler g_winMultiWindowXMsgProcOldIOErrorHandler;
static pthread_t g_winMultiWindowXMsgProcThread;
static Bool g_shutdown = FALSE;
static Bool redirectError = FALSE;
-static Bool g_fAnotherWMRunning = FALSE;
/*
* PushMessage - Push a message onto the queue
@@ -759,11 +755,6 @@ winMultiWindowWMProc(void *pArg)
for (;;) {
WMMsgNodePtr pNode;
- if (g_fAnotherWMRunning) { /* Another Window manager exists. */
- Sleep(1000);
- continue;
- }
-
/* Pop a message off of our queue */
pNode = PopMessage(&pWMInfo->wmMsgQueue, pWMInfo);
if (pNode == NULL) {
@@ -1094,11 +1085,7 @@ winMultiWindowXMsgProc(void *pArg)
"successfully opened the display.\n");
/* Check if another window manager is already running */
- g_fAnotherWMRunning =
- CheckAnotherWindowManager(pProcArg->pDisplay, pProcArg->dwScreen,
- pProcArg->pWMInfo->fAllowOtherWM);
-
- if (g_fAnotherWMRunning && !pProcArg->pWMInfo->fAllowOtherWM) {
+ if (CheckAnotherWindowManager(pProcArg->pDisplay, pProcArg->dwScreen)) {
ErrorF("winMultiWindowXMsgProc - "
"another window manager is running. Exiting.\n");
pthread_exit(NULL);
@@ -1140,24 +1127,6 @@ winMultiWindowXMsgProc(void *pArg)
if (g_shutdown)
break;
- if (pProcArg->pWMInfo->fAllowOtherWM && !XPending(pProcArg->pDisplay)) {
- if (CheckAnotherWindowManager
- (pProcArg->pDisplay, pProcArg->dwScreen, TRUE)) {
- if (!g_fAnotherWMRunning) {
- g_fAnotherWMRunning = TRUE;
- SendMessage(pProcArg->hwndScreen, WM_UNMANAGE, 0, 0);
- }
- }
- else {
- if (g_fAnotherWMRunning) {
- g_fAnotherWMRunning = FALSE;
- SendMessage(pProcArg->hwndScreen, WM_MANAGE, 0, 0);
- }
- }
- Sleep(500);
- continue;
- }
-
/* Fetch next event */
XNextEvent(pProcArg->pDisplay, &event);
@@ -1319,7 +1288,7 @@ winInitWM(void **ppWMInfo,
pthread_t * ptWMProc,
pthread_t * ptXMsgProc,
pthread_mutex_t * ppmServerStarted,
- int dwScreen, HWND hwndScreen, BOOL allowOtherWM)
+ int dwScreen, HWND hwndScreen)
{
WMProcArgPtr pArg = malloc(sizeof(WMProcArgRec));
WMInfoPtr pWMInfo = malloc(sizeof(WMInfoRec));
@@ -1341,7 +1310,6 @@ winInitWM(void **ppWMInfo,
/* Set a return pointer to the Window Manager info structure */
*ppWMInfo = pWMInfo;
- pWMInfo->fAllowOtherWM = allowOtherWM;
/* Setup the argument structure for the thread function */
pArg->dwScreen = dwScreen;
@@ -1622,8 +1590,7 @@ winRedirectErrorHandler(Display * pDisplay, XErrorEvent * pErr)
*/
static Bool
-CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen,
- Bool fAllowOtherWM)
+CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen)
{
/*
Try to select the events which only one client at a time is allowed to select.
@@ -1640,12 +1607,11 @@ CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen,
/*
Side effect: select the events we are actually interested in...
- If other WMs are not allowed, also select one of the events which only one client
+ Other WMs are not allowed, also select one of the events which only one client
at a time is allowed to select, so other window managers won't start...
*/
XSelectInput(pDisplay, RootWindow(pDisplay, dwScreen),
- SubstructureNotifyMask | (!fAllowOtherWM ? ButtonPressMask :
- 0));
+ SubstructureNotifyMask | ButtonPressMask);
XSync(pDisplay, 0);
return redirectError;
}
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index f75b2f91c..6cbf08da4 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -544,8 +544,8 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
&pScreenPriv->ptWMProc,
&pScreenPriv->ptXMsgProc,
&pScreenPriv->pmServerStarted,
- pScreenInfo->dwScreen, (HWND) &pScreenPriv->hwndScreen,
- FALSE)) {
+ pScreenInfo->dwScreen,
+ (HWND) &pScreenPriv->hwndScreen)) {
ErrorF("winFinishScreenInitFB - winInitWM () failed.\n");
return FALSE;
}
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index 7e6bd565c..0b2bf93ce 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -142,7 +142,7 @@ winInitWM(void **ppWMInfo,
pthread_t * ptWMProc,
pthread_t * ptXMsgProc,
pthread_mutex_t * ppmServerStarted,
- int dwScreen, HWND hwndScreen, BOOL allowOtherWM);
+ int dwScreen, HWND hwndScreen);
void
winDeinitMultiWindowWM(void);