X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtwm%2FWmFunction.c;h=1f9c50daa190b695a98599766f1db0d5e6d0056f;hb=008c224771b07c8f664f2ae2f03a78fdfcfdd387;hp=7544fd2e6efcfcb8837b917f43b9784d2c60c664;hpb=7bece30a576a4f66cae59695e871dc54d62dbc7f;p=oweals%2Fcde.git diff --git a/cde/programs/dtwm/WmFunction.c b/cde/programs/dtwm/WmFunction.c index 7544fd2e..1f9c50da 100644 --- a/cde/programs/dtwm/WmFunction.c +++ b/cde/programs/dtwm/WmFunction.c @@ -39,19 +39,14 @@ */ #include "WmGlobal.h" -#ifndef WSM -#include -#endif #include #include #include "WmICCC.h" -#ifdef WSM #include "WmWrkspace.h" /* for ClientInWorkspace() test */ #include
/* for restoring **environ before an exec() */ #include "WmResNames.h" #include
#include
-#endif /* WSM */ #include
#include "WmPanelP.h" #include "WmSignal.h" @@ -62,24 +57,18 @@ */ #include "WmFunction.h" #include "WmCEvent.h" -#ifdef WSM #include "WmHelp.h" -#endif /* WSM */ #include "WmCDInfo.h" #include "WmColormap.h" #include "WmError.h" #include "WmEvent.h" #include "WmFeedback.h" -#ifdef WSM #include "WmIPC.h" -#endif /* WSM */ #include "WmIPlace.h" #include "WmIconBox.h" #include "WmKeyFocus.h" #include "WmMenu.h" -#ifdef WSM #include "WmPresence.h" -#endif /* WSM */ #include "WmProperty.h" #include "WmProtocol.h" #include "WmResParse.h" @@ -100,15 +89,12 @@ extern pid_t vfork(); static unsigned int GetEventInverseMask(XEvent *event); -#ifdef WSM - #if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX #endif #define CLOSE_FILES_ON_EXEC() \ {int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, 1);} -#endif /* WSM */ /* * Global Variables: */ @@ -120,8 +106,6 @@ static unsigned int GetEventInverseMask(XEvent *event); static ClientData *dirtyStackEntry = NULL; static ClientData *dirtyLeader = NULL; -#ifdef WSM - /***********************<->************************************* * * F_Action (args, pCD, event) @@ -186,9 +170,7 @@ F_Action (String actionName, ClientData *pCD, XEvent *event) return (True); } /* END OF FUNCTION F_Action */ -#endif /* WSM */ - /******************************<->************************************* * * F_Beep (args, pCD, event) @@ -236,8 +218,7 @@ Boolean F_Beep (String args, ClientData *pCD, XEvent *event) * is to restack the dirty transient relative to the second to the * top transient. This function is used to support freeFamily stacking. */ -ClientData * FindSecondToTopTransient (pcd) -ClientData *pcd; +ClientData * FindSecondToTopTransient (ClientData *pcd) { ClientData *pcdNext; static ClientData *second; @@ -274,7 +255,6 @@ Boolean ForceLowerWindow (ClientData *pcd) #endif XWindowChanges changes; Boolean restack = False; -#ifdef WSM Window stackWindow; WmScreenData *pSD = (ACTIVE_WS)->pSD; unsigned int mask; @@ -316,7 +296,6 @@ Boolean ForceLowerWindow (ClientData *pcd) pCLE = pCLE->prevSibling; } } -#endif /* WSM */ #if 0 if (pSD->lastClient->type == MINIMIZED_STATE) { @@ -329,15 +308,10 @@ Boolean ForceLowerWindow (ClientData *pcd) #endif changes.stack_mode = Below; -#ifdef WSM if (mask) { XConfigureWindow (DISPLAY, pcd->clientFrameWin, mask, &changes); } -#else /* WSM */ - XConfigureWindow (DISPLAY, pcd->clientFrameWin, CWStackMode, - &changes); -#endif /* WSM */ return (restack); } @@ -379,9 +353,7 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event) ClientListEntry *pStackEntry; String string = args; int flags = STACK_NORMAL; -#ifdef WSM WmWorkspaceData *pWS = ACTIVE_WS; -#endif /* WSM */ if (string) { @@ -398,15 +370,11 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event) string, F_GROUP_ALL))) { pNextEntry = pEntry->prevSibling; -#ifdef WSM if (ClientInWorkspace (pWS, pEntry->pCD)) { -#endif /* WSM */ Do_Lower (pEntry->pCD, pStackEntry, STACK_NORMAL); pStackEntry = pEntry; -#ifdef WSM } -#endif /* WSM */ } } /* process family stacking stuff */ @@ -430,26 +398,18 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event) } index += len; } -#ifdef WSM if (ClientInWorkspace (pWS, pCD)) { -#endif /* WSM */ Do_Lower (pCD, (ClientListEntry *) NULL, flags); -#ifdef WSM } -#endif /* WSM */ } } else if (pCD) { -#ifdef WSM if (ClientInWorkspace (pWS, pCD)) { -#endif /* WSM */ Do_Lower (pCD, (ClientListEntry *) NULL, STACK_NORMAL); -#ifdef WSM } -#endif /* WSM */ } /* @@ -493,9 +453,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) Boolean restackTransients; ClientData *pcdLeader; WmWorkspaceData *pWS = ACTIVE_WS; -#ifdef WSM Boolean bLeaderRestacked; -#endif /* WSM */ if (pCD->pECD) { @@ -506,7 +464,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) return; } else -#ifdef WSM if (ClientInWorkspace(pWS, pCD) && (!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD))) { @@ -528,7 +485,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) */ return; } -#endif /* WSM */ pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; @@ -574,7 +530,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) } else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */ { -#ifdef WSM /* * Handle restacking of primary/secondary windows * within the transient window tree. @@ -619,7 +574,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) } } -#endif /* WSM */ + /* * If this is a transient window then put it below its * sibling transient windows. @@ -701,11 +656,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) MoveEntryInList (pWS, &pcdLeader->clientEntry, True /*above*/, pStackEntry); } -#ifdef WSM else if ((restackTransients) || (bLeaderRestacked)) -#else /* WSM */ - else if (restackTransients) -#endif /* WSM */ { RestackTransients (pCD); } @@ -722,11 +673,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) MoveEntryInList (pWS, &pcdLeader->clientEntry, False /*on bottom*/, (ClientListEntry *) NULL); } -#ifdef WSM else if ((restackTransients) || (bLeaderRestacked)) -#else /* WSM */ - else if (restackTransients) -#endif /* WSM */ { RestackTransients (pCD); } @@ -813,13 +760,9 @@ Boolean F_Circle_Down (String args, ClientData *pCD, XEvent *event) * on the screen. Lower the window. */ -#ifdef WSM wmGD.bSuspendSecondaryRestack = True; -#endif /* WSM */ F_Lower (NULL, pcdNext, (XEvent *) NULL); -#ifdef WSM wmGD.bSuspendSecondaryRestack = False; -#endif /* WSM */ break; } } @@ -909,13 +852,9 @@ Boolean F_Circle_Up (String args, ClientData *pCD, XEvent *event) * window on the screen. Raise the window. */ -#ifdef WSM wmGD.bSuspendSecondaryRestack = True; -#endif /* WSM */ F_Raise (NULL, pcdNext, (XEvent *) NULL); -#ifdef WSM wmGD.bSuspendSecondaryRestack = False; -#endif /* WSM */ break; } } @@ -986,12 +925,6 @@ Boolean F_Focus_Color (String args, ClientData *pCD, XEvent *event) Boolean F_Exec (String args, ClientData *pCD, XEvent *event) { int pid; -#ifndef WSM - int status; - int w; - void (*intStat) (); - void (*quitStat) (); -#endif /* WSM */ char *shell; char *shellname; @@ -1036,7 +969,7 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event) #endif /* SYSV */ #endif /* SVR4 */ #endif /* NO_SETPGRP */ -#ifdef WSM + /* * Clean up window manager resources. * The X file descriptor should be automatically closed. @@ -1055,7 +988,6 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event) _DtEnvControl(DT_ENV_RESTORE_PRE_DT); CLOSE_FILES_ON_EXEC(); -#endif /* WSM */ /* * Exec the command using $MWMSHELL if set or @@ -1110,28 +1042,10 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event) * Have the window manager wait for the shell to complete. */ -#ifndef WSM - intStat = (void (*)())signal (SIGINT, SIG_IGN); - quitStat = (void (*)())signal (SIGQUIT, SIG_IGN); -#endif /* WSM */ - -#ifdef WSM /* * Don't need to wait because WSM sets SIGCLD handler */ -#else /* WSM */ - while ((w = wait (&status)) != pid && (w != -1)); - - if (w == -1) - { - status = -1; - } -#endif /* WSM */ -#ifndef WSM - signal (SIGINT, intStat); - signal (SIGQUIT, quitStat); -#endif /* WSM */ /* * Restore original DISPLAY environment variable value @@ -1212,9 +1126,7 @@ void Do_Quit_Mwm (Boolean diedOnRestart) { if (wmGD.Screens[scr].managed) { -#ifdef WSM SaveResources(&wmGD.Screens[scr]); -#endif /* WSM */ pNextEntry = wmGD.Screens[scr].lastClient; while (pNextEntry) { @@ -1230,16 +1142,10 @@ void Do_Quit_Mwm (Boolean diedOnRestart) } UnParentControls (&wmGD.Screens[scr], False); -#ifndef WSM - XDeleteProperty(DISPLAY, wmGD.Screens[scr].rootWindow, - wmGD.xa_MWM_INFO); -#endif /* WSM */ } } -#ifdef WSM /* shut down the messaging connection */ dtCloseIPC(); -#endif /* WSM */ ResignFromSM(); XSync (DISPLAY, False); XCloseDisplay (DISPLAY); @@ -1286,14 +1192,9 @@ void ReBorderClient (ClientData *pCD, Boolean reMapClient) (!(reMapClient))) { XUnmapWindow (DISPLAY, pCD->iconWindow); -#ifdef WSM XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX, pCD->pWsList->iconY); -#else /* WSM */ - XReparentWindow (DISPLAY, pCD->iconWindow, - ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY); -#endif /* WSM */ } if (!(reMapClient)) @@ -1429,9 +1330,7 @@ static Window FindSomeReasonableClient(void) { if ((pNextEntry->type != MINIMIZED_STATE) && (pCD->clientState != MINIMIZED_STATE) && -#ifdef WSM (ClientInWorkspace (ACTIVE_WS, pCD)) && -#endif /* WSM */ (pCD != pcdNoFocus)) { if (pCD->transientChildren) @@ -1457,12 +1356,8 @@ static Window FindSomeReasonableClient(void) * Set the focus window if one is found */ -#ifdef WSM if (pcdLastFocus && ClientInWorkspace (ACTIVE_WS, pcdLastFocus)) -#else /* WSM */ - if (pcdLastFocus) -#endif /* WSM */ focusWindow = pcdLastFocus->client; /* @@ -1478,19 +1373,15 @@ static Window FindSomeReasonableClient(void) { pCD = pNextEntry->pCD; -#ifdef WSM if (ClientInWorkspace (ACTIVE_WS, pCD)) { -#endif /* WSM */ if ((pNextEntry->type == MINIMIZED_STATE) || (pCD->clientState == MINIMIZED_STATE)) { focusWindow = ICON_FRAME_WIN(pCD); break; } -#ifdef WSM } -#endif /* WSM */ pNextEntry = pNextEntry->nextSibling; } } @@ -1533,15 +1424,11 @@ void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags) wmGD.replayEnterEvent = False; pcdFocus = pCD; -#ifdef WSM /* * Make sure the client is in the current workspace */ if ((pCD) && (ClientInWorkspace (ACTIVE_WS, pCD))) -#else /* WSM */ - if (pCD) -#endif /* WSM */ { if (pCD->clientState == MINIMIZED_STATE) { @@ -1787,8 +1674,6 @@ void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags) } /* END OF FUNCTION Do_Focus_Key */ -#ifdef WSM - /***********************<->************************************* * * F_Goto_Workspace (args, pCD, event) @@ -1851,10 +1736,7 @@ F_Goto_Workspace (String args, ClientData *pCD, XEvent *event) return (False); } /* END OF FUNCTION F_Goto_Workspace */ -#endif /* WSM */ -#ifdef WSM - /******************************<->************************************* * * Boolean F_Help (String args, ClientData *pCD, XEvent *event) @@ -1924,8 +1806,7 @@ F_Help_Mode (String args, ClientData *pCD, XEvent *event) return (False); } /* END OF FUNCTION F_Help_Mode */ -#endif /* WSM */ - + /******************************<->************************************* * * F_Next_Key (args, pCD, event) @@ -2232,13 +2113,9 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event) } /* Make this client visible */ -#ifdef WSM wmGD.bSuspendSecondaryRestack = True; -#endif /* WSM */ F_Normalize_And_Raise (NULL, pPRCD->pCD, event); -#ifdef WSM wmGD.bSuspendSecondaryRestack = False; -#endif /* WSM */ } else { @@ -2321,11 +2198,7 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event) * *************************************<->***********************************/ -Boolean F_Pass_Key (args, pCD, event) - String args; - ClientData *pCD; - XEvent *event; - +Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event) { if (wmGD.passKeysActive) { @@ -2413,7 +2286,6 @@ Boolean F_Menu (String args, ClientData *pCD, XEvent *event) { flags |= POST_TRAVERSAL_ON; } -#ifdef WSM /* * Root menu, if posted with button press, then * set up to handle root menu click to make the menu @@ -2433,7 +2305,6 @@ Boolean F_Menu (String args, ClientData *pCD, XEvent *event) wmGD.hotspotRectangle.width = wmGD.moveThreshold; wmGD.hotspotRectangle.height = wmGD.moveThreshold; } -#endif /* WSM */ } else if (event && ((event->type == KeyPress) || (event->type == KeyRelease))) @@ -2724,13 +2595,9 @@ Boolean F_Normalize_And_Raise (String args, ClientData *pCD, XEvent *event) GetEventInverseMask(event)); /* Raise the window and set the keyboard focus to the window */ -#ifdef WSM wmGD.bSuspendSecondaryRestack = True; -#endif /* WSM */ F_Raise (NULL, pCD, (XEvent *)NULL); -#ifdef WSM wmGD.bSuspendSecondaryRestack = False; -#endif /* WSM */ if (wmGD.raiseKeyFocus) { F_Focus_Key (NULL, pCD, @@ -2844,13 +2711,9 @@ Boolean F_Restore_And_Raise (String args, ClientData *pCD, XEvent *event) F_Restore (NULL, pCD, event); /* Raise the window and set the keyboard focus to the window */ -#ifdef WSM wmGD.bSuspendSecondaryRestack = True; -#endif /* WSM */ F_Raise (NULL, pCD, (XEvent *)NULL); -#ifdef WSM wmGD.bSuspendSecondaryRestack = False; -#endif /* WSM */ if (wmGD.raiseKeyFocus) { F_Focus_Key (NULL, pCD, @@ -2923,64 +2786,6 @@ Boolean F_Pack_Icons (String args, ClientData *pCD, XEvent *event) } /* END OF FUNCTION F_Pack_Icons */ - -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) -/*************************************<->************************************* - * - * F_Post_RMenu (args, pCD, event) - * - * - * Description: - * ----------- - * This is the window manager function handler for posting the - * root window menu. - * This function can only be invoked by a key event. - * - *************************************<->***********************************/ - -Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event) -{ - MenuSpec *rootMenu; - unsigned int button = NoButton; - int x, y; - long flags = POST_AT_XY; - Window rwin, cwin; - int winx, winy; - unsigned int mask; - - - if ((event->type == KeyPress) || (event->type == KeyRelease)) - { - - /* Find the root menu spec */ - for (rootMenu = ACTIVE_PSD->menuSpecs; - rootMenu != (MenuSpec *) NULL; - rootMenu = rootMenu->nextMenuSpec) - { - if (strcmp(rootMenu->name, ACTIVE_PSD->rootMenu) == 0) - break; - } - - /* If we couldn't find the root menu, then do nothing. */ - if (rootMenu == (MenuSpec *) NULL) - return (False); - - else - { - XQueryPointer(DISPLAY, ACTIVE_ROOT, - &rwin, &cwin, &x, &y, &winx, &winy, &mask); - - PostMenu (rootMenu, NULL, x, y, NoButton, F_CONTEXT_ROOT, - flags, event); - } - } - - return (False); - -} /* END OF FUNCTION F_Post_RMenu */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ - - /*************************************<->************************************* * * F_Post_SMenu (args, pCD, event) @@ -3061,7 +2866,6 @@ Boolean F_Post_SMenu (String args, ClientData *pCD, XEvent *event) } else if (event->type == ButtonPress) { -#ifdef WSM /* * Root menu, if posted with button press, then * set up to handle root menu click to make the menu @@ -3077,7 +2881,6 @@ Boolean F_Post_SMenu (String args, ClientData *pCD, XEvent *event) wmGD.hotspotRectangle.width = wmGD.moveThreshold; wmGD.hotspotRectangle.height = wmGD.moveThreshold; } -#endif /* WSM */ PostMenu (pCD->systemMenuSpec, pCD, event->xbutton.x_root, event->xbutton.y_root, event->xbutton.button, menuContext, POST_AT_XY, event); @@ -3161,7 +2964,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event) SendClientMsg (pCD->client, (long) wmGD.xa_WM_PROTOCOLS, (long) wmGD.xa_WM_DELETE_WINDOW, CurrentTime, NULL, 0); } -#ifdef WSM /* * HP does not want to send a client message for both * delete_window AND save_yourself. The current OSF @@ -3169,9 +2971,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event) * to the behavior of dt 2.01 */ else if (do_save_yourself) -#else /* WSM */ - if (do_save_yourself) -#endif /* WSM */ { /* * Send a WM_SAVE_YOURSELF message and wait for a change to @@ -3199,8 +2998,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event) } /* END OF FUNCTION F_Kill */ -#ifdef WSM - /*************************************<->************************************* * * F_Marquee_Selection (args, pCD, event) @@ -3267,7 +3064,6 @@ RefreshByClearing (Window win) XFree((char *)winChildren); } } -#endif /* WSM */ /*************************************<->************************************* @@ -3286,14 +3082,12 @@ Boolean F_Refresh (String args, ClientData *pCD, XEvent *event) { Window win; -#ifdef WSM if (wmGD.refreshByClearing) { RefreshByClearing (ACTIVE_ROOT); } else { -#endif /* WSM */ /* default background_pixmap is None */ win = XCreateWindow (DISPLAY, ACTIVE_ROOT, 0, 0, @@ -3310,9 +3104,7 @@ Boolean F_Refresh (String args, ClientData *pCD, XEvent *event) XMapWindow (DISPLAY, win); XDestroyWindow (DISPLAY, win); -#ifdef WSM } -#endif /* WSM */ XFlush (DISPLAY); return (True); @@ -3362,14 +3154,11 @@ Boolean F_Resize (String args, ClientData *pCD, XEvent *event) Boolean F_Restart (String args, ClientData *pCD, XEvent *event) { -#ifdef WSM if (args && *args && !strcmp (args, DTWM_REQP_NO_CONFIRM)) { RestartWm (MWM_INFO_STARTUP_CUSTOM); } - else -#endif /* WSM */ - if (wmGD.showFeedback & WM_SHOW_FB_RESTART) + else if (wmGD.showFeedback & WM_SHOW_FB_RESTART) { ConfirmAction (ACTIVE_PSD, RESTART_ACTION); } @@ -3435,9 +3224,7 @@ void RestartWm (long startupFlags) */ SetMwmInfo (wmGD.Screens[scr].rootWindow, startupFlags, 0); -#ifdef WSM SaveResources(&wmGD.Screens[scr]); -#endif /* WSM */ /* * Unmap client windows and reparent them to the root window. */ @@ -3467,10 +3254,8 @@ void RestartWm (long startupFlags) } -#ifdef WSM /* shut down the messaging connection */ dtCloseIPC(); -#endif /* WSM */ ResignFromSM(); /* @@ -3483,10 +3268,8 @@ void RestartWm (long startupFlags) XSetInputFocus (DISPLAY, PointerRoot, RevertToPointerRoot, CurrentTime); XSync (DISPLAY, False); -#ifdef WSM CLOSE_FILES_ON_EXEC(); _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#endif /* WSM */ /* * Restart the window manager with the initial arguments plus * the restart settings. @@ -3494,13 +3277,9 @@ void RestartWm (long startupFlags) execvp (*(wmGD.argv), wmGD.argv); -#ifdef WSM Warning (((char *)GETMESSAGE(26, 1, "The window manager restart failed. The window manager program could not \ be found or could not be executed."))); -#else /* WSM */ - Warning ("Cannot restart the window manager"); -#endif /* WSM */ Do_Quit_Mwm (True); @@ -3542,14 +3321,9 @@ void DeFrameClient (ClientData *pCD) { XUnmapWindow (DISPLAY, pCD->iconWindow); XRemoveFromSaveSet (DISPLAY, pCD->iconWindow); -#ifdef WSM XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX, pCD->pWsList->iconY); -#else /* WSM */ - XReparentWindow (DISPLAY, pCD->iconWindow, - ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY); -#endif /* WSM */ } if (pCD->maxConfig) @@ -3733,7 +3507,7 @@ F_Version (String args, ClientData *pCD, XEvent *event) Boolean F_Send_Msg (String args, ClientData *pCD, XEvent *event) { - register int i; + int i; if (pCD && pCD->mwmMessagesCount) @@ -3831,9 +3605,7 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event) ClientListEntry *pStackEntry; String string = args; int flags = STACK_NORMAL; -#ifdef WSM WmWorkspaceData *pWS = ACTIVE_WS; -#endif /* WSM */ if (string) { @@ -3850,15 +3622,11 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event) F_GROUP_ALL))) { pNextEntry = pEntry->nextSibling; -#ifdef WSM if (ClientInWorkspace (pWS, pEntry->pCD)) { -#endif /* WSM */ Do_Raise (pEntry->pCD, pStackEntry, STACK_NORMAL); pStackEntry = pEntry; -#ifdef WSM } -#endif /* WSM */ } } /* process family stacking stuff */ @@ -3882,26 +3650,18 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event) } index += len; } -#ifdef WSM if (ClientInWorkspace (pWS, pCD)) { -#endif /* WSM */ Do_Raise (pCD, (ClientListEntry *) NULL, flags); -#ifdef WSM } -#endif /* WSM */ } } else if (pCD) { -#ifdef WSM if (ClientInWorkspace (pWS, pCD)) { -#endif /* WSM */ Do_Raise (pCD, (ClientListEntry *) NULL, STACK_NORMAL); -#ifdef WSM } -#endif /* WSM */ } return (True); @@ -3936,9 +3696,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) Boolean restackTransients; ClientData *pcdLeader; WmWorkspaceData *pWS = ACTIVE_WS; -#ifdef WSM Boolean bLeaderRestacked; -#endif /* WSM */ if (pCD->pECD) { @@ -3948,9 +3706,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) */ return; } - else -#ifdef WSM - if (ClientInWorkspace(pWS, pCD) && + else if (ClientInWorkspace(pWS, pCD) && (!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD))) { /* @@ -3971,7 +3727,6 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) */ return; } -#endif /* WSM */ pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; @@ -4024,7 +3779,6 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) } else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */ { -#ifdef WSM /* * Handle restacking of primary/secondary windows * within the transient window tree. Don't raise this @@ -4065,7 +3819,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) } } -#endif /* WSM */ + /* * If this is a transient window then put it on top of its * sibling transient windows. @@ -4170,11 +3924,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) /* Restack the transients if needed */ -#ifdef WSM if ((restackTransients) || (bLeaderRestacked)) -#else /* WSM */ - if (restackTransients) -#endif /* WSM */ { RestackTransients (pCD); } @@ -4216,11 +3966,7 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event) * The window is obscured by another window, raise the window. */ -#ifdef WSM F_Raise (NULL, pCD, (XEvent *)NULL); -#else /* WSM */ - F_Raise (NULL, pcdLeader, (XEvent *)NULL); -#endif /* WSM */ } else if (CheckIfClientObscuringAny (pcdLeader) && !(wmGD.systemModalActive && @@ -4232,7 +3978,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event) */ F_Lower (NULL, pcdLeader, (XEvent *)NULL); -#ifdef WSM if ((pcdLeader->secondariesOnTop == False) && (pCD->transientLeader != NULL) && (!IS_APP_MODALIZED(pcdLeader))) @@ -4241,9 +3986,7 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event) (void) BumpPrimaryToTop (pcdLeader); RestackTransients (pcdLeader); } -#endif /* WSM */ } -#ifdef WSM else if ((pcdLeader->secondariesOnTop == False) && (pcdLeader->transientChildren != NULL) && (!wmGD.systemModalActive) && @@ -4263,7 +4006,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event) RestackTransients (pcdLeader); } } -#endif /* WSM */ } return (True); @@ -4303,14 +4045,12 @@ Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event) h = (unsigned int) pCD->maxHeight; } -#ifdef WSM if (wmGD.refreshByClearing) { RefreshByClearing (pCD->clientFrameWin); } else { -#endif /* WSM */ /* default background_pixmap is None */ win = XCreateWindow (DISPLAY, pCD->clientBaseWin, @@ -4326,9 +4066,7 @@ Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event) XMapWindow (DISPLAY, win); XDestroyWindow (DISPLAY, win); -#ifdef WSM } -#endif /* WSM */ XFlush (DISPLAY); } @@ -4399,8 +4137,6 @@ void Do_Set_Behavior (Boolean dummy) } /* END OF FUNCTION Do_Set_Behavior */ -#ifdef WSM - /*************************************<->************************************* * * F_Set_Context (args, pCD, event) @@ -4420,7 +4156,6 @@ Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event) return (True); } /* END OF FUNCTION F_Set_Context */ -#endif /* WSM */ /*************************************<->************************************* @@ -4554,41 +4289,6 @@ Boolean F_Screen (String args, ClientData *pCD, XEvent *event) } - -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) -/*************************************<->************************************* - * - * F_InvokeCommand (args, pCD, event) - * - * - * Description: - * ----------- - * This is the window manager function for invoking client inserted menu - * commands. - * - *************************************<->***********************************/ - -Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event) -{ - CARD32 commandID, clientWindow; - Atom notifySelection; - - if (args == (String) NULL) return(FALSE); - - if (sscanf(args, "%d %d %ld", &commandID, &clientWindow, - ¬ifySelection) != 3) - return(FALSE); - - SendInvokeMessage(commandID, - (pCD == (ClientData *) NULL ? 0 : pCD->client), - notifySelection, - LastTime()); - - return (True); -} /* END OF FUNCTION F_InvokeCommand */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ - - /*************************************<->************************************* * * GetFunctionTimestamp (pEvent) @@ -4682,7 +4382,7 @@ void ClearDirtyStackEntry (ClientData *pCD) dirtyLeader = NULL; } } -#if defined(DEBUG) && defined(WSM) +#if defined(DEBUG) /***********************<->************************************* * @@ -4744,8 +4444,6 @@ F_ZZ_Debug (String subFcn, ClientData *pCD, XEvent *event) } #endif /* DEBUG */ -#ifdef WSM - /*************************************<->************************************* * * F_Next_Workspace (args, pCD, event) @@ -4882,7 +4580,3 @@ DumpWindowList () } #endif /* DEBUG */ -#endif /* WSM */ - - -