From: Peter Howkins Date: Tue, 19 Jun 2018 23:46:58 +0000 (+0100) Subject: dtwm: Remove WSM define, that is always on for CDE X-Git-Tag: 2.3.0a~384 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9a551dd8a6d4e7763f3ff0d44ecf0c900d5a9ba8;p=oweals%2Fcde.git dtwm: Remove WSM define, that is always on for CDE --- diff --git a/cde/programs/dtwm/Imakefile b/cde/programs/dtwm/Imakefile index 1884359b..c7fc608e 100644 --- a/cde/programs/dtwm/Imakefile +++ b/cde/programs/dtwm/Imakefile @@ -9,7 +9,7 @@ MWMDEFINES = $(VFORK_DEFINE) -DLARGECURSORS -DR2_COMPAT -DOPAQUE -DSHAPE \ -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" -DTWMDEFINES = -DWSM +DTWMDEFINES = DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE diff --git a/cde/programs/dtwm/README b/cde/programs/dtwm/README index 108c45da..99daac37 100644 --- a/cde/programs/dtwm/README +++ b/cde/programs/dtwm/README @@ -152,9 +152,6 @@ header file include flags, and macros (e.g. ABS). UNMAP_ON_RESTART All windows are unmapped on restart. - WSM - Workspace manager code. - _BMS Formerly used to denote code that interfaced to the HP Broadcast message server. This code has been switched over to ICCC diff --git a/cde/programs/dtwm/WmBackdrop.c b/cde/programs/dtwm/WmBackdrop.c index 0cfb06fc..545a08bc 100644 --- a/cde/programs/dtwm/WmBackdrop.c +++ b/cde/programs/dtwm/WmBackdrop.c @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY * (c) Copyright 1993, 1994 International Business Machines Corp. @@ -691,5 +690,4 @@ IsBackdropWindow( return (rval); } -#endif /* WSM */ /********************* eof ***************************/ diff --git a/cde/programs/dtwm/WmBackdrop.h b/cde/programs/dtwm/WmBackdrop.h index 92accc65..6f8c7b66 100644 --- a/cde/programs/dtwm/WmBackdrop.h +++ b/cde/programs/dtwm/WmBackdrop.h @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. @@ -46,5 +45,4 @@ extern Boolean IsBackdropWindow( /******** End Public Function Declarations ********/ -#endif /* WSM */ /**************************** eof ***************************/ diff --git a/cde/programs/dtwm/WmCDInfo.c b/cde/programs/dtwm/WmCDInfo.c index 609a1e0d..f132823c 100644 --- a/cde/programs/dtwm/WmCDInfo.c +++ b/cde/programs/dtwm/WmCDInfo.c @@ -722,7 +722,6 @@ Boolean GetFramePartInfo (ClientData *pcd, int part, int *pX, int *pY, unsigned rval = TRUE; } break; -#ifdef WSM case FRAME_TITLEBAR: if (decor & MWM_DECOR_TITLE) { @@ -734,7 +733,6 @@ Boolean GetFramePartInfo (ClientData *pcd, int part, int *pX, int *pY, unsigned rval = TRUE; } break; -#endif /* WSM */ case FRAME_MINIMIZE: if (decor & MWM_DECOR_MINIMIZE) { diff --git a/cde/programs/dtwm/WmCDecor.c b/cde/programs/dtwm/WmCDecor.c index 7576fbcc..cf49770f 100644 --- a/cde/programs/dtwm/WmCDecor.c +++ b/cde/programs/dtwm/WmCDecor.c @@ -695,7 +695,6 @@ void GenerateFrameDisplayLists (ClientData *pcd) /* produce default border with no resizing functions */ -#ifdef WSM BevelRectangle (pcd->pclientTopShadows, /* outside */ pcd->pclientBottomShadows, 0, 0, @@ -704,13 +703,6 @@ void GenerateFrameDisplayLists (ClientData *pcd) FRAME_EXTERNAL_SHADOW_WIDTH, FRAME_EXTERNAL_SHADOW_WIDTH, FRAME_EXTERNAL_SHADOW_WIDTH); -#else /* WSM */ - BevelRectangle (pcd->pclientTopShadows, /* outside */ - pcd->pclientBottomShadows, - 0, 0, - pcd->frameInfo.width, pcd->frameInfo.height, - 2, 2, 2, 2); -#endif /* WSM */ if ((pcd->internalBevel > 1) && !matte_width && @@ -1100,11 +1092,11 @@ void GetTextBox (ClientData *pcd, XRectangle *pBox) { int x,y; unsigned int width,height; -#if defined(WSM) && defined(DT_LEFT_JUSTIFIED_TITLE) +#if defined(DT_LEFT_JUSTIFIED_TITLE) Dimension textWidth; Dimension offset; XmFontList fontList; -#endif /* WSM */ +#endif /* get size of title area */ @@ -1261,14 +1253,9 @@ void DrawWindowTitle (ClientData *pcd, Boolean eraseFirst) textBox.x, textBox.y, textBox.width, &textBox, ((wmGD.frameStyle == WmSLAB) ? False : True)); #else /* DT_LEFT_JUSTIFIED_TITLE */ -#ifdef WSM WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC, textBox.x, textBox.y, textBox.width, &textBox, True); -#else - WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC, - textBox.x, textBox.y, textBox.width, &textBox); -#endif #endif /* DT_LEFT_JUSTIFIED_TITLE */ diff --git a/cde/programs/dtwm/WmCEvent.c b/cde/programs/dtwm/WmCEvent.c index 7a569266..2e7eeb96 100644 --- a/cde/programs/dtwm/WmCEvent.c +++ b/cde/programs/dtwm/WmCEvent.c @@ -59,9 +59,7 @@ #include "WmWinInfo.h" #include "WmWinList.h" #include "WmWinState.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ /* @@ -246,10 +244,8 @@ Boolean WmDispatchClientEvent (XEvent *event) { SetActiveScreen (PSD_FOR_CLIENT(pCD)); } -#ifdef WSM /* Get workspace specific client data */ SetClientWsIndex (pCD); -#endif /* WSM */ /* * Handle events on top-level client windows. @@ -412,7 +408,6 @@ Boolean WmDispatchClientEvent (XEvent *event) * This is a request to change the state of the client window from * iconic (minimized) to normal. */ -#ifdef WSM if (!ClientInWorkspace (ACTIVE_WS, pCD)) { if (pCD->absentMapBehavior == AMAP_BEHAVIOR_IGNORE) @@ -430,9 +425,6 @@ Boolean WmDispatchClientEvent (XEvent *event) { SetClientState (pCD, NORMAL_STATE, GetTimestamp ()); } -#else /* WSM */ - SetClientState (pCD, NORMAL_STATE, GetTimestamp ()); -#endif /* WSM */ break; } @@ -515,9 +507,7 @@ Boolean WmDispatchClientEvent (XEvent *event) Boolean HandleEventsOnSpecialWindows (XEvent *pEvent) { Boolean dispatchEvent = True; -#ifdef WSM WmScreenData *pSD; -#endif /* WSM */ /* @@ -557,7 +547,6 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent) } dispatchEvent = False; /* don't have the toolkit dispatch the event */ } -#ifdef WSM else if (!XFindContext (DISPLAY, pEvent->xany.window, wmGD.mwmWindowContextType, (caddr_t *)&pSD)) { @@ -572,7 +561,6 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent) HandleDtWmClientMessage ((XClientMessageEvent *)pEvent); } } -#endif /* WSM */ else { /* @@ -795,12 +783,10 @@ void HandleCPropertyNotify (ClientData *pCD, XPropertyEvent *propertyEvent) { ProcessWmProtocols (pCD); } -#ifdef WSM else if (propertyEvent->atom == wmGD.xa_DT_WORKSPACE_HINTS) { (void) ProcessWorkspaceHints (pCD); } -#endif /* WSM */ else if (propertyEvent->atom == wmGD.xa_MWM_MESSAGES) { if (pCD->protocolFlags & PROTOCOL_MWM_MESSAGES) @@ -2577,12 +2563,10 @@ void HandleClientMessage (ClientData *pCD, XClientMessageEvent *clientEvent) { newState = NORMAL_STATE; } -#ifdef WSM if (!ClientInWorkspace (ACTIVE_WS, pCD)) { newState |= UNSEEN_STATE; } -#endif /* WSM */ SetClientState (pCD, newState, GetTimestamp ()); diff --git a/cde/programs/dtwm/WmError.c b/cde/programs/dtwm/WmError.c index 255afe3c..23d5cf46 100644 --- a/cde/programs/dtwm/WmError.c +++ b/cde/programs/dtwm/WmError.c @@ -36,9 +36,7 @@ #include "WmGlobal.h" #include -#ifdef WSM #include
-#endif /* WSM */ #include "WmXSMP.h" /* @@ -319,21 +317,15 @@ WmXtWarningHandler (char *message) void Warning (char *message) { -#ifdef WSM char pch[MAXWMPATH+1]; sprintf (pch, "%s: %s\n", GETMESSAGE(20, 1, "Workspace Manager"), message); _DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL); -#else /* WSM */ - fprintf (stderr, "%s: %s\n", wmGD.mwmName, message); - fflush (stderr); -#endif /* WSM */ } /* END OF FUNCTION Warning */ -#ifdef WSM #ifdef DEBUGGER /******************************<->************************************* @@ -366,4 +358,3 @@ PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char *s4, char * /************************ eof **************************/ #endif /* DEBUGGER */ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmError.h b/cde/programs/dtwm/WmError.h index 5cb1caf0..86070898 100644 --- a/cde/programs/dtwm/WmError.h +++ b/cde/programs/dtwm/WmError.h @@ -30,11 +30,9 @@ /* * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ -#ifdef WSM #ifdef DEBUGGER extern void PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char *s4, char *s5, char *s6, char *s7, char *s8, char *s9); #endif /* DEBUGGER */ -#endif /* WSM */ extern void WmInitErrorHandler (Display *display); extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent); extern int WmXIOErrorHandler (Display *display); @@ -44,6 +42,4 @@ extern void Warning (char *message); #ifndef NO_MESSAGE_CATALOG extern char * GetMessage(int set, int n, char * s); #endif -#ifdef WSM /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmEvent.c b/cde/programs/dtwm/WmEvent.c index 2c648423..70d8a03e 100644 --- a/cde/programs/dtwm/WmEvent.c +++ b/cde/programs/dtwm/WmEvent.c @@ -44,10 +44,8 @@ */ #include "WmEvent.h" #include "WmError.h" -#ifdef WSM #include "WmBackdrop.h" #include "WmWrkspace.h" -#endif /* WSM */ #include "WmCDInfo.h" #include "WmCDecor.h" #include "WmCEvent.h" @@ -57,10 +55,8 @@ #include "WmPanelP.h" /* for typedef in WmManage.h */ #include "WmManage.h" #include "WmMenu.h" -#ifdef WSM #include "WmICCC.h" #include "WmProperty.h" -#endif /* WSM */ #include "WmWinInfo.h" #include "WmWinState.h" #include "WmResNames.h" @@ -71,7 +67,6 @@ #include /* for MS_LastManagedMenuTime */ extern XmMenuState _XmGetMenuState(); -#ifdef WSM /* * FUNCTION PARSER TABLE */ @@ -85,7 +80,6 @@ typedef struct { Boolean (*parseProc)(); } FunctionTableEntry; -#endif /* WSM */ /* @@ -93,11 +87,9 @@ typedef struct { */ extern unsigned int buttonModifierMasks[]; -#ifdef WSM int smAckState = SM_UNITIALIZED; extern FunctionTableEntry functionTable[]; extern int F_NOP_INDEX; -#endif /* WSM */ #ifndef MOTIF_ONE_DOT_ONE #include @@ -675,12 +667,8 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event) (short) wmGD.hotspotRectangle.width)) && (event->y_root < (wmGD.hotspotRectangle.y + (short) wmGD.hotspotRectangle.height))&& -#ifdef WSM (pCD || (wmGD.rootButtonClick && wmGD.clickData.clickPending))) -#else /* WSM */ - pCD) -#endif /* WSM */ { /* ^^^ * Added check for NULL pCD in the above condition. @@ -698,10 +686,8 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event) if (event->type == ButtonRelease) { -#ifdef WSM if (pCD) { -#endif /* WSM */ /* * The system menu is posted from a system menu button or an * icon. By doing a button release over the system menu button @@ -724,7 +710,6 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event) ->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time; doXtDispatchEvent = True; #endif -#ifdef WSM } else if ((!wmGD.clickData.pCD) && (((XButtonEvent *)event)->button == wmGD.clickData.button) && @@ -768,7 +753,6 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event) } wmGD.clickData.clickPending = False; } -#endif /* WSM */ } else { @@ -1238,9 +1222,9 @@ Boolean HandleKeyPress (XKeyEvent *keyEvent, } if ((keySpecs->wmFunction == F_Menu) || -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) (keySpecs->wmFunction == F_Post_RMenu) || -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ (keySpecs->wmFunction == F_Post_SMenu)) { wmGD.menuUnpostKeySpec = keySpecs; /* menu unpost key spec */ @@ -1801,9 +1785,7 @@ void ProcessClickBPress (XButtonEvent *buttonEvent, ClientData *pCD, Context con wmGD.clickData.time = buttonEvent->time; wmGD.clickData.clickPending = True; wmGD.clickData.doubleClickPending = True; -#ifdef WSM wmGD.clickData.bReplayed = wmGD.bReplayedButton; -#endif /* WSM */ } @@ -1882,9 +1864,6 @@ void ProcessClickBRelease (XButtonEvent *buttonEvent, ClientData *pCD, Context c } /* END OF FUNCTION ProcessClickBRelease */ - -#ifdef WSM - /*************************************<->************************************* * * HandleDtWmClientMessage (clientEvent) @@ -2132,9 +2111,6 @@ HandleDtWmRequest (WmScreenData *pSD, XEvent *pev) } /* END OF FUNCTION HandleDtWmRequest */ -#endif /* WSM */ - - /*************************************<->************************************* * * HandleWsEnterNotify (enterEvent) @@ -2592,7 +2568,7 @@ Time GetTimestamp (void) } /* END OF FUNCTION GetTimestamp */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * LastTime () @@ -2624,7 +2600,7 @@ Time LastTime () return (evTime); } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -2657,20 +2633,14 @@ void PullExposureEvents (void) * Force the exposure events into the queue */ XSync (DISPLAY, False); -#ifdef WSM XSync (DISPLAY1, False); -#endif /* WSM */ /* * Selectively extract the exposure events */ -#ifdef WSM while (XCheckMaskEvent (DISPLAY, ExposureMask|VisibilityChangeMask, &event) || XCheckMaskEvent (DISPLAY1, ExposureMask|VisibilityChangeMask, &event)) -#else /* WSM */ - while (XCheckMaskEvent (DISPLAY, ExposureMask, &event)) -#endif /* WSM */ { /* * Check for, and process non-widget events. The events may be @@ -2678,11 +2648,9 @@ void PullExposureEvents (void) * to an icon window, or to a "special" window management window. */ -#ifdef WSM switch (event.type) { case Expose: -#endif /* WSM */ if (event.xany.window == ACTIVE_ROOT) { dispatchEvent = WmDispatchWsEvent (&event); @@ -2691,11 +2659,9 @@ void PullExposureEvents (void) { dispatchEvent = WmDispatchClientEvent (&event); } -#ifdef WSM default: dispatchEvent = True; } -#endif /* WSM */ if (dispatchEvent) { @@ -2709,8 +2675,6 @@ void PullExposureEvents (void) } /* END OF FUNCTION PullExposureEvents */ -#ifdef WSM - /*************************************<->************************************* * * ReplayedButtonEvent () @@ -2761,4 +2725,3 @@ ReplayedButtonEvent ( return (rval); } -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmEvent.h b/cde/programs/dtwm/WmEvent.h index 72149930..fe274800 100644 --- a/cde/programs/dtwm/WmEvent.h +++ b/cde/programs/dtwm/WmEvent.h @@ -30,19 +30,17 @@ /* * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ -#ifdef WSM /* Shared Variables */ extern int smAckState; -#endif /* WSM */ extern Boolean CheckForButtonAction (XButtonEvent *buttonEvent, Context context, Context subContext, ClientData *pCD); extern Time GetTimestamp (void); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) extern Time LastTime (void); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ extern Boolean HandleKeyPress (XKeyEvent *keyEvent, KeySpec *keySpecs, Boolean checkContext, Context context, Boolean onlyFirst, ClientData *pCD); @@ -74,8 +72,6 @@ extern void WmGrabKey (Display *display, int keycode, unsigned int modifiers, int keyboard_mode); extern void WmUngrabButton (Display *display, unsigned int button, unsigned int modifiers, Window grab_window); -#ifdef WSM extern void HandleDtWmClientMessage (XClientMessageEvent *clientEvent); extern void HandleDtWmRequest (WmScreenData *pSD, XEvent *pev); extern Boolean ReplayedButtonEvent (XButtonEvent *pevB1, XButtonEvent *pevB2); -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmFunction.c b/cde/programs/dtwm/WmFunction.c index 7544fd2e..c98888d3 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) @@ -274,7 +256,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 +297,6 @@ Boolean ForceLowerWindow (ClientData *pcd) pCLE = pCLE->prevSibling; } } -#endif /* WSM */ #if 0 if (pSD->lastClient->type == MINIMIZED_STATE) { @@ -329,15 +309,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 +354,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 +371,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 +399,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 +454,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 +465,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 +486,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags) */ return; } -#endif /* WSM */ pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; @@ -574,7 +531,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 +575,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 +657,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 +674,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 +761,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 +853,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 +926,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 +970,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 +989,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 +1043,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 +1127,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 +1143,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 +1193,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 +1331,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 +1357,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 +1374,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 +1425,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 +1675,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 +1737,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 +1807,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 +2114,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 { @@ -2413,7 +2291,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 +2310,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 +2600,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 +2716,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, @@ -2924,7 +2792,7 @@ Boolean F_Pack_Icons (String args, ClientData *pCD, XEvent *event) } /* END OF FUNCTION F_Pack_Icons */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * F_Post_RMenu (args, pCD, event) @@ -2978,7 +2846,7 @@ Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event) return (False); } /* END OF FUNCTION F_Post_RMenu */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -3061,7 +2929,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 +2944,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 +3027,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 +3034,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 +3061,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 +3127,6 @@ RefreshByClearing (Window win) XFree((char *)winChildren); } } -#endif /* WSM */ /*************************************<->************************************* @@ -3286,14 +3145,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 +3167,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 +3217,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 +3287,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 +3317,8 @@ void RestartWm (long startupFlags) } -#ifdef WSM /* shut down the messaging connection */ dtCloseIPC(); -#endif /* WSM */ ResignFromSM(); /* @@ -3483,10 +3331,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 +3340,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 +3384,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) @@ -3831,9 +3668,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 +3685,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 +3713,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 +3759,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 +3769,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 +3790,6 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags) */ return; } -#endif /* WSM */ pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; @@ -4024,7 +3842,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 +3882,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 +3987,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 +4029,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 +4041,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 +4049,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 +4069,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event) RestackTransients (pcdLeader); } } -#endif /* WSM */ } return (True); @@ -4303,14 +4108,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 +4129,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 +4200,6 @@ void Do_Set_Behavior (Boolean dummy) } /* END OF FUNCTION Do_Set_Behavior */ -#ifdef WSM - /*************************************<->************************************* * * F_Set_Context (args, pCD, event) @@ -4420,7 +4219,6 @@ Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event) return (True); } /* END OF FUNCTION F_Set_Context */ -#endif /* WSM */ /*************************************<->************************************* @@ -4555,7 +4353,7 @@ Boolean F_Screen (String args, ClientData *pCD, XEvent *event) -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * F_InvokeCommand (args, pCD, event) @@ -4586,7 +4384,7 @@ Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event) return (True); } /* END OF FUNCTION F_InvokeCommand */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -4682,7 +4480,7 @@ void ClearDirtyStackEntry (ClientData *pCD) dirtyLeader = NULL; } } -#if defined(DEBUG) && defined(WSM) +#if defined(DEBUG) /***********************<->************************************* * @@ -4744,8 +4542,6 @@ F_ZZ_Debug (String subFcn, ClientData *pCD, XEvent *event) } #endif /* DEBUG */ -#ifdef WSM - /*************************************<->************************************* * * F_Next_Workspace (args, pCD, event) @@ -4882,7 +4678,3 @@ DumpWindowList () } #endif /* DEBUG */ -#endif /* WSM */ - - - diff --git a/cde/programs/dtwm/WmFunction.h b/cde/programs/dtwm/WmFunction.h index 600e70ca..556efda1 100644 --- a/cde/programs/dtwm/WmFunction.h +++ b/cde/programs/dtwm/WmFunction.h @@ -31,9 +31,7 @@ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ -#ifdef WSM extern Boolean F_Action (String actionName, ClientData *pCD, XEvent *event); -#endif /* WSM */ extern Boolean F_Beep (String args, ClientData *pCD, XEvent *event); extern Boolean F_Lower (String args, ClientData *pCD, XEvent *event); extern void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags); @@ -45,18 +43,14 @@ extern Boolean F_Quit_Mwm (String args, ClientData *pCD, XEvent *event); extern void Do_Quit_Mwm (Boolean diedOnRestart); extern Boolean F_Focus_Key (String args, ClientData *pCD, XEvent *event); extern void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags); -#ifdef WSM extern Boolean F_Goto_Workspace (String args, ClientData *pCD, XEvent *event); extern Boolean F_Help (String args, ClientData *pCD, XEvent *event); extern Boolean F_Help_Mode (String args, ClientData *pCD, XEvent *event); -#endif /* WSM */ extern Boolean F_Next_Key (String args, ClientData *pCD, XEvent *event); extern Boolean F_Prev_Cmap (String args, ClientData *pCD, XEvent *event); extern Boolean F_Prev_Key (String args, ClientData *pCD, XEvent *event); extern Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event); -#ifdef WSM extern Boolean F_Marquee_Selection (String args, ClientData *pCD, XEvent *event); -#endif /* WSM */ extern Boolean F_Maximize (String args, ClientData *pCD, XEvent *event); extern Boolean F_Menu (String args, ClientData *pCD, XEvent *event); extern Boolean F_Minimize (String args, ClientData *pCD, XEvent *event); @@ -80,9 +74,7 @@ extern Boolean F_Restore_And_Raise (String args, ClientData *pCD, extern void Do_Restart (Boolean dummy); extern void RestartWm (long startupFlags); extern void DeFrameClient (ClientData *pCD); -#ifdef WSM extern Boolean F_Send (String args, ClientData *pCD, XEvent *event); -#endif /* WSM */ extern Boolean F_Send_Msg (String args, ClientData *pCD, XEvent *event); extern Boolean F_Separator (String args, ClientData *pCD, XEvent *event); extern Boolean F_Raise (String args, ClientData *pCD, XEvent *event); @@ -90,16 +82,13 @@ extern void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags); extern Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event); extern Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event); extern Boolean F_Set_Behavior (String args, ClientData *pCD, XEvent *event); -#ifdef WSM extern Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event); -#endif extern void Do_Set_Behavior (Boolean dummy); extern Boolean F_Title (String args, ClientData *pCD, XEvent *event); extern Boolean F_Screen (String args, ClientData *pCD, XEvent *event); extern Boolean F_Toggle_Front_Panel (String args, ClientData *pCD, XEvent *event); extern Boolean F_Version (String args, ClientData *pCD, XEvent *event); -#ifdef WSM extern Boolean F_Next_Workspace (String args, ClientData *pCD, XEvent *event); extern Boolean F_Prev_Workspace (String args, ClientData *pCD, XEvent *event); extern Boolean F_Workspace_Presence (String args, ClientData *pCD, @@ -107,11 +96,10 @@ extern Boolean F_Workspace_Presence (String args, ClientData *pCD, #if defined(DEBUG) extern Boolean F_ZZ_Debug (String, ClientData *, XEvent *); #endif /* DEBUG */ -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) extern Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event); extern Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ extern Time GetFunctionTimestamp (XButtonEvent *pEvent); extern void ReBorderClient (ClientData *pCD, Boolean reMapClient); extern void ClearDirtyStackEntry (ClientData *pCD); /* Fix for 5325 */ diff --git a/cde/programs/dtwm/WmGlobal.h b/cde/programs/dtwm/WmGlobal.h index b9872603..797e6c62 100644 --- a/cde/programs/dtwm/WmGlobal.h +++ b/cde/programs/dtwm/WmGlobal.h @@ -59,14 +59,12 @@ #include #include #include -#ifdef WSM #include #include
#include
#include
#include "WmParse.h" #include
-#endif /* WSM */ #if defined(sun) && defined(ALLPLANES) #include @@ -79,7 +77,6 @@ #ifdef MOTIF_ONE_DOT_ONE #define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET" #endif -#ifdef WSM extern int WmIdentity; @@ -89,13 +86,11 @@ extern int WmIdentity; #define CSERVE_NORMAL 0 #define CSERVE_NOT_AVAILABLE 1 #define CSERVE_FAILURE 2 -#endif /* WSM */ /* window manager name and class used to get resources: */ #define WM_RESOURCE_CLASS "Mwm" #define WM_RESOURCE_NAME "mwm" -#ifdef WSM #define DT_WM_RESOURCE_CLASS "Dtwm" #define DT_WM_RESOURCE_NAME "dtwm" @@ -117,18 +112,14 @@ extern Pixel FPselectcolor; #define MwmBehavior (WmIdentity == MWM) #define DtwmBehavior (WmIdentity == DT_MWM) -#else -#define MwmBehavior (True) - -#endif /* WSM */ /* ICCC atom names: */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define _XA_TARGETS "TARGETS" # define _XA_MULTIPLE "MULTIPLE" # define _XA_TIMESTAMP "TIMESTAMP" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ #define _XA_WM_STATE "WM_STATE" #define _XA_WM_PROTOCOLS "WM_PROTOCOLS" @@ -138,7 +129,7 @@ extern Pixel FPselectcolor; #define _XA_WM_TAKE_FOCUS "WM_TAKE_FOCUS" #define _XA_WM_COLORMAP_WINDOWS "WM_COLORMAP_WINDOWS" -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* original set of query targets */ # define _XA_MOTIF_WM_CLIENT_WINDOW "_MOTIF_WM_CLIENT_WINDOW" # define _XA_MOTIF_WM_POINTER_WINDOW "_MOTIF_WM_POINTER_WINDOW" @@ -157,7 +148,7 @@ extern Pixel FPselectcolor; /* automation support */ # define _XA_MOTIF_WM_AUTOMATION "_MOTIF_WM_AUTOMATION" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* window manager exit value on fatal errors: */ #define WM_ERROR_EXIT_VALUE 1 @@ -193,12 +184,8 @@ extern Pixel FPselectcolor; #define MANAGEW_CONFIRM_BOX (1L << 4) #define MANAGEW_WM_RESTART_ICON (1L << 5) -#ifdef WSM #define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | \ MANAGEW_CONFIRM_BOX ) -#else /* WSM */ -#define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | MANAGEW_CONFIRM_BOX) -#endif /* WSM */ /* keyboard input focus flag values (for calls to SetKeyboardFocus) */ #define ALWAYS_SET_FOCUS (1L << 0) @@ -228,11 +215,7 @@ extern Pixel FPselectcolor; #define TEXT_HEIGHT(pfs) (((pfs)->ascent)+((pfs)->descent)) /* icon frame shadow widths */ -#ifdef WSM #define ICON_EXTERNAL_SHADOW_WIDTH (wmGD.iconExternalShadowWidth) -#else /* WSM */ -#define ICON_EXTERNAL_SHADOW_WIDTH 2 -#endif /* WSM */ #define ICON_INTERNAL_SHADOW_WIDTH 1 /* padding widths */ @@ -281,11 +264,7 @@ extern Pixel FPselectcolor; /* client frame shadow widths */ -#ifdef WSM #define FRAME_EXTERNAL_SHADOW_WIDTH (wmGD.frameExternalShadowWidth) -#else /* WSM */ -#define FRAME_EXTERNAL_SHADOW_WIDTH 2 -#endif /* WSM */ #define FRAME_INTERNAL_SHADOW_WIDTH 1 #define FRAME_CLIENT_SHADOW_WIDTH 1 #define FRAME_MATTE_SHADOW_WIDTH 1 @@ -314,14 +293,12 @@ extern Pixel FPselectcolor; #define STRETCH_COUNT 8 -#ifdef WSM /* Workspace allocation granularity */ #define WS_ALLOC_AMOUNT 8 /* Window list allocation granularity */ #define WINDOW_ALLOC_AMOUNT 16 -#endif /* WSM */ /* function flag masks */ #define WM_FUNC_DEFAULT MWM_FUNC_ALL @@ -354,13 +331,11 @@ extern Pixel FPselectcolor; #define WM_FUNC_PANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE) #define WM_FUNC_SUBPANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE|\ MWM_FUNC_CLOSE) -#ifdef WSM /* workspace controller definitions */ #define CONTROL_BOX_FUNCTIONS (MWM_FUNC_MOVE) /* workspace presence definitions */ #define PRESENCE_BOX_FUNCTIONS (MWM_FUNC_MOVE) -#endif /* WSM */ /* show feedback definitions */ #define WM_SHOW_FB_BEHAVIOR (1L << 0) @@ -380,7 +355,6 @@ extern Pixel FPselectcolor; #define WM_SHOW_FB_DEFAULT WM_SHOW_FB_ALL -#ifdef WSM /* flags identifying resources to save */ #define WM_RES_WORKSPACE_LIST (1L << 0) @@ -391,7 +365,6 @@ extern Pixel FPselectcolor; #define WM_RES_ICONBOX_GEOMETRY (1L << 5) #define WM_RES_WORKSPACE_COUNT (1L << 6) -#endif /* WSM */ @@ -433,9 +406,7 @@ typedef struct _WmColorData } WmColorData; -#ifdef WSM typedef Atom WorkspaceID; -#endif /*************************************<->************************************* @@ -496,9 +467,7 @@ typedef struct _ButtonSpec #define F_CONTEXT_NORMAL (1L << 2) #define F_CONTEXT_MAXIMIZE (1L << 3) #define F_CONTEXT_ICONBOX (1L << 4) -#ifdef WSM #define F_CONTEXT_IFKEY (1L << 7) -#endif /* WSM */ #define F_CONTEXT_WINDOW (F_CONTEXT_NORMAL|F_CONTEXT_MAXIMIZE) #define F_CONTEXT_ALL (F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW) @@ -535,9 +504,7 @@ typedef struct _ButtonSpec #define FRAME_NBORDER 14 #define FRAME_MATTE 15 #define FRAME_MISC FRAME_MATTE -#ifdef WSM #define FRAME_TITLEBAR 17 -#endif /* WSM */ /* icon part contexts */ #define ICON_PART_NONE 0 @@ -629,9 +596,7 @@ typedef struct _ClickData { Boolean clickPending; Boolean doubleClickPending; -#ifdef WSM Boolean bReplayed; -#endif /* WSM */ unsigned int button; unsigned int state; unsigned int releaseState; @@ -677,8 +642,7 @@ typedef struct _Gadget_Rectangle #define F_GROUP_ALL (F_GROUP_DEFAULT | F_GROUP_TRANSIENT) #define F_GROUP_GROUP (1L << 3) -#ifdef WSM - + /*************************************<->************************************* * * Workspace data structures ... @@ -783,9 +747,7 @@ typedef struct _SessionGeom #define SM_START_ACK 1 #define SM_STOP_ACK 2 -#endif /* WSM */ - /*************************************<->************************************* * * Menu specification data structures ... @@ -801,7 +763,7 @@ typedef struct _SessionGeom * *************************************<->***********************************/ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* * Used to denote where the separators belong in a pair of separators * used to surround a client command. @@ -813,7 +775,7 @@ enum { TOP_SEPARATOR, BOTTOM_SEPARATOR }; * Used to denote what kind of change to make to a client command. */ typedef enum { ENABLE, DISABLE, REMOVE, RENAME } CmdModifier; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ typedef struct _MenuItem { @@ -828,16 +790,15 @@ typedef struct _MenuItem String wmFuncArgs; Context greyedContext; long mgtMask; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) String clientCommandName; /* as specified by the user in his .mwmrc file. */ CARD32 clientCommandID; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ struct _MenuItem *nextMenuItem; } MenuItem; -#ifdef WSM /* * We use the top part of mgtMask for workspace function bits. @@ -848,7 +809,6 @@ typedef struct _MenuItem #define MWM_MGT_MASK 0x0000FFFF #define DTWM_MGT_MASK 0xFFFF0000 -#endif /* WSM */ typedef struct _MenuButton { @@ -858,13 +818,13 @@ typedef struct _MenuButton } MenuButton; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) typedef struct _MenuExclusion { String command_string; struct _MenuExclusion *nextExclusion; } MenuExclusion; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ typedef struct _MenuSpec { @@ -880,20 +840,20 @@ typedef struct _MenuSpec Context accelContext; /* accelerator context */ KeySpec *accelKeySpecs; /* list of accelerator KeySpecs */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) MenuExclusion *exclusions; /* list of client commands to be excluded from this menu. */ Boolean clientLocal; /* this menu is owned by a client and not shared with any other clients */ CARD32 commandID; /* if this is a client command, then this its id value - globally unique. */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ struct _MenuSpec *nextMenuSpec; } MenuSpec; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* The range to which a client command operation should apply. */ typedef enum { SINGLE, ROOT, ALL } OpRange; @@ -919,7 +879,7 @@ typedef struct _matchlist { struct _matchlist *next; } MatchList; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -1140,9 +1100,7 @@ typedef struct _IconBoxData int currentCol; int lastRow; int lastCol; -#ifdef WSM WorkspaceID wsID; /* workspace identifier */ -#endif /* WSM */ struct _ClientData *pCD_iconBox; /* ptr to its own clientdata */ struct _IconBoxData *pNextIconBox; /* ptr to next icon box */ struct _IconPlacementData IPD; /* icon placement data */ @@ -1271,24 +1229,20 @@ typedef struct _WmScreenData Window rootWindow; Widget screenTopLevelW; Widget screenTopLevelW1; /* for internal WM components */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) Widget utmShell; /* DrawingArea used for UTM */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ Widget confirmboxW[4]; Widget wPanelist; /* panel object */ -#ifdef WSM WsPresenceData presence; /* workspace presence dialog*/ Widget switcherW; /* workspace switcher */ Widget switcherShellW; /* shell for ws switcher */ -#endif /* WSM */ Window wmWorkspaceWin; /* holds wm properties */ Window feedbackWin; Window activeIconTextWin; Window activeLabelParent; String displayString; /* used for putenv in F_Exec */ -#ifdef WSM int displayResolutionType; -#endif /* WSM */ struct _WmFpEmbeddedClientData *pECD; /* clients living in front panel */ int numEmbeddedClients; struct _WmFpPushRecallClientData *pPRCD; /* push_recall clients */ @@ -1303,12 +1257,10 @@ typedef struct _WmScreenData Colormap workspaceColormap; Colormap lastInstalledColormap; struct _WmWorkspaceData *pActiveWS; /* for this screen */ -#ifdef WSM struct _WmWorkspaceData *pLastWS; /* previously active WS */ -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) CmdTree *cciTree; /* pointer to cci definitions */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* per screen caches */ BitmapCache *bitmapCache; @@ -1331,14 +1283,11 @@ typedef struct _WmScreenData GC fadeIconGC; GC fadeIconTextGC; -#ifdef WSM - /* per screen configuration outline windows */ Window woN; /* North outline window */ Window woS; /* South outline window */ Window woE; /* East outline window */ Window woW; /* West outline window */ -#endif /* WSM */ /* per screen feedback data */ unsigned long fbStyle; @@ -1359,9 +1308,9 @@ typedef struct _WmScreenData int actionNbr; /* resource description file data: */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) String rootMenu; /* resource */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ String buttonBindings; /* resource */ ButtonSpec *buttonSpecs; String keyBindings; /* resource */ @@ -1381,9 +1330,6 @@ typedef struct _WmScreenData Boolean decoupleTitleAppearance; /* see clientTitleAppearance */ int frameBorderWidth; /* resource */ String feedbackGeometry; /* resource */ -#ifndef WSM - String iconBoxGeometry; /* resource */ -#endif /* WSM */ String iconBoxName; /* resource */ String iconBoxSBDisplayPolicy; /* resource */ int iconBoxScheme; /* resource - testing */ @@ -1402,8 +1348,6 @@ typedef struct _WmScreenData Boolean iconBoxControl; /* FP control for icon box */ Boolean moveOpaque; /* move window not outlines */ -#ifdef WSM - /* pixel set info (from color object) */ XmPixelSet *pPixelData; /* all pixel data */ XmPixelSet *pActivePixelSet; /* ptr into pPixelData */ @@ -1412,7 +1356,6 @@ typedef struct _WmScreenData XmPixelSet *pSecondaryPixelSet; /* ptr into pPixelData */ XmPixelSet *pTextPixelSet; /* ptr into pPixelData */ int colorUse; /* indication from color obj */ -#endif /* WSM */ /* client frame component appearance resources and data: */ @@ -1437,7 +1380,6 @@ typedef struct _WmScreenData ClientListEntry *clientList; ClientListEntry *lastClient; -#ifdef WSM /* DtSessionHints for clients */ struct _DtSessionItem *pDtSessionItems; int totalSessionItems; @@ -1457,12 +1399,6 @@ typedef struct _WmScreenData DtSvcHandle hWsm; /* WORKSPACEMGR message handle */ Boolean bMarqueeSelectionInitialized; -#else /* WSM */ - /* workspace for this screen */ - - struct _WmWorkspaceData *pWS; -#endif /* WSM */ - } WmScreenData; typedef struct _WmScreenData *PtrScreenData; @@ -1494,21 +1430,12 @@ typedef struct _WmScreenData *PtrScreenData; #define FADE_ICON_GC(pcd) ((pcd)->pSD->fadeIconGC) #define FADE_ICON_TEXT_GC(pcd) ((pcd)->pSD->fadeIconTextGC) #define DEFAULT_PIXMAP(pcd) ((pcd)->pSD->defaultPixmap) -#ifdef WSM #define ICON_PLACE(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconPlace) #define ICON_X(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconX) #define ICON_Y(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconY) #define P_ICON_BOX(pcd) ((pcd)->pWsList[(pcd)->currentWsc].pIconBox) #define ICON_FRAME_WIN(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconFrameWin) -#else /* WSM */ -#define ICON_PLACE(pcd) ((pcd)->iconPlace) -#define ICON_X(pcd) ((pcd)->iconX) -#define ICON_Y(pcd) ((pcd)->iconY) -#define P_ICON_BOX(pcd) ((pcd)->pIconBox) -#define ICON_FRAME_WIN(pcd) ((pcd)->iconFrameWin) -#endif /* WSM */ - -#ifdef WSM + /* * Definitions for Screen data */ @@ -1589,7 +1516,6 @@ typedef struct _WmActionArg { String szExecParms; } WmActionArg; -#endif /* WSM */ @@ -1610,14 +1536,12 @@ typedef struct _WmWorkspaceData { int dataType; -#ifdef WSM WorkspaceID id; int map_state; BackdropData backdrop; Widget buttonW; XmString title; /* resource (visible name) */ String iconBoxGeometry;/* resource */ -#endif /* WSM */ String name; /* workspace name */ /* (used for resource fetching) */ @@ -1631,11 +1555,9 @@ typedef struct _WmWorkspaceData struct _ClientData *keyboardFocus; /* ptr to client with the key focus */ struct _ClientData *nextKeyboardFocus; /* next client to get focus */ -#ifdef WSM struct _ClientData **ppClients; /* list of client data ptrs */ unsigned int numClients; /* number of client in list */ unsigned int sizeClientList; /* size of client list */ -#endif /* WSM */ } WmWorkspaceData; @@ -1665,9 +1587,6 @@ typedef struct _WmWorkspaceData *PtrWorkspaceData; #define ACTIVE_LABEL_PARENT(pcd) ((pcd)->pSD->activeLabelParent) -#ifndef WSM -#define ICON_BOX_GEOMETRY(pcd) ((pcd)->pSD->iconBoxGeometry) -#endif /* WSM */ #define ICON_BOX_TITLE(pcd) ((pcd)->pSD->iconBoxTitle) #define TRANSIENT_DECORATION(pcd) ((pcd)->pSD->transientDecoration) @@ -1707,10 +1626,8 @@ typedef struct _ClientData int wmUnmapCount; struct _WmFpEmbeddedClientData *pECD; /* embedded client data */ struct _WmFpPushRecallClientData *pPRCD; /* embedded client data */ -#ifdef WSM Atom * paInitialProperties; /* initial window properties */ int numInitialProperties; /* number of initial properties */ -#endif /* WSM */ /* client supported protocols: */ @@ -1740,9 +1657,6 @@ typedef struct _ClientData #ifndef NO_OL_COMPAT Boolean bPseudoTransient; /* transientFor window group */ #endif /* NO_OL_COMPAT */ -#ifndef WSM - IconBoxData *pIconBox; /* icon box for this win */ -#endif /* WSM */ IconBoxData *thisIconBox; /* icon box data for self */ /* if this is an icon box */ Context grabContext; /* used to support icon box */ @@ -1751,10 +1665,8 @@ typedef struct _ClientData struct _ClientData *transientLeader; /* trans leader of this win */ struct _ClientData *transientChildren; /* transients of this win */ struct _ClientData *transientSiblings; /* related transient win's */ -#ifdef WSM int primaryStackPosition; /* stack pos'n of primary */ Boolean secondariesOnTop; /* resource */ -#endif /* WSM */ int primaryModalCount; /* primary modal win count */ int fullModalCount; /* full modal win count */ @@ -1860,12 +1772,6 @@ typedef struct _ClientData long iconFlags; XmString iconTitle; /* WM_ICON_NAME field */ -#ifndef WSM - int iconX; /* WM_HINTS field */ - int iconY; /* WM_HINTS field */ - int iconPlace; - Window iconFrameWin; -#endif /* WSM */ Pixmap iconPixmap; /* WM_HINTS field */ Pixmap iconMask; /* WM_HINTS field */ Window iconWindow; /* WM_HINTS field */ @@ -1874,7 +1780,6 @@ typedef struct _ClientData /* to reflect the */ RList *piconBottomShadows; /* depressed icon image */ -#ifdef WSM /* workspace data */ int absentMapBehavior; /* resource */ @@ -1890,7 +1795,6 @@ typedef struct _ClientData Window attachWindow; /* _DT_WM_HINTS */ SlideDirection slideDirection; /* slide-up direction */ SlideOutRec *pSOR; /* slide-out record */ -#endif /* WSM */ #ifndef NO_SHAPE short wShaped; /* this window has a bounding shape */ #endif /* NO_SHAPE */ @@ -1921,15 +1825,13 @@ typedef struct _ClientData *PtrClientData; #define NORMAL_STATE 1 #define MINIMIZED_STATE 2 #define MAXIMIZED_STATE 3 -#ifdef WSM #define UNSEEN_STATE 8 -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define NO_CHANGE -1 # define UNSET 0 # define SET 1 -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* clientFlags field values: */ #define CLIENT_HINTS_TITLE (1L << 0) @@ -1948,9 +1850,7 @@ typedef struct _ClientData *PtrClientData; #define FRONT_PANEL_BOX (1L << 14) /* a DT 3.0 front panel */ #define GOT_DT_WM_HINTS (1L << 15) -#ifdef WSM #define SM_LAUNCHED (1L << 17) /* launched by dtsession */ -#endif /* WSM */ #define SM_X (1L << 18) /* X from DB/dtsession */ #define SM_Y (1L << 19) /* Y from DB/dtsession */ @@ -1991,8 +1891,7 @@ typedef struct _ClientData *PtrClientData; /* global return buffer */ #define MAXWMPATH 1023 #define MAXBUF (MAXWMPATH+1) -#ifdef WSM - + /*************************************<->************************************* * * WsClientData @@ -2015,7 +1914,6 @@ typedef struct _WsClientData } WsClientData; -#endif /* WSM */ /* * frame style types @@ -2047,9 +1945,7 @@ typedef struct _WmGlobalData char **environ; /* environment vector */ char *mwmName; /* name of our executable */ Widget topLevelW; -#ifdef WSM Widget topLevelW1; /* from which WM components hang */ -#endif /* WSM */ Boolean confirmDialogMapped; /* confirm dialog is mapped */ XtAppContext mwmAppContext; /* application context for mwm */ XContext windowContextType; /* window context for XSaveContext */ @@ -2057,21 +1953,17 @@ typedef struct _WmGlobalData #ifndef IBM_169380 XContext cmapWindowContextType; /* list of pCD's in WM_COLORMAP_WINDOWS context for XSaveContext */ #endif -#ifdef WSM XContext mwmWindowContextType; /* mwm win context for XSaveContext */ Window dtSmWindow; /* used for contention management */ Window commandWindow; /* WM_SAVE_YOURSELF win for dtwm */ -#endif /* WSM */ /* presentation resource id's: */ String displayString; /* used for putenv in F_Exec */ Display *display; /* display we are running to */ -#ifdef WSM Display *display1; /* second display connection */ int statusColorServer; /* CSERVE_NORMAL, CSERVE_NOT_AVAILABLE */ DtWmpParseBuf *pWmPB; /* global parse buffer */ -#endif /* WSM */ int numScreens; /* number of screens */ unsigned char **screenNames; /* default names for screens */ WmScreenData *Screens; /* array of screen info */ @@ -2136,10 +2028,6 @@ typedef struct _WmGlobalData /* Resource database used to restore client geometries, etc. */ XrmDatabase clientResourceDB; -#ifndef WSM - char *dbFileName; - String sessionClientDB; /* resource */ -#endif /* atoms used in inter-client communication: */ @@ -2156,7 +2044,7 @@ typedef struct _WmGlobalData Atom xa_MWM_INFO; Atom xa_MWM_OFFSET; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) Atom *xa_WM; Atom xa_TARGETS; @@ -2181,7 +2069,7 @@ typedef struct _WmGlobalData /* automation support */ Atom _MOTIF_WM_AUTOMATION; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ Atom xa_MOTIF_BINDINGS; Atom xa_COMPOUND_TEXT; @@ -2189,8 +2077,6 @@ typedef struct _WmGlobalData Atom xa_WMSAVE_HINT; -#ifdef WSM - /* atoms used for workspace management: */ Atom xa_DT_WORKSPACE_HINTS; @@ -2211,7 +2097,7 @@ typedef struct _WmGlobalData Atom xa_DT_WM_EXIT_SESSION; Atom xa_DT_WM_LOCK_DISPLAY; Atom xa_DT_WM_READY; -#endif /* WSM */ + #ifndef NO_OL_COMPAT Atom xa_OL_WIN_ATTR; Atom xa_OL_DECOR_RESIZE; @@ -2236,23 +2122,17 @@ typedef struct _WmGlobalData Boolean autoKeyFocus; /* resource */ int autoRaiseDelay; /* resource */ String bitmapDirectory; /* resource */ -#ifdef WSM String backdropDirs; /* resource */ -#endif /* WSM */ Boolean clientAutoPlace; /* resource */ int colormapFocusPolicy; /* resource */ String configFile; /* resource */ -#ifdef WSM String cppCommand; /* resource */ -#endif /* WSM */ Boolean deiconifyKeyFocus; /* resource */ int doubleClickTime; /* resource */ Boolean enableWarp; /* resource */ Boolean enforceKeyFocus; /* resource */ Boolean freezeOnConfig; /* resource - testing */ -#ifdef WSM Boolean useWindowOutline; /* resource */ -#endif /* WSM */ Boolean iconAutoPlace; /* resource */ Boolean iconClick; /* resource */ Boolean interactivePlacement; /* resource */ @@ -2269,26 +2149,21 @@ typedef struct _WmGlobalData Boolean multiScreen; /* resource */ String screenList; /* resource */ int showFeedback; /* resource */ -#ifdef WSM Boolean refreshByClearing; /* resource */ Boolean rootButtonClick; /* resource */ -#endif /* WSM */ Boolean startupKeyFocus; /* resource */ Boolean systemButtonClick; /* resource */ Boolean systemButtonClick2; /* resource */ Boolean useLargeCursors; Boolean useFrontPanel; /* resource */ -#ifdef WSM String helpDirectory; /* resource */ Window requestContextWin; /* for WmRequest f.fcns */ -#endif /* WSM */ Boolean dtLite; /* resource */ Boolean blinkOnExec; /* resource */ WmScreenData *dtSD; /* screen for front panel */ int iSlideUpsInProgress; Boolean waitForClicks; /* resource */ FrameStyle frameStyle; /* resource */ -#ifdef WSM Dimension iconExternalShadowWidth; /* resource */ Dimension frameExternalShadowWidth; /* resource */ int marqueeSelectGranularity; /* resource */ @@ -2297,7 +2172,6 @@ typedef struct _WmGlobalData Boolean bReplayedButton; /* true if button replayed */ Boolean bSuspendSecondaryRestack; /* overrides transient stacking */ -#endif /* WSM */ XmString clientDefaultTitle; XmString iconDefaultTitle; @@ -2329,9 +2203,7 @@ typedef struct _WmGlobalData /* quick references to global data: */ #define DISPLAY wmGD.display -#ifdef WSM #define DISPLAY1 wmGD.display1 -#endif /* WSM */ #define ACTIVE_PSD (wmGD.pActiveSD) #define ACTIVE_SCREEN (wmGD.pActiveSD->screen) #define ACTIVE_WS (wmGD.pActiveSD->pActiveWS) @@ -2341,12 +2213,10 @@ typedef struct _WmGlobalData /* According to the xkb protocol bits 13 and 14 are interpreted as a */ /* two-bit unsigned numeric value and report the state keyboard group */ #define NOLOCKMOD(state) ((state) & ~wmGD.lockingModMask & ~(3 << 13)) -#ifdef WSM /* absent map behavior policy values (absentMapBehavior): */ #define AMAP_BEHAVIOR_ADD 0 #define AMAP_BEHAVIOR_MOVE 1 #define AMAP_BEHAVIOR_IGNORE 2 -#endif /* WSM */ /* colormap focus policy values (colormapFocus): */ #define CMAP_FOCUS_EXPLICIT 0 @@ -2399,9 +2269,7 @@ typedef struct _WmGlobalData #define MOVE_CLIENT 1 #define RESIZE_CLIENT 2 #define PLACE_CLIENT 3 -#ifdef WSM #define MARQUEE_SELECT 4 -#endif /* WSM */ /* Motif input bindings file name */ #define MOTIF_BINDINGS_FILE ".motifbind" @@ -2486,12 +2354,8 @@ extern char *_DtGetMessage(char *filename, int set, int n, char *s); # else /* __ultrix */ # define _CLIENT_CAT_NAME "dtwm" # endif /* __ultrix */ -# ifdef WSM -# define GETMESSAGE(set, number, string)\ +# define GETMESSAGE(set, number, string)\ _DtGetMessage(_CLIENT_CAT_NAME, set, number, string) -# else -# define GETMESSAGE(set, number, string) (string) -# endif /* WSM */ #else # define GETMESSAGE(set, number, string)\ string diff --git a/cde/programs/dtwm/WmGraphics.c b/cde/programs/dtwm/WmGraphics.c index 1ba96516..edc7ed1d 100644 --- a/cde/programs/dtwm/WmGraphics.c +++ b/cde/programs/dtwm/WmGraphics.c @@ -1110,42 +1110,22 @@ void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y, char *string, * B/W displays. * *************************************<->***********************************/ -#ifdef WSM void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, XmString xmstring, GC gc, Position x, Position y, Dimension width, XRectangle *pbox, Boolean bCenter) -#else /* WSM */ -void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, - XmString xmstring, GC gc, Position x, Position y, - Dimension width, XRectangle *pbox) -#endif /* WSM */ { Dimension textWidth; -#ifdef WSM int alignment; -#else /* WSM */ - int alignment = XmALIGNMENT_BEGINNING; -#endif /* WSM */ textWidth = XmStringWidth(xmfontlist, xmstring); -#ifdef WSM alignment = bCenter ? XmALIGNMENT_CENTER : XmALIGNMENT_BEGINNING; if (textWidth >= pbox->width) /* can't center text if no room */ { /* left justify & clip text */ alignment = XmALIGNMENT_BEGINNING; } -#else /* WSM */ - if (textWidth < pbox->width) { /* center text if there's room */ - alignment = XmALIGNMENT_CENTER; - } - else - { /* left justify & clip text */ - alignment = XmALIGNMENT_BEGINNING; - } -#endif /* WSM */ if (ACTIVE_PSD->cleanText) { @@ -1160,8 +1140,6 @@ void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, } } /* END OF FUNCTION WmDrawXmString */ -#ifdef WSM - /*************************************<->************************************* * * WmInstallBitmapIntoXmCache (pchName, bitmap, width, height) @@ -1258,4 +1236,3 @@ void WmInstallBitmapDataIntoXmCache (WmScreenData *pSD, } } /* END OF FUNCTION WmInstallBitmapDataIntoXmCache */ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmGraphics.h b/cde/programs/dtwm/WmGraphics.h index 7c7f09e6..eb902e85 100644 --- a/cde/programs/dtwm/WmGraphics.h +++ b/cde/programs/dtwm/WmGraphics.h @@ -52,16 +52,10 @@ extern void StretcherCorner (RList *prTop, RList *prBot, int x, int y, unsigned int cwidth, unsigned int cheight); extern void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y, char *string, unsigned int length); -#ifdef WSM extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, XmString xmstring, GC gc, Position x, Position y, Dimension width, XRectangle *pbox, Boolean bCenter); -#else /* WSM */ -extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, - XmString xmstring, GC gc, Position x, Position y, - Dimension width, XRectangle *pbox); -#endif /* WSM */ extern GC WmGetGC (WmScreenData *pSD, unsigned long gc_mask, XGCValues *pGcv); diff --git a/cde/programs/dtwm/WmHelp.c b/cde/programs/dtwm/WmHelp.c index 58686f0c..f84defb8 100644 --- a/cde/programs/dtwm/WmHelp.c +++ b/cde/programs/dtwm/WmHelp.c @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. @@ -3038,7 +3037,6 @@ wmDtErrorDialogPopupCB( } /* END OF FUNCTION wmDtErrorDialogPopupCB */ /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmHelp.h b/cde/programs/dtwm/WmHelp.h index 160d1f9d..e74a426b 100644 --- a/cde/programs/dtwm/WmHelp.h +++ b/cde/programs/dtwm/WmHelp.h @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. @@ -82,4 +81,3 @@ extern void WmDtWmTopicHelpCB (Widget theWidget, /******** End Public Function Declarations ********/ /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmIBitmap.h b/cde/programs/dtwm/WmIBitmap.h index ebccb04a..4978ba62 100644 --- a/cde/programs/dtwm/WmIBitmap.h +++ b/cde/programs/dtwm/WmIBitmap.h @@ -255,7 +255,6 @@ static unsigned char fntpl_i_bm_bits[] = { #endif /* DTWM_NEED_FNTPL */ -#ifdef WSM /* * Backdrop bitmap patterns */ @@ -297,7 +296,6 @@ static unsigned char bits6_bits[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; #endif /* DTWM_NEED_BACKBITS */ -#endif /* WSM */ /* * * Used to define the small hourglass and mask used to indicate @@ -323,6 +321,4 @@ static unsigned char time16m_bits[] = { 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f}; #endif /* DTWM_NEED_TIME16 */ -#ifdef WSM /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmIDecor.c b/cde/programs/dtwm/WmIDecor.c index 5c4df5ce..0754e739 100644 --- a/cde/programs/dtwm/WmIDecor.c +++ b/cde/programs/dtwm/WmIDecor.c @@ -47,9 +47,7 @@ #include "WmIconBox.h" #include "WmMenu.h" #include "WmWinInfo.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ @@ -100,9 +98,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd) unsigned long attr_mask; int xOffset; int yOffset; -#ifdef WSM WsClientData *pWsc = GetWsClientData (pWS, pcd); -#endif /* WSM */ /* @@ -145,24 +141,13 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd) ICON_APPEARANCE(pcd).background; } -#ifdef WSM if ((!pcd->pSD->useIconBox) || (pcd->clientFlags & (CLIENT_WM_CLIENTS | FRONT_PANEL_BOX))) -#else - if ((!pcd->pSD->useIconBox) || (pcd->clientFlags & ICON_BOX)) -#endif /* WSM */ { -#ifdef WSM pWsc->iconFrameWin = XCreateWindow (DISPLAY, ROOT_FOR_CLIENT(pcd), /* parent */ pWsc->iconX, pWsc->iconY, -#else /* WSM */ - pcd->iconFrameWin = XCreateWindow (DISPLAY, - ROOT_FOR_CLIENT(pcd), /* parent */ - pcd->iconX, - pcd->iconY, -#endif /* WSM */ (unsigned int) ICON_WIDTH(pcd), (unsigned int) ICON_HEIGHT(pcd), 0, /* border width */ @@ -183,11 +168,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd) */ if ((pcd->pSD->useIconBox) && -#ifdef WSM (!(pcd->clientFlags & CLIENT_WM_CLIENTS)) && -#else - (!(pcd->clientFlags & ICON_BOX)) && -#endif /* WSM */ (pcd->clientFunctions & MWM_FUNC_MINIMIZE) ) { if (!InsertIconIntoBox(pWS->pIconBox, pcd)) @@ -244,9 +225,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd) ReparentIconWindow (pcd, xOffset, yOffset); } -#ifdef WSM if (pcd->piconTopShadows->used == 0) -#endif /* WSM */ MakeIconShadows (pcd, xOffset, yOffset); return(TRUE); @@ -860,13 +839,9 @@ void DrawIconTitle (ClientData *pcd) GetIconTitleBox (pcd, &textBox); /* get appropriate GCs */ -#ifdef WSM if ((ACTIVE_PSD->useIconBox && !((pcd->dtwmBehaviors & (DtWM_BEHAVIOR_PANEL)) || (pcd->clientFlags & CLIENT_WM_CLIENTS))) || -#else - if ((ACTIVE_PSD->useIconBox && !(pcd->clientFlags & ICON_BOX)) || -#endif /* WSM */ !(wmGD.keyboardFocus == pcd)) { iconGC = ICON_APPEARANCE(pcd).inactiveGC; @@ -892,15 +867,9 @@ void DrawIconTitle (ClientData *pcd) /* paint the text */ -#ifdef WSM WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList, pcd->iconTitle, iconGC, textBox.x, textBox.y, textBox.width, &textBox, True); -#else /* WSM */ - WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList, - pcd->iconTitle, iconGC, - textBox.x, textBox.y, textBox.width, &textBox); -#endif /* WSM */ } /* END OF FUNCTION DrawIconTitle */ @@ -952,13 +921,8 @@ void RedisplayIconTitle (ClientData *pcd) * Get appropriate GCs * Dim text if this is in the icon box and the client is mapped */ -#ifdef WSM if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) && !(pcd->clientFlags & CLIENT_WM_CLIENTS)) || -#else - if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) && - !(pcd->clientFlags & ICON_BOX)) || -#endif /* WSM */ !(wmGD.keyboardFocus == pcd)) { iconGC = ICON_APPEARANCE(pcd).inactiveGC; @@ -984,18 +948,11 @@ void RedisplayIconTitle (ClientData *pcd) FALSE); /* in with the new */ -#ifdef WSM WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList, pcd->iconTitle, iconGC, textBox.x, textBox.y, textBox.width, &textBox, True); -#else /* WSM */ - WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), - ICON_APPEARANCE(pcd).fontList, - pcd->iconTitle, iconGC, - textBox.x, textBox.y, textBox.width, &textBox); -#endif /* WSM */ /* * Erase & paint text in the active icon text window @@ -1825,17 +1782,10 @@ void PaintActiveIconText (ClientData *pcd, Boolean erase) FALSE); } -#ifdef WSM WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin, ICON_APPEARANCE(pcd).fontList, pcd->iconTitle, iconGC, textBox.x, textBox.y, textBox.width, &textBox, True); -#else /* WSM */ - WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin, - ICON_APPEARANCE(pcd).fontList, - pcd->iconTitle, iconGC, - textBox.x, textBox.y, textBox.width, &textBox); -#endif /* WSM */ } /* END OF FUNCTION PaintActiveIconText */ diff --git a/cde/programs/dtwm/WmIPC.c b/cde/programs/dtwm/WmIPC.c index 96cd2919..1f2142ba 100644 --- a/cde/programs/dtwm/WmIPC.c +++ b/cde/programs/dtwm/WmIPC.c @@ -859,11 +859,7 @@ RequestMsgCB(Tt_message m, Tt_pattern p) pCD = clients[i]; strcpy(ptr, pCD->smClientID); clientWorkspaces[i] = -#ifdef WSM pCD->pWsList[pCD->currentWsc].wsID; -#else - pCD->pSD->pWS->id; -#endif } } } diff --git a/cde/programs/dtwm/WmIPlace.c b/cde/programs/dtwm/WmIPlace.c index bdc06be0..723314e8 100644 --- a/cde/programs/dtwm/WmIPlace.c +++ b/cde/programs/dtwm/WmIPlace.c @@ -44,9 +44,7 @@ #include "WmIDecor.h" #include "WmIconBox.h" #include "WmWinConf.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ /* @@ -802,9 +800,7 @@ void PackRootIcons (void) ClientData *pCD; ClientData *pCD_active; int hasActiveText = 1; -#ifdef WSM WsClientData *pWsc; -#endif /* WSM */ /* * find context of the activeIconTextWin to get pCD and then @@ -841,39 +837,23 @@ void PackRootIcons (void) MoveIconInfo (&ACTIVE_WS->IPData, iOld, iNew); pCD = ACTIVE_WS->IPData.placeList[iNew].pCD; -#ifdef WSM pWsc = GetWsClientData (ACTIVE_WS, pCD); pWsc->iconPlace = iNew; CvtIconPlaceToPosition (&ACTIVE_WS->IPData, pWsc->iconPlace, &pWsc->iconX, &pWsc->iconY); -#else /* WSM */ - pCD->iconPlace = iNew; - CvtIconPlaceToPosition (&ACTIVE_WS->IPData, - pCD->iconPlace, &pCD->iconX, &pCD->iconY); -#endif /* WSM */ if (hasActiveText && (pCD == pCD_active)) { /* hide activeIconTextWin first */ HideActiveIconText ((WmScreenData *)NULL); -#ifdef WSM XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX, pWsc->iconY); -#else /* WSM */ - XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX, - pCD->iconY); -#endif /* WSM */ ShowActiveIconText (pCD); } else { -#ifdef WSM XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX, pWsc->iconY); -#else /* WSM */ - XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX, - pCD->iconY); -#endif /* WSM */ } } } @@ -908,28 +888,21 @@ void PackRootIcons (void) void MoveIconInfo (IconPlacementData *pIPD, int p1, int p2) { -#ifdef WSM WsClientData *pWsc; -#endif /* WSM */ /* only move if destination is empty */ if (pIPD->placeList[p2].pCD == NULL) { pIPD->placeList[p2].pCD = pIPD->placeList[p1].pCD; pIPD->placeList[p2].theWidget = pIPD->placeList[p1].theWidget; -#ifdef WSM pWsc = GetWsClientData (pIPD->placeList[p2].pCD->pSD->pActiveWS, pIPD->placeList[p2].pCD); pWsc->iconPlace = p2; -#else /* WSM */ - pIPD->placeList[p2].pCD->iconPlace = p2; -#endif /* WSM */ pIPD->placeList[p1].pCD = NULL; pIPD->placeList[p1].theWidget = NULL; } } -#ifdef WSM + /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmIconBox.c b/cde/programs/dtwm/WmIconBox.c index a2ae9285..beb24764 100644 --- a/cde/programs/dtwm/WmIconBox.c +++ b/cde/programs/dtwm/WmIconBox.c @@ -39,9 +39,7 @@ */ #include "WmGlobal.h" -#ifdef WSM #include "WmHelp.h" -#endif /* WSM */ #include #include #include @@ -89,9 +87,7 @@ #include "WmResParse.h" #include "WmResource.h" #include "WmWinInfo.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) @@ -129,16 +125,13 @@ Const char *szvertical = "vertical"; void InitIconBox (WmScreenData *pSD) { -#ifdef WSM int iws; -#endif /* WSM */ /* * Start the process of making the icon boxes */ -#ifdef WSM /* * Manage a separate icon box in every workspace * on this screen. @@ -148,10 +141,6 @@ void InitIconBox (WmScreenData *pSD) AddIconBoxForWorkspace (&pSD->pWS[iws]); } -#else /* WSM */ - ManageWindow (pSD, None, MANAGEW_ICON_BOX); -#endif /* WSM */ - if (pSD->fadeNormalIcon) { MakeFadeIconGC (pSD); @@ -160,8 +149,6 @@ void InitIconBox (WmScreenData *pSD) } /* END OF FUNCTION InitIconBox */ -#ifdef WSM - /*************************************<->************************************* * * AddIconBoxForWorkspace (pWS) @@ -182,9 +169,7 @@ void AddIconBoxForWorkspace (WmWorkspaceData *pWS) ManageWindow (pWS->pSD, None, MANAGEW_ICON_BOX); } /* END OF FUNCTION AddIconBoxForWorkspace */ -#endif /* WSM */ - /*************************************<->************************************* * * MakeIconBox (pWS, pCD); @@ -284,8 +269,6 @@ Boolean MakeIconBox (WmWorkspaceData *pWS, ClientData *pCD) } /* END OF FUNCTION MakeIconBox */ -#ifdef WSM - /*************************************<->************************************* * * DestroyIconBox (pWS) @@ -328,9 +311,7 @@ void DestroyIconBox (WmWorkspaceData *pWS) XtFree ((char *) pIBD); } /* END OF FUNCTION DestroyIconBox */ -#endif /* WSM */ - /*************************************<->************************************* * * MakeShell (pWS, pIBD) @@ -367,9 +348,7 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD) Arg setArgs[20]; int i; -#ifdef WSM char *pchIBTitle = NULL; -#endif /* WSM */ /* * Create top level application shell for icon box @@ -383,15 +362,6 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD) XtSetArg (setArgs[i], XmNkeyboardFocusPolicy, (XtArgVal)XmEXPLICIT); i++; -#ifndef WSM - if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW)))) - { - XtSetArg (setArgs[i], XmNbackground, - (XtArgVal) pWS->pSD->clientAppearance.background ); i++; - XtSetArg (setArgs[i], XmNforeground, - (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++; - } -#else /* WSM */ if (pWS->pSD->iconBoxTitle) { pchIBTitle = WmXmStringToString (pWS->pSD->iconBoxTitle); @@ -399,7 +369,6 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD) XtSetArg (setArgs[i], XmNtitle, (XtArgVal)pchIBTitle); i++; XtSetArg (setArgs[i], XmNiconName, (XtArgVal)pchIBTitle); i++; } -#endif /* WSM */ XtSetArg (setArgs[i], XmNmappedWhenManaged, (XtArgVal)False); i++; XtSetArg (setArgs[i], XmNdialogStyle, (XtArgVal)XmDIALOG_MODELESS); i++; XtSetArg (setArgs[i], XmNdepth, @@ -407,19 +376,12 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD) XtSetArg (setArgs[i], XmNscreen, (XtArgVal) ScreenOfDisplay (DISPLAY, pWS->pSD->screen)); i++; -#ifdef WSM pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNclient, topLevelShellWidgetClass, pWS->workspaceTopLevelW, (ArgList)setArgs, i); if (pchIBTitle != NULL) XtFree (pchIBTitle); -#else /* WSM */ - pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNiconBox, - topLevelShellWidgetClass, - pWS->workspaceTopLevelW, - (ArgList)setArgs, i); -#endif /* WSM */ } /* END OF FUNCTION MakeShell */ @@ -466,17 +428,6 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD) */ i=0; -#ifndef WSM -/* - if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW)))) - { - XtSetArg (setArgs[i], XmNbackground, - (XtArgVal) pWS->pSD->clientAppearance.background ); i++; - XtSetArg (setArgs[i], XmNforeground, - (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++; - } -*/ -#endif /* WSM */ XtSetArg (setArgs[i], XmNborderWidth, (XtArgVal) 0 ); i++; XtSetArg (setArgs[i], XmNmarginWidth, (XtArgVal) 0 ); i++; XtSetArg (setArgs[i], XmNmarginHeight, (XtArgVal) 0 ); i++; @@ -488,11 +439,9 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD) pIBD->shellWidget, (ArgList)setArgs, i); -#ifdef WSM XtAddCallback (pIBD->frameWidget, XmNhelpCallback, WmDtWmTopicHelpCB, WM_DT_ICONBOX_TOPIC); -#endif /* WSM */ /* * Create scrolled window to hold row column manager */ @@ -503,16 +452,6 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD) XtSetArg (setArgs[i], XmNborderWidth , (XtArgVal) 0 ); i++; XtSetArg (setArgs[i], XmNspacing , (XtArgVal) IB_MARGIN_WIDTH ); i++; -#ifndef WSM - - if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW)))) - { - XtSetArg (setArgs[i], XmNbackground, - (XtArgVal) pWS->pSD->clientAppearance.background ); i++; - XtSetArg (setArgs[i], XmNforeground, - (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++; - } -#endif /* WSM */ /* * do we want to get these from a resource or set it here * to control the appearance of the iconBox @@ -596,17 +535,6 @@ void MakeBulletinBoard (WmWorkspaceData *pWS, IconBoxData *pIBD) #endif /* DEBUG_ICON_BOX */ XtSetArg (setArgs[i], XmNshadowThickness,(XtArgVal) 0); i++; -#ifndef WSM - if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW)))) - { - XtSetArg (setArgs[i], XmNforeground, - (XtArgVal) pWS->pSD->clientAppearance.background ); i++; - XtSetArg (setArgs[i], XmNbottomShadowColor, - (XtArgVal) pWS->pSD->clientAppearance.bottomShadowColor ); i++; - XtSetArg (setArgs[i], XmNtopShadowColor, - (XtArgVal) pWS->pSD->clientAppearance.topShadowColor ); i++; - } -#endif /* WSM */ XtSetArg (setArgs[i], XmNspacing , 0); i++; XtSetArg (setArgs[i], XmNmarginHeight , 0); i++; @@ -851,9 +779,7 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD) pIBD->scrolledWidget = NULL; pIBD->bBoardWidget = NULL; pIBD->clipWidget = NULL; -#ifdef WSM pIBD->wsID = pWS->id; -#endif /* WSM */ ToLower (pWS->pSD->iconBoxSBDisplayPolicy); @@ -871,11 +797,7 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD) * iconBoxGeometry width and height are not specified */ -#ifdef WSM if (pWS->iconBoxGeometry == NULL) /* not set by user */ -#else /* WSM */ - if (pWS->pSD->iconBoxGeometry == NULL) /* not set by user */ -#endif /* WSM */ { /* * Use the iconPlacement resource @@ -898,13 +820,8 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD) } else { -#ifdef WSM mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y, &width, &height); -#else /* WSM */ - mask = XParseGeometry(pWS->pSD->iconBoxGeometry, &X, &Y, - &width, &height); -#endif /* WSM */ if ((mask & WidthValue) && (width > 0)) { @@ -1385,13 +1302,8 @@ void SetGeometry (WmWorkspaceData *pWS, ClientData *pCD, IconBoxData *pIBD) * Set initial placement of icon box */ -#ifdef WSM mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y, &width, &height); -#else /* WSM */ - mask = XParseGeometry(pCD->pSD->iconBoxGeometry, - &X, &Y, &width, &height); -#endif /* WSM */ if (mask & XValue) { @@ -1720,10 +1632,6 @@ void MapIconBoxes (WmWorkspaceData *pWS) while (pibd) { XtPopup(pibd->shellWidget, XtGrabNone); -#ifndef WSM - F_Raise (NULL, pibd->pCD_iconBox, (XEvent *)NULL); - XMapWindow (DISPLAY, pibd->pCD_iconBox->clientFrameWin); -#endif /* WSM */ pibd = pibd->pNextIconBox; } } @@ -1731,8 +1639,6 @@ void MapIconBoxes (WmWorkspaceData *pWS) } /* END OF FUNCTION MapIconBoxes */ -#ifdef WSM - /*************************************<->************************************* * * UnmapIconBoxes (pWS) @@ -1775,7 +1681,6 @@ void UnmapIconBoxes (WmWorkspaceData *pWS) } } /* END OF FUNCTION UnmapIconBoxes */ -#endif /* WSM */ /******************************<->************************************* * @@ -1907,12 +1812,10 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) Widget iconWidget; IconInfo *pIconInfo; static XmString dummyString = NULL; -#ifdef WSM WsClientData *pWsc; WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID); pWsc = GetWsClientData (pWS, pCD); -#endif /* WSM */ /* * If we go to multiple icon boxes, find the box this client @@ -1925,11 +1828,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) if (pCD->client) { -#ifdef WSM pWsc->pIconBox = tmpPointerToIconBox; -#else /* WSM */ - P_ICON_BOX(pCD) = tmpPointerToIconBox; -#endif /* WSM */ iconWidth = ICON_WIDTH(pCD) + (2 * IB_MARGIN_WIDTH); @@ -1937,19 +1836,11 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) iconHeight = ICON_HEIGHT(pCD) + (2 * IB_MARGIN_HEIGHT); -#ifdef WSM pIconInfo = InsertIconInfo (pWsc->pIconBox, pCD, (Widget) NULL); -#else /* WSM */ - pIconInfo = InsertIconInfo (P_ICON_BOX(pCD), pCD, (Widget) NULL); -#endif /* WSM */ if (pIconInfo) { -#ifdef WSM pWsc->pIconBox->numberOfIcons++; -#else /* WSM */ - P_ICON_BOX(pCD)->numberOfIcons++; -#endif /* WSM */ i = 0; XtSetArg (setArgs[i], XmNbackground, @@ -1957,13 +1848,8 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) XtSetArg (setArgs[i], XmNforeground, (XtArgVal) ICON_APPEARANCE(pCD).foreground ); i++; -#ifdef WSM XtSetArg (setArgs[i], XmNx , (XtArgVal) pWsc->iconX); i++; XtSetArg (setArgs[i], XmNy , (XtArgVal) pWsc->iconY); i++; -#else /* WSM */ - XtSetArg (setArgs[i], XmNx , (XtArgVal) ICON_X(pCD)); i++; - XtSetArg (setArgs[i], XmNy , (XtArgVal) ICON_Y(pCD)); i++; -#endif /* WSM */ XtSetArg (setArgs[i], XmNwidth , (XtArgVal) iconWidth); i++; XtSetArg (setArgs[i], XmNheight , (XtArgVal) iconHeight); i++; @@ -1990,11 +1876,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) iconWidget = XtCreateManagedWidget("iconInIconBox", xmDrawnButtonWidgetClass, -#ifdef WSM pWsc->pIconBox->bBoardWidget, -#else /* WSM */ - P_ICON_BOX(pCD)->bBoardWidget, -#endif /* WSM */ (ArgList)setArgs, i); if (dummyString == NULL) @@ -2011,11 +1893,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) pIconInfo->theWidget = iconWidget; -#ifdef WSM pWsc->iconFrameWin = XtWindow (iconWidget); -#else /* WSM */ - ICON_FRAME_WIN(pCD) = XtWindow (iconWidget); -#endif /* WSM */ XtAddCallback (iconWidget, XmNactivateCallback, (XtCallbackProc)IconActivateCallback, @@ -2055,19 +1933,11 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) } } -#ifdef WSM ResetIconBoxMaxSize(pWsc->pIconBox->pCD_iconBox, pWsc->pIconBox->bBoardWidget); ResetArrowButtonIncrements (pWsc->pIconBox->pCD_iconBox); -#else /* WSM */ - ResetIconBoxMaxSize(P_ICON_BOX(pCD)->pCD_iconBox, - P_ICON_BOX(pCD)->bBoardWidget); - - ResetArrowButtonIncrements (P_ICON_BOX(pCD)->pCD_iconBox); - -#endif /* WSM */ rval = True; } } @@ -2114,9 +1984,7 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) Arg setArgs[3]; Arg getArgs[4]; Dimension clipWidth, clipHeight; -#ifdef WSM WsClientData *pWsc; -#endif /* WSM */ place = GetNextIconPlace (&pIBD->IPD); if (place == NO_ICON_PLACE) @@ -2158,7 +2026,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) pII->pCD = pCD; -#ifdef WSM pWsc = GetWsClientData (GetWorkspaceData (pCD->pSD, pIBD->wsID), pCD); pWsc->iconPlace = place; @@ -2171,19 +2038,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) pIBD->currentCol = pWsc->iconX / pIBD->pCD_iconBox->widthInc; pIBD->currentRow = pWsc->iconY / pIBD->pCD_iconBox->heightInc; -#else /* WSM */ - ICON_PLACE(pCD) = place; - - CvtIconPlaceToPosition (&pIBD->IPD, ICON_PLACE(pCD), - &ICON_X(pCD), &ICON_Y(pCD)); - - - /* update next free position */ - - pIBD->currentCol = ICON_X(pCD) / pIBD->pCD_iconBox->widthInc; - pIBD->currentRow = ICON_Y(pCD) / pIBD->pCD_iconBox->heightInc; - -#endif /* WSM */ /* * Increase bboard size if necessary @@ -2204,7 +2058,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) if (pIBD->currentRow > pIBD->lastRow) { pIBD->lastRow = pIBD->currentRow; -#ifdef WSM if (clipHeight <= (Dimension) (pWsc->iconY + pIBD->pCD_iconBox->heightInc)) { @@ -2214,16 +2067,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) XtSetArg (setArgs[i], XmNheight, (XtArgVal) pWsc->iconY + pIBD->pCD_iconBox->heightInc); i++; } -#else /* WSM */ - if (clipHeight <= (pII->pCD->iconY + pIBD->pCD_iconBox->heightInc)) - { - /* - * Increase bulletin board height as needed. - */ - XtSetArg (setArgs[i], XmNheight, (XtArgVal) - pII->pCD->iconY + pIBD->pCD_iconBox->heightInc); i++; - } -#endif /* WSM */ } } else @@ -2231,7 +2074,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) if (pIBD->currentCol > pIBD->lastCol) { pIBD->lastCol = pIBD->currentCol; -#ifdef WSM if (clipWidth <= (Dimension) (pWsc->iconX + pIBD->pCD_iconBox->widthInc)) { @@ -2242,17 +2084,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget) (XtArgVal) pWsc->iconX + pIBD->pCD_iconBox->widthInc); i++; } -#else /* WSM */ - if (clipWidth <= (pII->pCD->iconX + pIBD->pCD_iconBox->widthInc)) - { - /* - * Increase bulletin board width as needed - */ - XtSetArg (setArgs[i], XmNwidth, - (XtArgVal) pII->pCD->iconX + - pIBD->pCD_iconBox->widthInc); i++; - } -#endif /* WSM */ } if (pIBD->currentRow > pIBD->lastRow) @@ -2294,12 +2125,10 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD) Dimension oldWidth, oldHeight; int newWidth, newHeight; int i, newCols, newRows; -#ifdef WSM WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID); WsClientData *pWsc; pWsc = GetWsClientData (pWS, pCD); -#endif /* WSM */ i = 0; XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++; @@ -2329,7 +2158,6 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD) } } -#ifdef WSM DeleteIconInfo (pWsc->pIconBox, pCD); pWsc->pIconBox->numberOfIcons--; @@ -2338,13 +2166,6 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD) pWsc->pIconBox = NULL; pWsc->iconPlace = NO_ICON_PLACE; -#else /* WSM */ - DeleteIconInfo (P_ICON_BOX(pCD), pCD); - - pCD->pIconBox->numberOfIcons--; - - theChild = XtWindowToWidget (DISPLAY, ICON_FRAME_WIN(pCD)); -#endif /* WSM */ XtUnmanageChild (theChild); XtDestroyWidget (theChild); @@ -2865,10 +2686,8 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas int newWidth, newHeight; int i; Boolean rippling = False; -#ifdef WSM WsClientData *pWsc; WmWorkspaceData *pWS; -#endif /* WSM */ i = 0; XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++; @@ -2943,7 +2762,6 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas * We need to start rippling the icons into new positions if * their (x,y) position changed */ -#ifdef WSM pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID); pWsc = GetWsClientData (pWS, pII_2->pCD); CvtIconPlaceToPosition (&pIBD->IPD, pWsc->iconPlace, @@ -2951,13 +2769,6 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas rippling = ((newX != pWsc->iconX) || (newY != pWsc->iconY)); -#else /* WSM */ - CvtIconPlaceToPosition (&pIBD->IPD, pII_2->pCD->iconPlace, - &newX, &newY); - - rippling = ((newX != pII_2->pCD->iconX) || - (newY != pII_2->pCD->iconY)); -#endif /* WSM */ } if ((pII_2->pCD == NULL) || rippling) @@ -2978,15 +2789,10 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas CvtIconPlaceToPosition (&pIBD->IPD, ix2, &newX, &newY); -#ifdef WSM pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID); pWsc = GetWsClientData (pWS, pII_2->pCD); pWsc->iconX = newX; pWsc->iconY = newY; -#else /* WSM */ - pII_2->pCD->iconX = newX; - pII_2->pCD->iconY = newY; -#endif /* WSM */ if (hasActiveText && (pII_2->pCD == pCD_tmp)) { @@ -3478,9 +3284,7 @@ void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy, XKeyEvent *keyEvent) if (!(XFindContext (DISPLAY, theIcon, wmGD.windowContextType, (caddr_t *)&pCD))) { -#ifdef WSM SetClientWsIndex (pCD); -#endif /* WSM */ keyEvent->window = ICON_FRAME_WIN(pCD); if (pCD->clientState == MINIMIZED_STATE) @@ -3570,32 +3374,16 @@ void GetIconBoxIconRootXY (ClientData *pCD, int *pX, int *pY) { Window child; -#ifdef WSM WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD); -#endif /* WSM */ -#ifdef WSM if (pCD->pSD->useIconBox && pWsc->pIconBox) -#else /* WSM */ - if (pCD->pSD->useIconBox && P_ICON_BOX(pCD)) -#endif /* WSM */ { -#ifdef WSM XTranslateCoordinates(DISPLAY, XtWindow(pWsc->pIconBox->bBoardWidget), ROOT_FOR_CLIENT(pCD), pWsc->iconX + IB_MARGIN_WIDTH, pWsc->iconY + IB_MARGIN_HEIGHT, pX, pY, &child); -#else /* WSM */ - XTranslateCoordinates(DISPLAY, - XtWindow(P_ICON_BOX(pCD)->bBoardWidget), - ROOT_FOR_CLIENT(pCD), - ICON_X(pCD) + IB_MARGIN_WIDTH, - ICON_Y(pCD) + IB_MARGIN_HEIGHT, - pX, pY, &child); -#endif /* WSM */ - } else { @@ -3633,9 +3421,7 @@ Boolean IconVisible (ClientData *pCD) */ Boolean rval = True; -#ifdef WSM WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD); -#endif /* WSM */ @@ -3655,17 +3441,10 @@ Boolean IconVisible (ClientData *pCD) XtSetArg (getArgs[i], XmNheight, (XtArgVal) &tmpHeight ); i++; XtSetArg (getArgs[i], XmNx, (XtArgVal) &tmpX ); i++; XtSetArg (getArgs[i], XmNy, (XtArgVal) &tmpY ); i++; -#ifdef WSM XtGetValues (pWsc->pIconBox->clipWidget, getArgs, i); XtTranslateCoords(pWsc->pIconBox->scrolledWidget, tmpX, tmpY, &clipX, &clipY); -#else /* WSM */ - XtGetValues (P_ICON_BOX(pCD)->clipWidget, getArgs, i); - XtTranslateCoords(P_ICON_BOX(pCD)->scrolledWidget, - tmpX, tmpY, - &clipX, &clipY); -#endif /* WSM */ GetIconBoxIconRootXY(pCD, &iconX, &iconY); diff --git a/cde/programs/dtwm/WmIconBox.h b/cde/programs/dtwm/WmIconBox.h index f838ca9b..12729a80 100644 --- a/cde/programs/dtwm/WmIconBox.h +++ b/cde/programs/dtwm/WmIconBox.h @@ -31,9 +31,7 @@ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ -#ifdef WSM extern void AddIconBoxForWorkspace (WmWorkspaceData *pWS); -#endif /* WSM */ extern void AddNewBox (WmWorkspaceData *pWS, IconBoxData *pIBD); extern void ChangeActiveIconboxIconText (Widget icon, caddr_t dummy, XFocusChangeEvent *event); @@ -94,9 +92,7 @@ extern void SetGranularity (WmWorkspaceData *pWS, ClientData *pCD, extern void SetIconBoxInfo (WmWorkspaceData *pWS, ClientData *pCD); extern void SetNewBounds (IconBoxData *pIBD); extern void ShowClientIconState (ClientData *pCD, int newState); -#ifdef WSM extern void UnmapIconBoxes (WmWorkspaceData *pWS); -#endif /* WSM */ extern void UpdateIncrements (Widget sWidget, IconBoxData *pIBD, XConfigureEvent *event); extern String WmXmStringToString (XmString xmString); diff --git a/cde/programs/dtwm/WmImage.c b/cde/programs/dtwm/WmImage.c index 3edd48ce..d449c6da 100644 --- a/cde/programs/dtwm/WmImage.c +++ b/cde/programs/dtwm/WmImage.c @@ -51,10 +51,8 @@ extern String _XmOSInitPath( String env_pathname, Boolean *user_path) ; #endif -#ifdef WSM #include #include
-#endif #define MATCH_XBM 'B' /* .xbm character: see XmGetPixmap */ #define MATCH_PATH "XBMLANGPATH" @@ -131,11 +129,7 @@ Pixmap MakeClientIconPixmap ( /* * The bitmap was not made with usable parameters. */ -#ifdef WSM Warning (((char *)GETMESSAGE(38, 9, "Icon bitmap cannot be used on this screen"))); -#else /* WSM */ - Warning ("Invalid root for icon bitmap"); -#endif /* WSM */ return ((Pixmap)NULL); } @@ -185,28 +179,21 @@ Pixmap MakeClientIconPixmap ( Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName) { int bitmapIndex; -#ifdef WSM Pixmap pixmap, pixmap_r, mask; Window root; int x, y; unsigned int width, height, border_width, depth; String sIconFileName; int iconSizeDesired; -#endif /* WSM */ /* * Get the bitmap cache entry (will read data from file if necessary). * If unable to find the iconName file return NULL. */ -#ifdef WSM if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName, False)) < 0) -#else /* WSM */ - if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName)) < 0) -#endif /* WSM */ { -#ifdef WSM if ((PSD_FOR_CLIENT(pCD)->displayResolutionType == LOW_RES_DISPLAY) || (PSD_FOR_CLIENT(pCD)->displayResolutionType == VGA_RES_DISPLAY)) { @@ -286,7 +273,6 @@ Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName) if (sIconFileName != NULL) XtFree (sIconFileName); -#endif /* WSM */ return ((Pixmap)NULL); } @@ -421,10 +407,8 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int Pixmap iconPixmap; GC imageGC, topGC, botGC; XGCValues gcv; -#ifdef WSM unsigned long gc_mask; XmPixelSet *pPS = NULL; -#endif /* WSM */ unsigned int imageWidth; unsigned int imageHeight; int dest_x, dest_y; @@ -527,7 +511,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int } /* create a GC to use */ -#ifdef WSM gc_mask = GCForeground | GCBackground | GCGraphicsExposures; if (mask) { @@ -553,14 +536,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int gcv.graphics_exposures = False; imageGC = XCreateGC (DISPLAY, iconPixmap, gc_mask, &gcv); -#else /* WSM */ - gcv.foreground = bg; /* clear it first! */ - gcv.background = bg; - gcv.graphics_exposures = False; - - imageGC = XCreateGC (DISPLAY, iconPixmap, (GCForeground|GCBackground), - &gcv); -#endif /* WSM */ /* * Format the image. @@ -586,7 +561,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int dest_x = (imageWidth - width) / 2; dest_y = (imageHeight - height) / 2; -#ifdef WSM if (mask) { if (pPS != NULL) @@ -617,10 +591,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int } XChangeGC (DISPLAY, imageGC, gc_mask, &gcv); -#else /* WSM */ - /* set the foreground */ - XSetForeground (DISPLAY, imageGC, fg); -#endif /* WSM */ /* copy the bitmap to the pixmap */ #ifndef DISALLOW_DEEP_ICONS @@ -654,7 +624,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int * Shadowing */ -#ifdef WSM if (mask && (pPS != NULL)) { topGC = GetHighlightGC (pSD, pPS->ts, pPS->bg, @@ -665,7 +634,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int } else { -#endif /* WSM */ topGC = GetHighlightGC (pSD, pCD->iconImageTopShadowColor, pCD->iconImageBackground, pCD->iconImageTopShadowPixmap); @@ -673,9 +641,7 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int botGC = GetHighlightGC (pSD, pCD->iconImageBottomShadowColor, pCD->iconImageBackground, pCD->iconImageBottomShadowPixmap); -#ifdef WSM } -#endif /* WSM */ /* * CR5208 - Better fix than from OSF! @@ -871,11 +837,7 @@ Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex) #define BITMAP_CACHE_INC 5 -#ifdef WSM int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError) -#else /* WSM */ -int GetBitmapIndex (WmScreenData *pSD, char *name) -#endif /* WSM */ { char *path; BitmapCache *bitmapc; @@ -950,9 +912,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name) &bitmapc->bitmap, &x, &y) != BitmapSuccess) { -#ifdef WSM if (bReportError) -#endif /* WSM */ MWarning (((char *)GETMESSAGE(38, 7, "Unable to read bitmap file %s\n")), path); XtFree ((char *)bitmapc->path); return (-1); @@ -960,9 +920,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name) if (bitmapc->width == 0 || bitmapc->height == 0) { -#ifdef WSM if (bReportError) -#endif /* WSM */ MWarning (((char *)GETMESSAGE(38, 8, "Invalid bitmap file %s\n")), path); XtFree ((char *)bitmapc->path); return (-1); @@ -1119,6 +1077,4 @@ char *BitmapPathName (string) } /* END OF FUNCTION BitmapPathName */ -#ifdef WSM /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmImage.h b/cde/programs/dtwm/WmImage.h index 297d0656..f823dea7 100644 --- a/cde/programs/dtwm/WmImage.h +++ b/cde/programs/dtwm/WmImage.h @@ -31,13 +31,9 @@ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ extern char *BitmapPathName (char *string); -#ifdef WSM extern int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError); -#else /* WSM */ -extern int GetBitmapIndex (WmScreenData *pSD, char *name); -#endif /* WSM */ extern Pixmap MakeCachedIconPixmap (ClientData *pCD, int bitmapIndex, Pixmap mask); extern Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex); extern Pixmap MakeClientIconPixmap (ClientData *pCD, Pixmap iconBitmap, Pixmap iconMask); diff --git a/cde/programs/dtwm/WmInitWs.c b/cde/programs/dtwm/WmInitWs.c index 501c6d2e..3ef6aac5 100644 --- a/cde/programs/dtwm/WmInitWs.c +++ b/cde/programs/dtwm/WmInitWs.c @@ -40,9 +40,7 @@ #include "WmGlobal.h" #include "WmResNames.h" -#ifdef WSM #include "WmHelp.h" -#endif /* WSM */ #include "WmICCC.h" #define DTWM_NEED_FNTPL #include "WmIBitmap.h" @@ -59,9 +57,9 @@ #ifndef NO_HP_KEY_REMAP #include -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # include -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ typedef struct { @@ -69,7 +67,6 @@ typedef struct String new_name ; } str_xref_rec, *str_xref ; #endif /* NO_HP_KEY_REMAP */ -#ifdef WSM #include
#include
#include
@@ -77,7 +74,6 @@ typedef struct #include
#include
#include
-#endif /* WSM */ /* Busy is also defined in the BMS -> bms.h. This conflicts with * /usr/include/X11/Xasync.h on ibm. @@ -92,9 +88,7 @@ typedef struct /* * include extern functions */ -#ifdef WSM #include "WmBackdrop.h" -#endif /* WSM */ #include "WmCDInfo.h" #include "WmColormap.h" #include "WmError.h" @@ -102,18 +96,14 @@ typedef struct #include "WmFeedback.h" #include "WmFunction.h" #include "WmIDecor.h" -#ifdef WSM #include "WmIPC.h" -#endif /* WSM */ #include "WmIPlace.h" #include "WmIconBox.h" #include "WmKeyFocus.h" #include "WmPanelP.h" /* for typedef in WmManage.h */ #include "WmManage.h" #include "WmMenu.h" -#ifdef WSM #include "WmPresence.h" -#endif /* WSM */ #include "WmProperty.h" #include "WmResCvt.h" #include "WmResource.h" @@ -122,9 +112,7 @@ typedef struct #include "WmCDecor.h" #include "stdio.h" #include "WmResParse.h" -#ifdef WSM #include -#endif /* WSM */ #include "WmXSMP.h" /* @@ -133,14 +121,12 @@ typedef struct #include "WmInitWs.h" -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # include "WmWsmLib/wsm_proto.h" # include "WmWsmLib/utm_send.h" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ -#ifdef WSM static void InsureDefaultBackdropDir(char **ppchBackdropDirs); -#endif /* WSM */ void InitWmDisplayEnv (void); #ifndef NO_MESSAGE_CATALOG void InitNlsStrings (void); @@ -149,12 +135,10 @@ void InitNlsStrings (void); Boolean VirtKeys4DIN(Display *dpy); #endif /* NO_HP_KEY_REMAP */ -#ifdef WSM /* limited to 3 chars max */ #define UNSPECIFIED_SCREEN_NAME "fbk" char **dpy2Argv; /* copy for second display */ int dpy2Argc; -#endif /* WSM */ /* * Global Variables: */ @@ -427,10 +411,8 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) int savedArgc; wmGD.errorFlag = False; -#ifdef WSM wmGD.dtSD = NULL; wmGD.iSlideUpsInProgress = 0; -#endif /* WSM */ SetupWmSignalHandlers (0); /* dummy paramater */ @@ -444,9 +426,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) #ifndef IBM_169380 wmGD.cmapWindowContextType = XUniqueContext (); #endif -#ifdef WSM wmGD.mwmWindowContextType = XUniqueContext (); -#endif /* WSM */ /* copy argv (the XtInititalize changes the original) for use in restart */ savedArgc = argc; @@ -454,9 +434,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) wmGD.environ = environ; -#ifdef WSM wmGD.pWmPB = _DtWmParseNewBuf(); -#endif /* WSM */ @@ -469,7 +447,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) { wmGD.mwmName = wmGD.argv[0]; } -#ifdef WSM if (MwmBehavior) { res_class = WM_RESOURCE_CLASS; @@ -480,10 +457,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) } wmGD.statusColorServer = CSERVE_NOT_AVAILABLE; -#else /* WSM */ - res_class = WM_RESOURCE_CLASS; -#endif /* WSM */ - wmGD.display = (Display *)NULL; wmGD.topLevelW = (Widget)NULL; @@ -531,9 +504,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) */ InitCursorInfo (); -#ifdef WSM InitWmDisplayEnv (); -#endif ShowWaitState (TRUE); /* @@ -603,11 +574,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) XtSetArg (args[argnum], XtNheight, 10); argnum++; XtSetArg (args[argnum], XtNmappedWhenManaged, False); argnum++; XtSetArg (args[argnum], XtNjoinSession, True); argnum++; -#ifdef WSM XtSetArg (args[argnum], XtNrestartStyle, SmRestartNever); argnum++; -#else - XtSetArg (args[argnum], XtNrestartStyle, SmRestartIfRunning); argnum++; -#endif XtSetArg (args[argnum], XtNargc, savedArgc); argnum++; XtSetArg (args[argnum], XtNargv, wmGD.argv); argnum++; @@ -636,7 +603,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) ProcessGlobalScreenResources (); ProcessCommandLine (argc, argv); -#ifdef WSM /* * Make sure backdrops are in our icon search path. * This call MUST occur before ANY icons are looked up either @@ -664,7 +630,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) XtFree(sBdPath); } -#endif /* WSM */ /* * Allocate data and initialize for screens we manage: @@ -714,7 +679,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) { if (!processedGlobalResources) { -#ifdef WSM enum { XA_DT_SESSION_HINTS, XA_DT_SM_WM_PROTOCOL, XA_DT_SM_START_ACK_WINDOWS, XA_DT_SM_STOP_ACK_WINDOWS, @@ -740,7 +704,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) wmGD.xa_DT_WM_EXIT_SESSION = atoms[XA_DT_WM_EXIT_SESSION]; wmGD.xa_DT_WM_LOCK_DISPLAY = atoms[XA_DT_WM_LOCK_DISPLAY]; wmGD.xa_DT_WM_READY = atoms[XA_DT_WM_READY]; -#endif /* WSM */ #ifndef NO_OL_COMPAT InitOLCompat(); #endif /* NO_OL_COMPAT */ @@ -780,7 +743,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) wmGD.pLockMaskSequence = NULL; SetupLockingModifierMask (); -#ifdef WSM wmGD.requestContextWin = (Window) 0L; wmGD.cppCommand = NULL; wmGD.evLastButton.button = 0; @@ -840,7 +802,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) args, argnum); -#endif /* WSM */ /* @@ -871,9 +832,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) InitWmScreen (&(wmGD.Screens[scr]), sNum); wmGD.Screens[scr].managed = True; managed++; -#ifdef WSM GetDtSessionHints(&(wmGD.Screens[scr]), sNum); -#endif /* WSM */ if (!activeSet) { @@ -893,7 +852,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) ExitWM (WM_ERROR_EXIT_VALUE); } } -#ifdef WSM /* * Initialize the IPC mechanism */ @@ -917,8 +875,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) XtSetValues (wmGD.topLevelW, args, argnum); XtSetValues (wmGD.topLevelW1, args, argnum); -#endif /* WSM */ - /* * Prepare to have child processes (e.g., exec'ed commands). @@ -933,7 +889,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) ExitWM (WM_ERROR_EXIT_VALUE); } -#ifdef WSM { enum { XA_DT_WORKSPACE_HINTS, XA_DT_WORKSPACE_PRESENCE, @@ -959,7 +914,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) wmGD.xa_DT_WORKSPACE_CURRENT = atoms[XA_DT_WORKSPACE_CURRENT]; } -#endif /* WSM */ /* Initialize properties used in session management. */ wmGD.xa_SM_CLIENT_ID = @@ -994,13 +948,11 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) if (pSD->managed) { -#ifdef WSM if (XDefaultScreen (wmGD.display) == pSD->screen) { wmGD.commandWindow = wmGD.Screens[scr].wmWorkspaceWin; } -#endif /* WSM */ /* * Initialize workspace colormap data. */ @@ -1045,7 +997,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) * convert DT 2.0 syntax to DT 3.0 */ DeleteTempConfigFileIfAny(); -#ifdef WSM /* * Point second display's resource data base * to the first display's resource data base @@ -1054,7 +1005,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) * NEW LOCATION */ wmGD.display1->db = wmGD.display->db; -#endif /* WSM */ /* * Realize the top level widget, make the window override @@ -1062,7 +1012,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) */ XtRealizeWidget (wmGD.topLevelW); -#ifdef WSM XtRealizeWidget (wmGD.topLevelW1); /* @@ -1071,7 +1020,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) * is required for ICCCM-style messaging). */ dtInitializeMessaging (wmGD.topLevelW); -#endif /* WSM */ sAttributes.override_redirect = True; XChangeWindowAttributes (DISPLAY, XtWindow (wmGD.topLevelW), @@ -1085,9 +1033,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) * Use the WM_SAVE_YOURSELF protocol * for notification of when to save ourself */ -#ifdef WSM SetMwmSaveSessionInfo(wmGD.commandWindow); -#endif /* * Initialize window manager event handling: */ @@ -1133,15 +1079,12 @@ void InitWmGlobal (int argc, char *argv [], char *environ []) for (scr = 0; scr < wmGD.numScreens; scr++) { -#ifdef WSM int iws; -#endif /* WSM */ pSD = &(wmGD.Screens[scr]); if (pSD->managed) { ACTIVE_PSD = &wmGD.Screens[scr]; -#ifdef WSM MapIconBoxes (pSD->pActiveWS); ChangeBackdrop (pSD->pActiveWS); @@ -1217,9 +1160,6 @@ XFlush (DISPLAY); } RestoreHelpDialogs(pSD); -#else /* WSM */ - MapIconBoxes (pSD->pActiveWS); -#endif /* WSM */ } } firstTime = 0; @@ -1227,17 +1167,12 @@ XFlush (DISPLAY); InitKeyboardFocus (); -#ifndef WSM - InitWmDisplayEnv (); -#endif ShowWaitState (FALSE); -#ifdef WSM /* * Tell the rest of DT that we're up */ dtReadyNotification(); -#endif /* WSM */ #ifdef DEBUG_RESOURCE_DATABASE XrmPutFileDatabase(wmGD.display->db, "/tmp/dtwm.resDB"); @@ -1271,12 +1206,10 @@ InitWmScreen (WmScreenData *pSD, int sNum) Arg args[12]; int argnum; -#ifdef WSM int wsnum; WmWorkspaceData *pwsI; int buf_size; int iwsx; -#endif /* WSM */ char *pDisplayName; #define LENCBUFFER 256 @@ -1330,11 +1263,10 @@ InitWmScreen (WmScreenData *pSD, int sNum) pSD->bitmapCacheCount = 0; pSD->dataType = SCREEN_DATA_TYPE; pSD->managed = False; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) pSD->cciTree = NULL; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ -#ifdef WSM pSD->initialWorkspace=NULL; pSD->presence.shellW = NULL; pSD->presence.onScreen = False; @@ -1363,14 +1295,12 @@ InitWmScreen (WmScreenData *pSD, int sNum) pSD->woS = (Window) 0L; pSD->woE = (Window) 0L; pSD->woW = (Window) 0L; -#endif /* WSM */ pSD->wPanelist = NULL; pSD->pECD = NULL; pSD->numPushRecallClients = 0; pSD->numEmbeddedClients = 0; pSD->pPRCD = NULL; pSD->iconBoxControl = False; -#ifdef WSM pSD->displayResolutionType = _DtGetDisplayResolution(DISPLAY, sNum); /* @@ -1398,7 +1328,6 @@ InitWmScreen (WmScreenData *pSD, int sNum) } } /* if wmGD.screenNames[sNum] == UNSPECIFIED_SCREEN_NAME */ -#endif /* WSM */ /* * Save screen context */ @@ -1429,7 +1358,7 @@ InitWmScreen (WmScreenData *pSD, int sNum) args, argnum); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* Create a DrawingArea as a child of the popupShell. This will be used * to handle UTM traffic relating to cci. We need this * particular widget to get the callbacks from conversion requests made @@ -1449,9 +1378,8 @@ InitWmScreen (WmScreenData *pSD, int sNum) /* Must realize to own WM_i if unmapped, causes mwm to freeze when menu is displayed. */ XtPopup(pSD->screenTopLevelW, XtGrabNone); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ -#ifdef WSM argnum = 0; XtSetArg (args[argnum], XtNgeometry, NULL); argnum++; XtSetArg (args[argnum], XtNx, 10000); argnum++; @@ -1474,7 +1402,7 @@ InitWmScreen (WmScreenData *pSD, int sNum) args, argnum); XtRealizeWidget (pSD->screenTopLevelW1); -#endif /* WSM */ + /* * Fetch screen based resources */ @@ -1486,7 +1414,6 @@ InitWmScreen (WmScreenData *pSD, int sNum) MakeXorGC (pSD); InitIconSize(pSD); -#ifdef WSM /* * Complete initialization of workspace structures */ @@ -1535,24 +1462,6 @@ InitWmScreen (WmScreenData *pSD, int sNum) /* make first workspace in list the active one to start with */ pSD->pActiveWS = pSD->pWS; } -#else /* WSM */ - /* - * Allocate and initialize a workspace structure - */ - - if (!(pSD->pWS = (WmWorkspaceData *) XtMalloc (sizeof(WmWorkspaceData)))) - { - ShowWaitState (FALSE); - Warning (((char *)GETMESSAGE(40, 8, "Insufficient memory for Workspace data"))); - ExitWM (WM_ERROR_EXIT_VALUE); - } - - /* - * Set up workspace for this screen - */ - InitWmWorkspace (pSD->pWS, pSD); - pSD->pActiveWS = pSD->pWS; -#endif /* WSM */ pDisplayName = DisplayString (DISPLAY); @@ -1627,14 +1536,10 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD) Arg args[10]; int argnum; -#ifndef WSM -#define DEFAULT_WS_NAME "workspace" -#endif /* not WSM */ pWS->pSD = pSD; pWS->pIconBox = NULL; pWS->dataType = WORKSPACE_DATA_TYPE; -#ifdef WSM pWS->backdrop.window = 0; pWS->backdrop.nameAtom = 0; pWS->backdrop.image = NULL; @@ -1642,16 +1547,6 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD) pWS->sizeClientList = 0; pWS->ppClients = 0; pWS->buttonW = NULL; -#else /* WSM */ - - if ((pWS->name = (char *) - XtMalloc ((1+strlen(DEFAULT_WS_NAME)) * sizeof (char))) == NULL) - { - ShowWaitState (FALSE); - ExitWM (WM_ERROR_EXIT_VALUE); - } - strcpy (pWS->name, DEFAULT_WS_NAME); -#endif /* WSM */ /* * Create widget for workspace resource hierarchy @@ -1672,10 +1567,8 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD) args, argnum); -#ifdef WSM /* internalize the workspace name */ pWS->id = XInternAtom (DISPLAY, pWS->name, False); -#endif /* WSM */ /* * Process workspace based resources @@ -1690,8 +1583,7 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD) } /* END OF FUNCTION InitWmWorkspace */ -#ifdef WSM - + /******************************<->************************************* * * InsureDefaultBackdropDir(char **ppchBackdropDirs) @@ -1815,7 +1707,6 @@ InsureDefaultBackdropDir(char **ppchBackdropDirs) } } /* END OF FUNCTION InsureDefaultBackdropDirs */ -#endif /* WSM */ /*************************************<->************************************* @@ -1903,10 +1794,8 @@ void SetupWmWorkspaceWindows (void) (long) ((wmGD.useStandardBehavior) ? MWM_INFO_STARTUP_STANDARD : MWM_INFO_STARTUP_CUSTOM), pSD->wmWorkspaceWin); -#ifdef WSM XSaveContext (DISPLAY, pSD->wmWorkspaceWin, wmGD.mwmWindowContextType, (caddr_t)pSD); -#endif /* WSM */ } } @@ -2181,9 +2070,7 @@ void CopyArgv (int argc, char *argv []) { Warning (((char *)GETMESSAGE(40, 10, "Insufficient memory for window manager data"))); wmGD.argv = argv; -#ifdef WSM dpy2Argv = argv; -#endif /* WSM */ } else { @@ -2192,7 +2079,6 @@ void CopyArgv (int argc, char *argv []) wmGD.argv[i] = argv[i]; } wmGD.argv[i] = NULL; -#ifdef WSM if ((dpy2Argv = (char **)XtMalloc((argc + 1) * sizeof(char *))) == NULL) { Warning (((char *)GETMESSAGE(40, 11, "Insufficient memory for window manager data"))); @@ -2207,7 +2093,6 @@ void CopyArgv (int argc, char *argv []) dpy2Argc = argc; dpy2Argv[i] = NULL; } -#endif /* WSM */ } } /* END OF FUNCTION CopyArgv */ @@ -2257,11 +2142,7 @@ void InitScreenNames (void) ExitWM (WM_ERROR_EXIT_VALUE); } /* default name is left justified, 3-chars max, zero terminated */ -#ifdef WSM sprintf((char *)wmGD.screenNames[num], UNSPECIFIED_SCREEN_NAME); -#else /* WSM */ - sprintf((char *)wmGD.screenNames[num],"%d",num%1000); -#endif /* WSM */ } } #ifndef NO_MESSAGE_CATALOG @@ -2271,14 +2152,12 @@ void InitNlsStrings (void) { char * tmpString; -#ifdef WSM /* * Initialize messages */ wmGD.okLabel=XmStringCreateLocalized((String)_DtOkString); wmGD.cancelLabel=XmStringCreateLocalized((String)_DtCancelString); wmGD.helpLabel=XmStringCreateLocalized((String)_DtHelpString); -#endif /* WSM */ /* * catgets returns a pointer to an area that is over written @@ -2297,7 +2176,6 @@ void InitNlsStrings (void) strcpy(wmNLS.default_icon_box_title, tmpString); } -#ifdef WSM tmpString = ((char *)GETMESSAGE(40, 20, "%s: %s on line %d of configuration file %s\n")); if ((pWarningStringFile = (char *)XtMalloc ((unsigned int) (strlen(tmpString) + 1))) == NULL) @@ -2358,7 +2236,6 @@ void InitNlsStrings (void) { strcpy(wmNLS.defaultHelpTitle, tmpString); } -#endif /* WSM */ } /* InitNlsStrings */ #endif @@ -2409,9 +2286,7 @@ InitWmDisplayEnv (void) else { strcpy(wmGD.displayString, buffer); -#ifdef WSM putenv(wmGD.displayString); -#endif /* WSM */ } } /* END OF FUNCTION InitWmDisplayEnv */ @@ -2654,6 +2529,4 @@ VirtKeys4DIN( } #endif /* NO_HP_KEY_REMAP */ -#ifdef WSM /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmInitWs.h b/cde/programs/dtwm/WmInitWs.h index 870ef197..c7e94a02 100644 --- a/cde/programs/dtwm/WmInitWs.h +++ b/cde/programs/dtwm/WmInitWs.h @@ -43,6 +43,4 @@ extern void InitScreenNames (void); #ifndef NO_MESSAGE_CATALOG extern void InitNlsStrings( void ) ; #endif -#ifdef WSM extern void InitWmDisplayEnv( void ) ; -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmKeyFocus.c b/cde/programs/dtwm/WmKeyFocus.c index d8b5d35a..7043dba5 100644 --- a/cde/programs/dtwm/WmKeyFocus.c +++ b/cde/programs/dtwm/WmKeyFocus.c @@ -358,14 +358,12 @@ void SetKeyboardFocus (ClientData *pCD, long focusFlags) void ResetExplicitSelectHandling (ClientData *pCD) { -#ifdef WSM Boolean bUnseen; bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False; if (bUnseen) pCD->clientState &= ~UNSEEN_STATE; -#endif /* WSM */ if ((pCD->clientState == NORMAL_STATE) || (pCD->clientState == MAXIMIZED_STATE)) { @@ -383,11 +381,9 @@ void ResetExplicitSelectHandling (ClientData *pCD) /* !!! grab reset if client icon window? !!! */ } -#ifdef WSM if (bUnseen) pCD->clientState |= UNSEEN_STATE; -#endif /* WSM */ } /* END OF FUNCTION ResetExplicitSelectHandling */ @@ -500,9 +496,7 @@ void SetFocusIndication (ClientData *pCD) void ClearFocusIndication (ClientData *pCD, Boolean refresh) { ClientData *saveCD; -#ifdef WSM Boolean bUnseen; -#endif /* WSM */ /* * Set the "focus" to NULL to insure correct display of the frame @@ -512,11 +506,9 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh) saveCD = wmGD.keyboardFocus; wmGD.keyboardFocus = NULL; -#ifdef WSM bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False; if (bUnseen) pCD->clientState &= ~UNSEEN_STATE; -#endif /* WSM */ if ((pCD->clientState == NORMAL_STATE) || (pCD->clientState == MAXIMIZED_STATE)) @@ -536,10 +528,8 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh) ShowInactiveIcon (pCD, refresh); } -#ifdef WSM if (bUnseen) pCD->clientState |= UNSEEN_STATE; -#endif /* WSM */ /* restore old keyboard focus */ wmGD.keyboardFocus = saveCD; @@ -1313,9 +1303,7 @@ Boolean CheckForKeyFocus (ClientListEntry *pNextEntry, unsigned long type, Boole */ if (((pNextEntry->type == NORMAL_STATE) && -#ifdef WSM (!(pCD->clientState & UNSEEN_STATE)) && -#endif /* WSM */ (pCD->clientState != MINIMIZED_STATE)) || ((pNextEntry->type == MINIMIZED_STATE) && (pCD->clientState == MINIMIZED_STATE))) @@ -1475,9 +1463,7 @@ void AutoResetKeyFocus (ClientData *pcdNoFocus, Time focusTime) { if ((pNextEntry->type != MINIMIZED_STATE) && (pCD->clientState != MINIMIZED_STATE) && -#ifdef WSM (!(pCD->clientState & UNSEEN_STATE)) && -#endif /* WSM */ (pCD != pcdNoFocus)) { if (pCD->transientChildren) diff --git a/cde/programs/dtwm/WmMain.c b/cde/programs/dtwm/WmMain.c index 695c11dc..84207cbb 100644 --- a/cde/programs/dtwm/WmMain.c +++ b/cde/programs/dtwm/WmMain.c @@ -39,10 +39,8 @@ #ifndef NO_MULTIBYTE #include #endif -#ifdef WSM #include
#include
-#endif /* WSM */ /* * include extern functions */ @@ -51,24 +49,17 @@ #include "WmEvent.h" #include "WmInitWs.h" #include "WmError.h" -#ifdef WSM #include "WmIPC.h" #include "WmBackdrop.h" -#endif /* WSM */ /* * Function Declarations: */ -#ifdef WSM int WmReturnIdentity (int argc, char *argv[], char *environ[]); #define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \ (caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : \ (IsBackdropWindow (ACTIVE_PSD, (w)))) -#else /* WSM */ -#define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \ -(caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : False) -#endif /* WSM */ WmScreenData *pSD; @@ -80,9 +71,7 @@ WmGlobalData wmGD; #ifndef NO_MESSAGE_CATALOG NlsStrings wmNLS; #endif -#ifdef WSM int WmIdentity; -#endif /* WSM */ @@ -116,7 +105,6 @@ main (int argc, char *argv [], char *environ []) setlocale(LC_ALL, ""); #ifndef NO_MULTIBYTE -#ifdef WSM /* * Set up environment variables for this HP DT client */ @@ -130,22 +118,18 @@ main (int argc, char *argv [], char *environ []) { char * foo = ((char *)GETMESSAGE(44, 1, "")); } -#endif /* WSM */ XtSetLanguageProc (NULL, (XtLanguageProc)NULL, NULL); #endif -#ifdef WSM /* * Get Identity */ WmIdentity = WmReturnIdentity(argc, argv, environ); -#endif /* WSM */ /* * Initialize the workspace: */ InitWmGlobal (argc, argv, environ); -#ifdef WSM /* * Set up PATH variable if it must run as standalone command @@ -155,7 +139,6 @@ main (int argc, char *argv [], char *environ []) { _DtEnvControl(DT_ENV_SET_BIN); } -#endif /* WSM */ /* * MAIN EVENT HANDLING LOOP: @@ -175,7 +158,6 @@ main (int argc, char *argv [], char *environ []) wmGD.attributesWindow = 0L; -#ifdef WSM if ((event.type == ButtonPress) || (event.type == ButtonRelease)) { @@ -192,7 +174,6 @@ main (int argc, char *argv [], char *environ []) wmGD.bReplayedButton = False; } } -#endif /* WSM */ dispatchEvent = True; if (wmGD.menuActive) { @@ -231,7 +212,6 @@ main (int argc, char *argv [], char *environ []) } /* END OF FUNCTION main */ -#ifdef WSM /******************************<->************************************* * * WmReturnIdentity (argc, argv, environ) @@ -296,7 +276,5 @@ int WmReturnIdentity ( int argc, char *argv[], char *environ[]) return(retVal); } /* END OF FUNCTION WmReturnIdentity */ -#endif /* WSM */ -#ifdef WSM + /************************* eof ******************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmManage.c b/cde/programs/dtwm/WmManage.c index b5401be3..738fe059 100644 --- a/cde/programs/dtwm/WmManage.c +++ b/cde/programs/dtwm/WmManage.c @@ -61,10 +61,8 @@ #include "WmWinInfo.h" #include "WmWinList.h" #include "WmWinState.h" -#ifdef WSM #include "WmPresence.h" #include "WmWrkspace.h" -#endif /* WSM */ #include "WmXSMP.h" @@ -122,11 +120,9 @@ void AdoptInitialClients (WmScreenData *pSD) Window root; Window parent; Window *clients; -#ifdef WSM int nAncillaries, iAnc; Window *pAncillaryWindows, *pWin1; WmWorkspaceData *pWS0; -#endif /* WSM */ unsigned int nclients; ClientData *pcd = NULL; PropWMState *wmStateProp; @@ -134,7 +130,6 @@ void AdoptInitialClients (WmScreenData *pSD) int i,j; long manageFlags; -#ifdef WSM /* * Generate list of ancillary windows (not to be managed) */ @@ -156,7 +151,6 @@ void AdoptInitialClients (WmScreenData *pSD) *pWin1++ = XtWindow (pSD->screenTopLevelW); *pWin1 = pSD->activeIconTextWin; -#endif /* WSM */ /* * Look for mapped top-level windows and start managing them: @@ -192,21 +186,11 @@ void AdoptInitialClients (WmScreenData *pSD) for (i = 0; i < nclients; i++) { /* determine if the client window should be managed by wm */ -#ifdef WSM if (InWindowList (clients[i], pAncillaryWindows, nAncillaries)) { /* don't manage ancillary window manager windows */ continue; } -#else /* WSM */ - if ((clients[i] == XtWindow (pSD->screenTopLevelW)) || - (clients[i] == XtWindow (pSD->pActiveWS->workspaceTopLevelW)) || - (clients[i] == pSD->activeIconTextWin)) - { - /* don't manage ancillary window manager windows */ - continue; - } -#endif /* WSM */ if (!XFindContext (DISPLAY, clients[i], wmGD.windowContextType, (caddr_t *)&pcd)) { @@ -271,12 +255,10 @@ void AdoptInitialClients (WmScreenData *pSD) } } -#ifdef WSM if (pAncillaryWindows) { XtFree ((char *) pAncillaryWindows); } -#endif /* WSM */ } /* END OF FUNCTION AdoptInitialClients */ @@ -317,9 +299,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) int initialState; int i; Boolean sendConfigNotify; -#ifdef WSM WmWorkspaceData *pwsi; -#endif /* WSM */ WmFpEmbeddedClientData *pECD; /* @@ -364,7 +344,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) * ...then we've embedded it in the front * panel--no further processing required. */ -#ifdef WSM if (smAckState == SM_START_ACK) { SendClientMsg( wmGD.dtSmWindow, @@ -372,7 +351,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) (long) wmGD.xa_DT_WM_WINDOW_ACK, CurrentTime, NULL, 0); } -#endif /* WSM */ return; } } @@ -389,7 +367,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) } #endif -#ifdef WSM if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL) { /* @@ -401,7 +378,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) F_AddToAllWorkspaces(0, pCD, 0); pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; } -#endif /* WSM */ if (manageFlags & MANAGEW_WM_RESTART) { if (manageFlags & MANAGEW_WM_RESTART_ICON) @@ -469,7 +445,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) * window. */ -#ifdef WSM if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) && (pCD->transientLeader == NULL)) { @@ -550,21 +525,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) } } } -#else /* WSM */ - if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) && - (pCD->transientLeader == NULL) && - !MakeIcon (pCD->pSD->pActiveWS, pCD)) - { - /* - * Error in making an icon for the client window; clean up the wm - * resources; do not manage the client window. - */ - - UnManageWindow (pCD); - return; - } -#endif /* WSM */ - /* * Register window contexts to facilitate event handling: @@ -584,13 +544,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) XSaveContext (DISPLAY, pCD->clientTitleWin, wmGD.windowContextType, (caddr_t)pCD); } -#ifndef WSM - if (pCD->iconFrameWin) - { - XSaveContext (DISPLAY, pCD->iconFrameWin, wmGD.windowContextType, - (caddr_t)pCD); - } -#endif /* WSM */ if (pCD->clientCmapCount > 0) { @@ -621,15 +574,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) SetupCButtonBindings (pCD->clientBaseWin, BUTTON_SPECS(pCD)); } -#ifndef WSM - if (pCD->iconWindow && pCD->iconFrameWin) - { - XGrabButton (DISPLAY, AnyButton, AnyModifier, pCD->iconFrameWin, True, - ButtonPressMask | ButtonReleaseMask | ButtonMotionMask, - GrabModeAsync, GrabModeAsync, None, wmGD.workspaceCursor); - } -#endif /* WSM */ - /* * Setup key binding handling for system menu accelerators. */ @@ -639,7 +583,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) { SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs, pCD->clientFrameWin, GrabModeSync, F_CONTEXT_ALL); -#ifdef WSM for (i = 0; i < pCD->numInhabited; i++) { if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin) @@ -649,36 +592,20 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) F_CONTEXT_ALL); } } -#else /* WSM */ - if (!pCD->pIconBox && pCD->iconFrameWin) - { - SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs, - pCD->iconFrameWin, GrabModeSync, F_CONTEXT_ALL); - } -#endif /* WSM */ } -#ifdef WSM for (i = 0; i < pCD->numInhabited; i++) { if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin) -#else /* WSM */ - if (!pCD->pIconBox && pCD->iconFrameWin) -#endif /* WSM */ { static int iconKeySpec = 1; static int iconAccelSpec = 1; if ((iconKeySpec != 0) && KEY_SPECS(pCD)) { -#ifdef WSM iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD), pCD->pWsList[i].iconFrameWin, GrabModeSync, F_CONTEXT_ICON); -#else /* WSM */ - iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD), pCD->iconFrameWin, - GrabModeSync, F_CONTEXT_ICON); -#endif /* WSM */ } if ((iconAccelSpec != 0) && ACCELERATOR_MENU_COUNT(pCD)) @@ -688,23 +615,14 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) iconAccelSpec = 0; for (n= 0; n < pSD->acceleratorMenuCount; n++) { -#ifdef WSM iconAccelSpec += SetupKeyBindings ( ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs, pCD->pWsList[i].iconFrameWin, GrabModeSync, F_CONTEXT_ICON); -#else /* WSM */ - iconAccelSpec += SetupKeyBindings ( - ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs, - pCD->iconFrameWin, GrabModeSync, - F_CONTEXT_ICON); -#endif /* WSM */ } } } -#ifdef WSM } -#endif /* WSM */ /* @@ -716,9 +634,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) DoExplicitSelectGrab (pCD->clientBaseWin); } -#ifdef WSM UpdateWorkspacePresenceProperty(pCD); -#endif /* WSM */ /* @@ -741,16 +657,13 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) */ initialState = pCD->clientState; -#ifdef WSM if (!ClientInWorkspace (pSD->pActiveWS, pCD)) { initialState |= UNSEEN_STATE; } -#endif /* WSM */ pCD->clientState = WITHDRAWN_STATE; pCD->clientFlags &= ~WM_INITIALIZATION; -#ifdef WSM /* * Add to stacking list using the client's zero'th workspace * instead of the current one because it may not be in @@ -758,9 +671,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) */ AddClientToList (GetWorkspaceData (pSD, pCD->pWsList[0].wsID), pCD, True /*on top*/); -#else /* WSM */ - AddClientToList (pSD->pActiveWS, pCD, True /*on top*/); -#endif /* WSM */ SetClientState (pCD, initialState, GetTimestamp()); /* @@ -784,9 +694,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) !(manageFlags & (MANAGEW_WM_STARTUP | MANAGEW_WM_RESTART | MANAGEW_WM_CLIENTS)) && (pCD->clientState != MINIMIZED_STATE) && -#ifdef WSM !(pCD->clientState & UNSEEN_STATE) && -#endif /* WSM */ (pCD->inputFocusModel || (pCD->protocolFlags & PROTOCOL_WM_TAKE_FOCUS))))) { @@ -798,7 +706,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) Do_Focus_Key ((ClientData *)NULL, GetTimestamp() , ALWAYS_SET_FOCUS); } -#ifdef WSM if (smAckState == SM_START_ACK) { SendClientMsg( wmGD.dtSmWindow, (long) wmGD.xa_DT_SM_WM_PROTOCOL, @@ -813,7 +720,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags) */ DiscardInitialPropertyList (pCD); -#endif /* WSM */ CheckPushRecallClient (pCD); } /* END OF FUNCTION ManageWindow */ @@ -991,9 +897,7 @@ void WithdrawWindow (ClientData *pCD) * - make sure the input focus no longer is associted with the window * - free the icon placement (if necessary) */ -#ifdef WSM SetClientWsIndex (pCD); -#endif /* WSM */ if (!(pCD->clientFlags & WM_INITIALIZATION)) { @@ -1004,7 +908,6 @@ void WithdrawWindow (ClientData *pCD) ResetWithdrawnFocii (pCD); if (pCD->clientState & MINIMIZED_STATE) { -#ifdef WSM if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD)))) { WmWorkspaceData *pWsTmp; @@ -1029,16 +932,6 @@ void WithdrawWindow (ClientData *pCD) } } } -#else /* WSM */ - if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD)))) - { - if (ICON_PLACE(pCD) != NO_ICON_PLACE) - { - pCD->pSD->pActiveWS->IPData.placeList[ICON_PLACE(pCD)].pCD - = NULL; - } - } -#endif /* WSM */ if (ICON_FRAME_WIN(pCD)) { XUnmapWindow (DISPLAY, ICON_FRAME_WIN(pCD)); @@ -1052,7 +945,6 @@ void WithdrawWindow (ClientData *pCD) XFlush (DISPLAY); } } -#ifdef WSM /* * Clean up the workspace presence dialog if it's * connected to this client. @@ -1066,7 +958,6 @@ void WithdrawWindow (ClientData *pCD) } pCD->pSD->presence.pCDforClient = NULL; } -#endif /* WSM */ /* * Check to see if the window is being unmanaged because the window @@ -1094,12 +985,8 @@ void WithdrawWindow (ClientData *pCD) if ((pCD->clientFlags & CLIENT_REPARENTED) && !(pCD->clientFlags & CLIENT_DESTROYED)) { -#ifdef WSM SetWMState (pCD->client, WithdrawnSTATE, pCD->pWsList[0].iconFrameWin); -#else /* WSM */ - SetWMState (pCD->client, WithdrawnSTATE, ICON_FRAME_WIN(pCD)); -#endif /* WSM */ if (pCD->maxConfig) { @@ -1133,13 +1020,8 @@ void WithdrawWindow (ClientData *pCD) if (pCD->iconWindow && (pCD->clientFlags & ICON_REPARENTED)) { XUnmapWindow (DISPLAY, pCD->iconWindow); -#ifdef WSM XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), pCD->pWsList[0].iconX, pCD->pWsList[0].iconY); -#else /* WSM */ - XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), - ICON_X(pCD), ICON_Y(pCD)); -#endif /* WSM */ } } @@ -1180,11 +1062,7 @@ void WithdrawWindow (ClientData *pCD) XFreePixmap (DISPLAY, pCD->iconPixmap); } -#ifdef WSM if ((pCD->numInhabited > 0) && ICON_FRAME_WIN(pCD)) -#else /* WSM */ - if (ICON_FRAME_WIN(pCD)) -#endif /* WSM */ { FreeIcon (pCD); } @@ -1222,8 +1100,6 @@ void WithdrawWindow (ClientData *pCD) */ DeleteClientContext (pCD); - -#ifdef WSM /* * Count backward for efficiency -- * removes from end of list. @@ -1234,7 +1110,6 @@ void WithdrawWindow (ClientData *pCD) GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID), pCD); } -#endif /* WSM */ /* * Free up window manager resources: @@ -1283,7 +1158,6 @@ void WithdrawWindow (ClientData *pCD) #endif } -#ifdef WSM /* * Insure list of initial properties has been freed. */ @@ -1304,7 +1178,6 @@ void WithdrawWindow (ClientData *pCD) { XtFree ((char *)pCD->pWorkspaceHints); } -#endif /* WSM */ if (pCD->smClientID) XFree (pCD->smClientID); @@ -1383,7 +1256,6 @@ void DeleteClientContext (ClientData *pCD) } if (ICON_FRAME_WIN(pCD)) { -#ifdef WSM int k; for (k=0; k < pCD->numInhabited; k++) @@ -1391,10 +1263,6 @@ void DeleteClientContext (ClientData *pCD) XDeleteContext (DISPLAY, pCD->pWsList[k].iconFrameWin, wmGD.windowContextType); } -#else /* WSM */ - XDeleteContext (DISPLAY, pCD->iconFrameWin, - wmGD.windowContextType); -#endif /* WSM */ } pCD->clientFlags &= ~CLIENT_CONTEXT_SAVED; } @@ -1570,10 +1438,8 @@ void FreeClientFrame (ClientData *pCD) void FreeIcon (ClientData *pCD) { -#ifdef WSM WmWorkspaceData *pWsTmp; int i; -#endif /* WSM */ if (pCD->piconTopShadows) { FreeRList (pCD->piconTopShadows); @@ -1588,7 +1454,6 @@ void FreeIcon (ClientData *pCD) * destroy frame window & all children */ -#ifdef WSM if ((pCD->pSD->useIconBox) && pCD->pWsList[0].pIconBox) { /* @@ -1613,16 +1478,6 @@ void FreeIcon (ClientData *pCD) XDestroyWindow (DISPLAY, pCD->pWsList[0].iconFrameWin); } } -#else /* WSM */ - if (pCD->pSD->useIconBox && P_ICON_BOX(pCD)) - { - DeleteIconFromBox (pCD->pSD->pActiveWS->pIconBox, pCD); - } - else - { - XDestroyWindow (DISPLAY, pCD->iconFrameWin); - } -#endif /* WSM */ } /* END OF FUNCTION FreeIcon */ @@ -1652,9 +1507,7 @@ void FreeIcon (ClientData *pCD) void WithdrawDialog (Widget dialogboxW) { -#ifdef WSM int i; -#endif /* WSM */ ClientData *pCD = NULL; /* @@ -1667,7 +1520,6 @@ void WithdrawDialog (Widget dialogboxW) XtUnmanageChild (dialogboxW); DeleteClientFromList (ACTIVE_WS, pCD); -#ifdef WSM /* TakeClientOutOfWorkspace (ACTIVE_WS, pCD); */ /* @@ -1680,7 +1532,7 @@ void WithdrawDialog (Widget dialogboxW) GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID), pCD); } -#endif /* WSM */ + ResetWithdrawnFocii (pCD); XUnmapWindow (DISPLAY, pCD->clientFrameWin); @@ -1727,7 +1579,6 @@ void ReManageDialog (WmScreenData *pSD, Widget dialogboxW) * The order is important here: */ -#ifdef WSM /* * Put system modal windows in all workspaces to * avoid the race condition of the window coming up @@ -1742,7 +1593,6 @@ void ReManageDialog (WmScreenData *pSD, Widget dialogboxW) pCD->dtwmFunctions |= DtWM_FUNCTION_OCCUPY_WS; F_AddToAllWorkspaces(0, pCD, 0); pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; -#endif /* WSM */ if (pSD->clientList) { @@ -2276,9 +2126,7 @@ ManageEmbeddedClient ( pECD->pCD = pCD; pCD->pECD = (void *) pECD; -#ifdef WSM SetClientWsIndex(pCD); -#endif SetClientWMState (pCD, NormalState, NORMAL_STATE); /* diff --git a/cde/programs/dtwm/WmMenu.c b/cde/programs/dtwm/WmMenu.c index df4f5b06..65c7dc72 100644 --- a/cde/programs/dtwm/WmMenu.c +++ b/cde/programs/dtwm/WmMenu.c @@ -42,9 +42,9 @@ #include "WmCEvent.h" #include "WmResource.h" #include "WmResParse.h" -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # include "WmDebug.h" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ #include #include @@ -83,16 +83,14 @@ #include "WmIconBox.h" #include "WmImage.h" #include "WmError.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ static void UnmapCallback (Widget w, XtPointer client_data, XtPointer call_data); static MenuItem *DuplicateMenuItems (MenuItem *menuItems); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) static MenuExclusion *DuplicateMenuExclusions(MenuExclusion *exclusions); static Boolean FindClientCommandMatch (MenuSpec *menuSpec, String clientCommand, @@ -108,7 +106,7 @@ static void InsertTreeOnClient (WmScreenData *pSD, ClientData *pCD, static MenuSpec *MakeMenuSpec (String menuName, CARD32 commandID); static void UnmapPulldownCallback (Widget w, XtPointer client_data, XtPointer call_data); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ @@ -151,9 +149,9 @@ static void UnmapPulldownCallback (Widget w, XtPointer client_data, * *************************************<->***********************************/ MenuSpec *MakeMenu (WmScreenData *pSD, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) ClientData *pCD, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ String menuName, Context initialContext, Context accelContext, MenuItem *moreMenuItems, Boolean fSystemMenu) @@ -215,7 +213,7 @@ MenuSpec *MakeMenu (WmScreenData *pSD, if (moreMenuItems != NULL) { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) if ((newMenuSpec = DuplicateMenuSpec(menuSpec)) == (MenuSpec *)NULL) return NULL; #else @@ -384,7 +382,7 @@ void CheckTerminalSeparator(menuSpec, buttonWidget, manage) -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * MakeMenuSpec (menuName, commandID) @@ -512,7 +510,6 @@ DuplicateMenuItems (MenuItem *menuItems) newMenuItem->wmFunction = curMenuItem->wmFunction; if ((curMenuItem->wmFunction == F_Send_Msg) -#ifdef WSM || (curMenuItem->wmFunction == F_Set_Context) /* * NOTE: For now, in dtwm this function is used only @@ -524,7 +521,6 @@ DuplicateMenuItems (MenuItem *menuItems) * the WmActionArg. 11/20/96 */ || (curMenuItem->wmFunction == F_Action) -#endif /* WSM */ ) newMenuItem->wmFuncArgs = curMenuItem->wmFuncArgs; else if (curMenuItem->wmFuncArgs != (String) NULL) @@ -534,7 +530,7 @@ DuplicateMenuItems (MenuItem *menuItems) newMenuItem->greyedContext = curMenuItem->greyedContext; newMenuItem->mgtMask = curMenuItem->mgtMask; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) newMenuItem->clientCommandName = XtNewString(curMenuItem->clientCommandName); newMenuItem->clientCommandID = curMenuItem->clientCommandID; @@ -546,7 +542,7 @@ DuplicateMenuItems (MenuItem *menuItems) } -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * DuplicateMenuExclusions (exclusions) @@ -665,7 +661,7 @@ DuplicateMenuSpec (MenuSpec *menuSpec) newMenuSpec->menuButtonCount = 0; newMenuSpec->accelContext = menuSpec->accelContext; newMenuSpec->accelKeySpecs = (KeySpec *) NULL; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) newMenuSpec->exclusions = DuplicateMenuExclusions(menuSpec->exclusions); newMenuSpec->clientLocal = TRUE; newMenuSpec->commandID = menuSpec->commandID; @@ -676,7 +672,7 @@ DuplicateMenuSpec (MenuSpec *menuSpec) } -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * MakeMenuItem (label, wmFunction, funcArgs, mnemonic, accelText) @@ -2867,7 +2863,7 @@ void ModifyClientCommandTree (WmScreenData *pSD, modifier, context, newname); } } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* * @@ -2983,7 +2979,7 @@ static Boolean AdjustPBs (MenuSpec *menuSpec, ClientData *pCD, XtSetSensitive (menuButton->buttonWidget, FALSE); } } -#ifdef WSM + if (menuItem->wmFunction == F_Remove) { /* @@ -2993,17 +2989,12 @@ static Boolean AdjustPBs (MenuSpec *menuSpec, ClientData *pCD, fSupported = (pCD && (pCD->numInhabited > 1)); XtSetSensitive (menuButton->buttonWidget, fSupported); } -#endif /* WSM */ if ((menuItem->mgtMask) && pCD) /* PushButton might not apply */ { -#ifdef WSM if ((pCD->clientFunctions & menuItem->mgtMask & MWM_MGT_MASK) || (pCD->dtwmFunctions & menuItem->mgtMask & DTWM_MGT_MASK)) -#else /* WSM */ - if (pCD->clientFunctions & menuItem->mgtMask) -#endif /* WSM */ /* function applies -- manage it */ { if (!menuButton->managed) @@ -3147,7 +3138,7 @@ static Boolean SavePBInfo (MenuSpec *topMenuSpec, MenuItem *menuItem, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * AdjustTearOffControl (cascade, closure, cbackdata) @@ -3348,7 +3339,7 @@ static Boolean CreateClientCommandSeparator (MenuItem *menuItem, /* Well, nothing failed so let's create it. */ return(TRUE); } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* * @@ -3394,9 +3385,9 @@ typedef struct _StrList } StrList; Widget CreateMenuWidget (WmScreenData *pSD, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) ClientData *pCD, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ String menuName, Widget parent, Boolean fTopLevelPane, MenuSpec *topMenuSpec, MenuItem *moreMenuItems) @@ -3414,9 +3405,9 @@ Widget CreateMenuWidget (WmScreenData *pSD, KeySpec *accelKeySpec; Dimension menuHeight; Boolean fUseTitleSep = False; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) Boolean labelIsClientCommand = False; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ StrList *stringsToFree = NULL, *sPtr; XmString tmpstr; #ifndef IBM_151913 @@ -3551,9 +3542,9 @@ Widget CreateMenuWidget (WmScreenData *pSD, { i = 0; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) labelIsClientCommand = IsClientCommand(menuItem->label); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ if (menuItem->wmFunction == F_Separator) /* @@ -3561,7 +3552,7 @@ Widget CreateMenuWidget (WmScreenData *pSD, * An immediately following title will not have a top separator. */ { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* If it is a client command, then we only want to create the * separator under particular circumstances. Specifically, we * want to make sure that: @@ -3586,7 +3577,7 @@ Widget CreateMenuWidget (WmScreenData *pSD, } } else -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ { children[n] = XmCreateSeparatorGadget (menuW, SEPARATOR_NAME, @@ -3596,9 +3587,9 @@ Widget CreateMenuWidget (WmScreenData *pSD, } /* F_Separator */ else -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) if (!labelIsClientCommand) -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* * We will use one of: * @@ -3713,11 +3704,11 @@ Widget CreateMenuWidget (WmScreenData *pSD, i++; children[n] = XmCreateCascadeButtonGadget (menuW, CASCADE_BTN_NAME, (ArgList) args, i); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) XtAddCallback(children[n], XmNcascadingCallback, (XtCallbackProc)AdjustTearOffControl, (XtPointer)subMenuW); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ } else /* @@ -3835,9 +3826,9 @@ Widget CreateMenuWidget (WmScreenData *pSD, * Increment the children array count if we actually * created a new child. */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) if (!labelIsClientCommand) -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ n++; /* @@ -3957,9 +3948,9 @@ void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y, unsigned int b XButtonPressedEvent event; Window saveWindow; Display *saveDisplay; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) Boolean menuAdjusted; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ if ((menuSpec == NULL) || (menuSpec->menuWidget == NULL)) { @@ -3999,22 +3990,20 @@ void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y, unsigned int b * change, we may need to remeasure things. (CR 9316) */ -#ifdef WSM if(pCD && pCD->clientFlags & ICON_BOX) { newContext |= F_CONTEXT_ICONBOX; } -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) menuAdjusted = AdjustTearOffControl(NULL, (XtPointer) (menuSpec->menuWidget), NULL); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ if (AdjustPBs (menuSpec, pCD, newContext) -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) || menuAdjusted -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ ) { i = 0; @@ -4293,7 +4282,7 @@ void MWarning (char *format, char *message) -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * UnmapPulldownCallback (w, client_data, call_data) @@ -4319,7 +4308,7 @@ static void UnmapPulldownCallback (Widget w, XtPointer client_data, { wmGD.menuActive = (MenuSpec *) NULL; } /* END OF FUNCTION UnmapPulldownCallback */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* diff --git a/cde/programs/dtwm/WmMenu.h b/cde/programs/dtwm/WmMenu.h index 47f8a66b..212d6266 100644 --- a/cde/programs/dtwm/WmMenu.h +++ b/cde/programs/dtwm/WmMenu.h @@ -33,7 +33,7 @@ /* * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \ MakeMenu(pSD, pCD, mName, iC, aC, moreItems, sysMenu) # define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \ @@ -43,23 +43,23 @@ MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu) # define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \ CreateMenuWidget(pSD, mName, parent, fTLP, tSpec, moreItems) -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ extern void ActivateCallback (Widget w, caddr_t client_data, caddr_t call_data); extern Widget CreateMenuWidget (WmScreenData *pSD, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) ClientData *pCD, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ String menuName, Widget parent, Boolean fTopLevelPane, MenuSpec *topMenuSpec, MenuItem *moreMenuItems); extern void FreeCustomMenuSpec (MenuSpec *menuSpec); extern void MWarning (char *format, char *message); extern MenuSpec *MakeMenu (WmScreenData *pSD, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) ClientData *pCD, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ String menuName, Context initialContext, Context accelContext, MenuItem *moreMenuItems, Boolean fSystemMenu); @@ -70,7 +70,7 @@ extern void TraversalOff (MenuSpec *menuSpec); extern void TraversalOn (MenuSpec *menuSpec); extern void UnpostMenu (MenuSpec *menuSpec); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree, Atom selection, Context active_context, Boolean in_line); @@ -85,7 +85,7 @@ extern void ModifyClientCommandTree (WmScreenData *pSD, ClientData *pCD, String newname); extern void DestroyMenuSpecWidgets (MenuSpec *menuspec); extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec); diff --git a/cde/programs/dtwm/WmPresence.c b/cde/programs/dtwm/WmPresence.c index 1d10a17d..d4d3dad5 100644 --- a/cde/programs/dtwm/WmPresence.c +++ b/cde/programs/dtwm/WmPresence.c @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * ALL RIGHTS RESERVED @@ -1760,6 +1759,4 @@ UpdatePresenceWorkspaces( } /* END OF FUNCTION UpdatePresenceWorkspaces */ -/* DO NOT ADD ANYTHING AFTER THIS ENDIF */ -#endif /* WSM */ /**************************** eof ***************************/ diff --git a/cde/programs/dtwm/WmPresence.h b/cde/programs/dtwm/WmPresence.h index cfed4aea..8b862d75 100644 --- a/cde/programs/dtwm/WmPresence.h +++ b/cde/programs/dtwm/WmPresence.h @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * ALL RIGHTS RESERVED @@ -41,4 +40,3 @@ extern MenuItem * GetPresenceBoxMenuItems( extern void UpdatePresenceWorkspaces( WmScreenData *pSD ); /******** End Public Function Declarations ********/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmProperty.c b/cde/programs/dtwm/WmProperty.c index 833ec584..5cde076f 100644 --- a/cde/programs/dtwm/WmProperty.c +++ b/cde/programs/dtwm/WmProperty.c @@ -37,11 +37,9 @@ #include "WmGlobal.h" #include "WmICCC.h" #include -#ifdef WSM #include
#include #include -#endif /* WSM */ /* * include extern functions @@ -114,7 +112,6 @@ GetNormalHints( * ICCC_CURRENT version: nitems = PROP_SIZE_HINTS_ELEMENTS */ -#ifdef WSM if ((!HasProperty (pCD, XA_WM_NORMAL_HINTS)) || ((Success != XGetWindowProperty (DISPLAY, pCD->client, XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS, @@ -123,15 +120,6 @@ GetNormalHints( (actualType != XA_WM_SIZE_HINTS) || (nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) || (actualFormat != 32))) -#else /* WSM */ - if ((Success != XGetWindowProperty (DISPLAY, pCD->client, - XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS, - False, XA_WM_SIZE_HINTS, &actualType, &actualFormat, - &nitems, &leftover, (unsigned char **)&property)) || - (actualType != XA_WM_SIZE_HINTS) || - (nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) || - (actualFormat != 32)) -#endif /* WSM */ { /* * Indicate no property values were retrieved: @@ -259,11 +247,9 @@ void ProcessWmProtocols (ClientData *pCD) */ #ifndef ICCC_COMPLIANT -#ifdef WSM if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS)) rValue = -1; else -#endif /* WSM */ rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_WM_PROTOCOLS, 0L, (long)MAX_CLIENT_PROTOCOL_COUNT, False, AnyPropertyType, &actualType, &actualFormat, &nitems, &leftover, @@ -272,11 +258,9 @@ void ProcessWmProtocols (ClientData *pCD) if ((rValue != Success) || (actualType == None) || (actualFormat != 32)) #else -#ifdef WSM if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS)) rValue = -1; else -#endif /* WSM */ rValue = XGetWMProtocols (DISPLAY, pCD->client, (Atom **)&property, &nitems); @@ -384,11 +368,9 @@ void ProcessMwmMessages (ClientData *pCD) * Read the _MWM_MESSAGES property. */ -#ifdef WSM if (!HasProperty (pCD, wmGD.xa_MWM_MESSAGES)) rValue = ~Success; else -#endif /* WSM */ rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_MESSAGES, 0L, (long)MAX_MWM_MESSAGES_COUNT, False, AnyPropertyType, &actualType, &actualFormat, &nitems, &leftover, @@ -481,8 +463,7 @@ void SetMwmInfo (Window propWindow, long flags, Window wmWindow) } /* END OF FUNCTION SetMwmInfo */ -#ifdef WSM - + /*************************************<->************************************* * * SetMwmSaveSessionInfo (wmWindow) @@ -517,7 +498,7 @@ void SetMwmSaveSessionInfo (Window wmWindow) SetWMState(wmWindow, NORMAL_STATE, 0); } /* END OF FUNCTION SetMwmSaveSessionInfo */ -#endif /* WSM */ + /*************************************<->************************************* @@ -667,11 +648,9 @@ GetMwmHints( unsigned long leftover; -#ifdef WSM if (!HasProperty(pCD, wmGD.xa_MWM_HINTS)) ret_val = ~Success; else -#endif /* WSM */ ret_val = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_HINTS, 0L, PROP_MWM_HINTS_ELEMENTS, False, wmGD.xa_MWM_HINTS, @@ -1103,7 +1082,6 @@ GetMwmMenuItems( } /* END OF FUNCTION GetMwmMenuItems */ -#ifdef WSM /*************************************<->************************************* @@ -1955,7 +1933,7 @@ HasProperty ( return (bFound); } /* END OF FUNCTION HasProperty */ -#endif /* WSM */ + diff --git a/cde/programs/dtwm/WmProperty.h b/cde/programs/dtwm/WmProperty.h index 3d0424e1..a7c24c43 100644 --- a/cde/programs/dtwm/WmProperty.h +++ b/cde/programs/dtwm/WmProperty.h @@ -35,9 +35,7 @@ extern SizeHints * GetNormalHints (ClientData *pCD); extern void ProcessWmProtocols (ClientData *pCD); extern void ProcessMwmMessages (ClientData *pCD); extern void SetMwmInfo (Window propWindow, long flags, Window wmWindow); -#ifdef WSM void SetMwmSaveSessionInfo (Window wmWindow); -#endif /* WSM */ extern void GetDtWmRequest (WmScreenData *pSD, char **pszReq, Boolean *pmore); extern void GetDtSessionHints (WmScreenData *pSD, int sNum); @@ -49,7 +47,6 @@ extern void ProcessWmColormapWindows (ClientData *pCD); extern Colormap FindColormap (ClientData *pCD, Window window); extern MenuItem * GetMwmMenuItems (ClientData *pCD); extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients); -#ifdef WSM extern void GetInitialPropertyList (ClientData *pCD); extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll); #ifdef HP_VUE @@ -64,4 +61,4 @@ extern void SetCurrentWorkspaceProperty (WmScreenData *pSD); extern void SetWorkspaceInfoProperty (WmWorkspaceData *pWS); extern void DeleteWorkspaceInfoProperty (WmWorkspaceData *pWS); extern char *WorkspacePropertyName (WmWorkspaceData *pWS); -#endif /* WSM */ + diff --git a/cde/programs/dtwm/WmProtocol.c b/cde/programs/dtwm/WmProtocol.c index 7425becc..b570d56e 100644 --- a/cde/programs/dtwm/WmProtocol.c +++ b/cde/programs/dtwm/WmProtocol.c @@ -51,10 +51,10 @@ #endif /* NO_WMQUERY */ #include "WmPanelP.h" -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # include "WmCmd.h" # include "WmDebug.h" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* * Function Declarations: @@ -75,13 +75,13 @@ static void wmq_lose (Widget w, Atom *pSelection); static void wmq_bump_xids(void); #endif /* NO_WMQUERY */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) static void OwnWMSelections (Time timestamp); static Boolean WMiConvert (Widget, Atom, Atom, XtPointer, unsigned long, int, Atom *, XtPointer *, unsigned long *, int *); static void WMiConvertCB (Widget, XtPointer, XtPointer); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* * Global Variables: @@ -118,18 +118,18 @@ int curXids = 0; void SetupWmICCC (void) { enum { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) XA_TARGETS, XA_MULTIPLE, XA_TIMESTAMP, #endif XA_WM_STATE, XA_WM_PROTOCOLS, XA_WM_CHANGE_STATE, XA_WM_SAVE_YOURSELF, XA_WM_DELETE_WINDOW, XA_WM_COLORMAP_WINDOWS, XA_WM_TAKE_FOCUS, XA_MWM_HINTS, XA_MWM_MENU, XA_MWM_MESSAGES, XA_MOTIF_WM_OFFSET, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY)) +#if (defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY)) XA_MOTIF_WM_CLIENT_WINDOW, XA_MOTIF_WM_POINTER_WINDOW, XA_MOTIF_WM_ALL_CLIENTS, #endif -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) XA_MOTIF_WM_DEFINE_COMMAND, XA_MOTIF_WM_INCLUDE_COMMAND, XA_MOTIF_WM_REMOVE_COMMAND, XA_MOTIF_WM_ENABLE_COMMAND, XA_MOTIF_WM_DISABLE_COMMAND, XA_MOTIF_WM_RENAME_COMMAND, @@ -139,14 +139,14 @@ void SetupWmICCC (void) XA_COMPOUND_TEXT, NUM_ATOMS }; static char *atom_names[] = { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) _XA_TARGETS, _XA_MULTIPLE, _XA_TIMESTAMP, #endif _XA_WM_STATE, _XA_WM_PROTOCOLS, _XA_WM_CHANGE_STATE, _XA_WM_SAVE_YOURSELF, _XA_WM_DELETE_WINDOW, _XA_WM_COLORMAP_WINDOWS, _XA_WM_TAKE_FOCUS, _XA_MWM_HINTS, _XA_MWM_MENU, _XA_MWM_MESSAGES, _XA_MOTIF_WM_OFFSET, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY)) +#if (defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY)) # ifdef _XA_MOTIF_WM_CLIENT_WINDOW _XA_MOTIF_WM_CLIENT_WINDOW, _XA_MOTIF_WM_POINTER_WINDOW, _XA_MOTIF_WM_ALL_CLIENTS, @@ -155,7 +155,7 @@ void SetupWmICCC (void) "_MOTIF_WM_ALL_CLIENTS" # endif #endif -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) _XA_MOTIF_WM_DEFINE_COMMAND, _XA_MOTIF_WM_INCLUDE_COMMAND, _XA_MOTIF_WM_REMOVE_COMMAND, _XA_MOTIF_WM_ENABLE_COMMAND, _XA_MOTIF_WM_DISABLE_COMMAND, _XA_MOTIF_WM_RENAME_COMMAND, @@ -176,12 +176,12 @@ void SetupWmICCC (void) XInternAtoms(DISPLAY, atom_names, XtNumber(atom_names), False, atoms); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) wmGD.xa_TARGETS = atoms[XA_TARGETS]; wmGD.xa_MULTIPLE = atoms[XA_MULTIPLE]; wmGD.xa_TIMESTAMP = atoms[XA_TIMESTAMP]; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ wmGD.xa_WM_STATE = atoms[XA_WM_STATE]; wmGD.xa_WM_PROTOCOLS = atoms[XA_WM_PROTOCOLS]; @@ -195,7 +195,7 @@ void SetupWmICCC (void) wmGD.xa_MWM_MESSAGES = atoms[XA_MWM_MESSAGES]; wmGD.xa_MWM_OFFSET = atoms[XA_MOTIF_WM_OFFSET]; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* wm query targets */ wmGD._MOTIF_WM_CLIENT_WINDOW = atoms[XA_MOTIF_WM_CLIENT_WINDOW]; wmGD._MOTIF_WM_POINTER_WINDOW = atoms[XA_MOTIF_WM_POINTER_WINDOW]; @@ -213,17 +213,17 @@ void SetupWmICCC (void) wmGD._MOTIF_WM_WINDOW_FLAGS = atoms[XA_MOTIF_WM_WINDOW_FLAGS]; wmGD._MOTIF_WM_AUTOMATION = atoms[XA_MOTIF_WM_AUTOMATION]; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* * Assert ownership of the WINDOW_MANAGER selection * on each screen that the window manager controls. * these use the format WM_Si. */ OwnWMSelections(GetTimestamp()); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ wmGD.xa_COMPOUND_TEXT = atoms[XA_COMPOUND_TEXT]; @@ -1144,7 +1144,7 @@ wmq_bump_xids ( void ) -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * static void OwnWMSelections () @@ -1504,4 +1504,4 @@ WMiConvertCB ( &(cnv->type), &(cnv->value), &(cnv->length), &(cnv->format)); } } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ diff --git a/cde/programs/dtwm/WmResCvt.c b/cde/programs/dtwm/WmResCvt.c index ea6bcd34..0dbc2195 100644 --- a/cde/programs/dtwm/WmResCvt.c +++ b/cde/programs/dtwm/WmResCvt.c @@ -96,10 +96,8 @@ long DecStrToL (); void AddWmResourceConverters (void) { -#ifdef WSM XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRAbsentMapBehavior, (XtConverter)WmCvtStringToAMBehavior, NULL, 0); -#endif /* WSM */ XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRCFocusPolicy, (XtConverter)WmCvtStringToCFocus, NULL, 0); XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRClientDecor, @@ -123,8 +121,6 @@ void AddWmResourceConverters (void) } /* END OF FUNCTION AddWmResourceConverters */ -#ifdef WSM - /*************************************<->************************************* * * WmCvtStringToAMBehavior (args, numArgs, fromVal, toVal) @@ -210,7 +206,6 @@ void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs, XrmValue *fromVa } /* END OF FUNCTION WmCvtStringToAMBehavior */ -#endif /* WSM */ /*************************************<->************************************* diff --git a/cde/programs/dtwm/WmResCvt.h b/cde/programs/dtwm/WmResCvt.h index 6992d95f..563db382 100644 --- a/cde/programs/dtwm/WmResCvt.h +++ b/cde/programs/dtwm/WmResCvt.h @@ -31,10 +31,8 @@ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ extern void AddWmResourceConverters (void); -#ifdef WSM extern void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal); -#endif /* WSM */ extern void WmCvtStringToCFocus (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal); extern void WmCvtStringToCDecor (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal); extern void WmCvtStringToCFunc (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal); diff --git a/cde/programs/dtwm/WmResNames.h b/cde/programs/dtwm/WmResNames.h index 9c4d4fa0..993c6d35 100644 --- a/cde/programs/dtwm/WmResNames.h +++ b/cde/programs/dtwm/WmResNames.h @@ -52,14 +52,10 @@ /* mwm specific appearance and behavior resources: */ -#ifdef WSM #define WmNall "all" -#endif /* WSM */ #define WmNautoKeyFocus "autoKeyFocus" #define WmNautoRaiseDelay "autoRaiseDelay" -#ifdef WSM #define WmNbackdropDirectories "backdropDirectories" -#endif /* WSM */ #define WmNbitmapDirectory "bitmapDirectory" #define WmNblinkOnExec "blinkOnExec" #define WmNbuttonBindings "buttonBindings" @@ -67,9 +63,7 @@ #define WmNclientAutoPlace "clientAutoPlace" #define WmNcolormapFocusPolicy "colormapFocusPolicy" #define WmNconfigFile "configFile" -#ifdef WSM #define WmNcppCommand "cppCommand" -#endif /* WSM */ #define WmNdeiconifyKeyFocus "deiconifyKeyFocus" #define WmNdoubleClickTime "doubleClickTime" #define WmNenableWarp "enableWarp" @@ -77,13 +71,9 @@ #define WmNfadeNormalIcon "fadeNormalIcon" #define WmNfeedbackGeometry "feedbackGeometry" #define WmNframeBorderWidth "frameBorderWidth" -#ifdef WSM #define WmNframeExternalShadowWidth "frameExternalShadowWidth" -#endif /* WSM */ #define WmNfreezeOnConfig "freezeOnConfig" -#ifdef WSM #define WmNgeometry "geometry" -#endif /* WSM */ #define WmNiconAutoPlace "iconAutoPlace" #define WmNiconBoxGeometry "iconBoxGeometry" #define WmNiconBoxLayout "iconBoxLayout" @@ -93,26 +83,20 @@ #define WmNiconBoxTitle "iconBoxTitle" #define WmNiconClick "iconClick" #define WmNiconDecoration "iconDecoration" -#ifdef WSM #define WmNiconExternalShadowWidth "iconExternalShadowWidth" -#endif /* WSM */ #define WmNiconImageMaximum "iconImageMaximum" #define WmNiconImageMinimum "iconImageMinimum" #define WmNiconPlacement "iconPlacement" #define WmNiconPlacementMargin "iconPlacementMargin" -#ifdef WSM #define WmNimage "image" #define WmNimageBackground "imageBackground" #define WmNimageForeground "imageForeground" -#endif /* WSM */ #define WmNinteractivePlacement "interactivePlacement" #define WmNkeyBindings "keyBindings" #define WmNkeyboardFocusPolicy "keyboardFocusPolicy" #define WmNlimitResize "limitResize" #define WmNlowerOnIconify "lowerOnIconify" -#ifdef WSM #define WmNmarqueeSelectGranularity "marqueeSelectGranularity" -#endif /* WSM */ #define WmNmaximumMaximumSize "maximumMaximumSize" #define WmNmoveThreshold "moveThreshold" #define WmNmultiScreen "multiScreen" @@ -122,26 +106,17 @@ #define WmNpositionOnScreen "positionOnScreen" #define WmNquitTimeout "quitTimeout" #define WmNraiseKeyFocus "raiseKeyFocus" -#ifdef WSM #define WmNrefreshByClearing "refreshByClearing" -#endif #define WmNresizeBorderWidth "resizeBorderWidth" #define WmNresizeCursors "resizeCursors" -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define WmNrootMenu "rootMenu" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ -#ifdef WSM +#endif /* defined(MWM_QATS_PROTOCOL) */ #define WmNrootButtonClick "rootButtonClick" #define WmNsecondariesOnTop "secondariesOnTop" #define WmNsessionVersion "sessionVersion" -#endif /* WSM */ -#ifndef WSM -#define WmNsessionClientDB "sessionClientDB" -#endif /* ! WSM */ #define WmNshowFeedback "showFeedback" -#ifdef WSM #define WmNshowNames "showNames" -#endif /* WSM */ #define WmNstartupKeyFocus "startupKeyFocus" #define WmNsubpanelDecoration "subpanelDecoration" #define WmNsubpanelResources "subpanelResources" @@ -151,9 +126,7 @@ #define WmNtransientFunctions "transientFunctions" #define WmNuseFrontPanel "useFrontPanel" #define WmNuseIconBox "useIconBox" -#ifdef WSM #define WmNuseWindowOutline "useWindowOutline" -#endif /* WSM */ #define WmNdtLite "useDtLite" #define WmNmoveOpaque "moveOpaque" #define WmNframeStyle "frameStyle" @@ -179,15 +152,11 @@ /* mwm - client specific resources: */ -#ifdef WSM #define WmNabsentMapBehavior "absentMapBehavior" -#endif /* WSM */ #define WmNclientDecoration "clientDecoration" #define WmNclientFunctions "clientFunctions" #define WmNfocusAutoRaise "focusAutoRaise" -#ifdef WSM #define WmNhelpResources "helpResources" -#endif /* WSM */ #define WmNiconImage "iconImage" #define WmNiconImageBackground "iconImageBackground" #define WmNiconImageBottomShadowColor "iconImageBottomShadowColor" @@ -196,9 +165,7 @@ #define WmNiconImageTopShadowColor "iconImageTopShadowColor" #define WmNiconImageTopShadowPixmap "iconImageTopShadowPixmap" #define WmNignoreWMSaveHints "ignoreWMSaveHints" -#ifdef WSM #define WmNinitialWorkspace "initialWorkspace" -#endif /* WSM */ #define WmNmatteBackground "matteBackground" #define WmNmatteBottomShadowColor "matteBottomShadowColor" #define WmNmatteBottomShadowPixmap "matteBottomShadowPixmap" @@ -212,10 +179,8 @@ #define WmNsystemMenu "windowMenu" #define WmNuseClientIcon "useClientIcon" #define WmNusePPosition "usePPosition" -#ifdef WSM #define WmNworkspaceList "workspaceList" #define WmNworkspaceCount "workspaceCount" -#endif /* WSM */ /* window manager part resource names: */ @@ -225,22 +190,18 @@ #define WmNmenu "menu" #define WmNtitle "title" #define WmNdefaults "defaults" -#ifdef WSM #define WmNbackdrop "backdrop" #define WmNcolorSetId "colorSetId" #define WmNfrontPanel "frontPanel" #define WmNworkspaceController "workspaceController" #define WmNworkspacePresence "workspacePresence" #define WmNworkspaceSwitch "workspaceSwitch" -#endif /* WSM */ /* window manager client resource names: */ #define WmNiconBox "iconbox" #define WmNconfirmbox "confirmbox" -#ifdef WSM #define WmNswitcher "switcher" -#endif /* WSM */ @@ -258,9 +219,7 @@ #define WmCAutoKeyFocus "AutoKeyFocus" #define WmCAutoRaiseDelay "AutoRaiseDelay" -#ifdef WSM #define WmCBackdropDirectories "BackdropDirectories" -#endif /* WSM */ #define WmCBitmapDirectory "BitmapDirectory" #define WmCBlinkOnExec "BlinkOnExec" #define WmCButtonBindings "ButtonBindings" @@ -268,9 +227,7 @@ #define WmCClientAutoPlace "ClientAutoPlace" #define WmCColormapFocusPolicy "ColormapFocusPolicy" #define WmCConfigFile "ConfigFile" -#ifdef WSM #define WmCCppCommand "CppCommand" -#endif /* WSM */ #define WmCDeiconifyKeyFocus "DeiconifyKeyFocus" #define WmCDoubleClickTime "DoubleClickTime" #define WmCEnableWarp "EnableWarp" @@ -278,13 +235,9 @@ #define WmCFadeNormalIcon "FadeNormalIcon" #define WmCFeedbackGeometry "FeedbackGeometry" #define WmCFrameBorderWidth "FrameBorderWidth" -#ifdef WSM #define WmCFrameExternalShadowWidth "FrameExternalShadowWidth" -#endif /* WSM */ #define WmCFreezeOnConfig "FreezeOnConfig" -#ifdef WSM #define WmCGeometry "Geometry" -#endif /* WSM */ #define WmCIconAutoPlace "IconAutoPlace" #define WmCIconBoxGeometry "IconBoxGeometry" #define WmCIconBoxLayout "IconBoxLayout" @@ -294,26 +247,20 @@ #define WmCIconBoxTitle "IconBoxTitle" #define WmCIconClick "IconClick" #define WmCIconDecoration "IconDecoration" -#ifdef WSM #define WmCIconExternalShadowWidth "IconExternalShadowWidth" -#endif /* WSM */ #define WmCIconImageMaximum "IconImageMaximum" #define WmCIconImageMinimum "IconImageMinimum" #define WmCIconPlacement "IconPlacement" #define WmCIconPlacementMargin "IconPlacementMargin" -#ifdef WSM #define WmCImage "Image" #define WmCImageBackground "ImageBackground" #define WmCImageForeground "ImageForeground" -#endif /* WSM */ #define WmCInteractivePlacement "InteractivePlacement" #define WmCKeyBindings "KeyBindings" #define WmCKeyboardFocusPolicy "KeyboardFocusPolicy" #define WmCLimitResize "LimitResize" #define WmCLowerOnIconify "LowerOnIconify" -#ifdef WSM #define WmCMarqueeSelectGranularity "MarqueeSelectGranularity" -#endif /* WSM */ #define WmCMaximumMaximumSize "MaximumMaximumSize" #define WmCMoveThreshold "MoveThreshold" #define WmCMultiScreen "MultiScreen" @@ -323,28 +270,19 @@ #define WmCPositionOnScreen "PositionOnScreen" #define WmCQuitTimeout "QuitTimeout" #define WmCRaiseKeyFocus "RaiseKeyFocus" -#ifdef WSM #define WmCRefreshByClearing "RefreshByClearing" -#endif #define WmCResizeBorderWidth "ResizeBorderWidth" #define WmCResizeCursors "ResizeCursors" -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define WmCRootMenu "RootMenu" -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ -#ifdef WSM +#endif /* defined(MWM_QATS_PROTOCOL) */ #define WmCRootButtonClick "RootButtonClick" #define WmCSecondariesOnTop "SecondariesOnTop" #define WmCSessionVersion "SessionVersion" -#endif /* WSM */ -#ifndef WSM -#define WmCSessionClientDB "SessionClientDB" -#endif /* ! WSM */ #define WmCScreenList "ScreenList" #define WmCScreens "Screens" #define WmCShowFeedback "ShowFeedback" -#ifdef WSM #define WmCShowNames "ShowNames" -#endif /* WSM */ #define WmCStartupKeyFocus "StartupKeyFocus" #define WmCSubpanelDecoration "SubpanelDecoration" #define WmCSubpanelResources "SubpanelResources" @@ -354,16 +292,12 @@ #define WmCTransientFunctions "TransientFunctions" #define WmCUseFrontPanel "UseFrontPanel" #define WmCUseIconBox "UseIconBox" -#ifdef WSM #define WmCUseWindowOutline "UseWindowOutline" -#endif /* WSM */ #define WmCDtLite "UseDtLite" #define WmCMoveOpaque "MoveOpaque" #define WmCFrameStyle "FrameStyle" -#ifdef WSM #define WmCWorkspaceList "WorkspaceList" #define WmCWorkspaceCount "WorkspaceCount" -#endif /* WSM */ /* component appearance resources: */ @@ -386,15 +320,11 @@ /* mwm - client specific resources: */ -#ifdef WSM #define WmCAbsentMapBehavior "AbsentMapBehavior" -#endif /* WSM */ #define WmCClientDecoration "ClientDecoration" #define WmCClientFunctions "ClientFunctions" #define WmCFocusAutoRaise "FocusAutoRaise" -#ifdef WSM #define WmCHelpResources "HelpResources" -#endif /* WSM */ #define WmCIconImage "IconImage" #define WmCIconImageBackground "IconImageBackground" #define WmCIconImageBottomShadowColor "IconImageBottomShadowColor" @@ -403,9 +333,7 @@ #define WmCIconImageTopShadowColor "IconImageTopShadowColor" #define WmCIconImageTopShadowPixmap "IconImageTopShadowPixmap" #define WmCIgnoreWMSaveHints "IgnoreWMSaveHints" -#ifdef WSM #define WmCInitialWorkspace "InitialWorkspace" -#endif /* WSM */ #define WmCMatteBackground "MatteBackground" #define WmCMatteBottomShadowColor "MatteBottomShadowColor" #define WmCMatteBottomShadowPixmap "MatteBottomShadowPixmap" @@ -426,22 +354,18 @@ #define WmCMenu "Menu" #define WmCTitle "Title" #define WmCDefaults "Defaults" -#ifdef WSM #define WmCBackdrop "Backdrop" #define WmCColorSetId "ColorSetId" #define WmCFrontPanel "FrontPanel" #define WmCWorkspaceController "WorkspaceController" #define WmCWorkspacePresence "WorkspacePresence" #define WmCWorkspaceSwitch "WorkspaceSwitch" -#endif /* WSM */ /* window manager client resource names: */ #define WmCIconBox "Iconbox" #define WmCConfirmbox "Confirmbox" -#ifdef WSM #define WmCSwitcher "Switcher" -#endif /* WSM */ @@ -455,9 +379,7 @@ * *************************************<->***********************************/ -#ifdef WSM #define WmRAbsentMapBehavior "WmAMBehavior" -#endif /* WSM */ #define WmRCFocusPolicy "WmCFocus" #define WmRClientDecor "WmCDecor" #define WmRClientFunction "WmCFunc" @@ -507,6 +429,5 @@ #define WmCHelpDirectory "HelpDirectory" -#ifdef WSM /************************** eof ************************/ -#endif /* WSM */ + diff --git a/cde/programs/dtwm/WmResParse.c b/cde/programs/dtwm/WmResParse.c index 8fea3591..eed207a1 100644 --- a/cde/programs/dtwm/WmResParse.c +++ b/cde/programs/dtwm/WmResParse.c @@ -44,11 +44,9 @@ #include "WmGlobal.h" #include "WmResNames.h" -#ifdef WSM #include
#include
#include -#endif /* WSM */ #include "WmParse.h" #include "WmParseP.h" #include "WmPanelP.h" @@ -78,9 +76,7 @@ #else #include /* for XmeGetHomeDirName */ #endif -#ifdef WSM #include -#endif /* WSM */ /* maximum string lengths */ @@ -96,19 +92,17 @@ #define MBBSIZ 4096 -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD, mSpec) #else # define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD) -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* * include extern functions */ #include "WmResParse.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ #include "WmError.h" #include "WmFunction.h" #include "WmImage.h" @@ -129,7 +123,6 @@ extern int errno; * Global Variables And Tables: */ static char cfileName[MAXWMPATH+1]; -#ifdef WSM #ifndef NO_MESSAGE_CATALOG char * pWarningStringFile; char * pWarningStringLine; @@ -141,12 +134,6 @@ char pWarningStringLine[] = "%s: %s on line %d of specification string\n"; #define parseP (wmGD.pWmPB->pchNext) #define line (wmGD.pWmPB->pchLine) #define linec (wmGD.pWmPB->lineNumber) -#else /* WSM */ -static FILE *cfileP = NULL; /* fopen'ed configuration file or NULL */ -static unsigned char line[MAXLINE+1]; /* line buffer */ -static int linec = 0; /* line counter for parser */ -static unsigned char *parseP = NULL; /* pointer to parse string */ -#endif /* WSM */ typedef struct { @@ -181,7 +168,7 @@ typedef struct { Boolean fClick; } EventTableEntry; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) # define CCI_USE_DEFAULT_NAME_TAG "DEFAULT_NAME" @@ -209,15 +196,13 @@ typedef struct _CCIFuncArg { CCIEntryModifier mod; String cciEntry; } CCIFuncArg; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ #ifdef MOTIF_ONE_DOT_ONE void GetHomeDirName(String fileName); #endif -#ifdef WSM static String GetNetworkFileName (char *pchFile); -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) static MenuItem *MakeSeparatorTemplate (int); static void ParseMenuItemName (unsigned char **linePP, MenuItem *menuItem); static Boolean ParseClientCommand (unsigned char **linePP, MenuSpec *menuSpec, @@ -227,15 +212,15 @@ static void FixMenuItem (MenuSpec *menuSpec, MenuItem *menuItem); static Boolean GetCCIModifier (String modString, CCIEntryModifier *mod); static Boolean ParseWmFuncCCIArgs (unsigned char **linePP, WmFunction wmFunction, String *pArgs); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ FILE *FopenConfigFile (void); void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec); static void ParseMenuSet (WmScreenData *pSD, unsigned char *lineP); MenuItem *ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr); static MenuItem *ParseMenuItems (WmScreenData *pSD -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) , MenuSpec *menuSpec -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ ); static Boolean ParseWmLabel (WmScreenData *pSD, MenuItem *menuItem, unsigned char *string); @@ -374,25 +359,23 @@ typedef struct { */ FunctionTableEntry functionTable[] = { -#ifdef WSM {"f.action", 0, CRS_ANY, 0, F_Action, ParseWmFuncActionArg}, -#endif /* WSM */ {"f.beep", 0, CRS_ANY, 0, F_Beep, ParseWmFuncNoArg}, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) {"f.cci", 0, CRS_ANY, 0, F_Nop, ParseWmFuncCCIArgs}, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ {"f.circle_down", F_SUBCONTEXT_IB_IICON|F_SUBCONTEXT_IB_WICON, CRS_ANY, 0, @@ -403,7 +386,6 @@ FunctionTableEntry functionTable[] = { 0, F_Circle_Up, ParseWmFuncGrpArg}, -#ifdef WSM {"f.create_workspace", 0, CRS_ANY, 0, @@ -414,7 +396,6 @@ FunctionTableEntry functionTable[] = { 0, F_DeleteWorkspace, ParseWmFuncNoArg}, -#endif /* WSM */ {"f.exec", 0, CRS_ANY, 0, @@ -430,14 +411,11 @@ FunctionTableEntry functionTable[] = { 0, F_Focus_Key, ParseWmFuncNoArg}, -#ifdef WSM {"f.goto_workspace", 0, CRS_ANY, 0, F_Goto_Workspace, ParseWmFuncStrArg}, -#endif /* WSM */ -#ifdef WSM {"f.help", 0, CRS_ANY, 0, @@ -448,14 +426,13 @@ FunctionTableEntry functionTable[] = { 0, F_Help_Mode, ParseWmFuncNoArg}, /* for now */ -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) {"f.invoke_command", 0, CRS_ANY, 0, F_InvokeCommand, ParseWmFuncStrArg}, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ {"f.kill", F_CONTEXT_ROOT, CRS_ANY, MWM_FUNC_CLOSE, @@ -466,14 +443,12 @@ FunctionTableEntry functionTable[] = { 0, F_Lower, ParseWmFuncMaybeStrArg}, -#ifdef WSM {"f.marquee_selection", F_CONTEXT_WINDOW|F_CONTEXT_ICON|F_SUBCONTEXT_IB_IICON, CRS_ANY, 0, F_Marquee_Selection, ParseWmFuncNoArg}, -#endif /* WSM */ {"f.maximize", F_CONTEXT_ROOT|F_CONTEXT_MAXIMIZE| F_SUBCONTEXT_IB_WICON, CRS_ANY, @@ -505,13 +480,11 @@ FunctionTableEntry functionTable[] = { 0, F_Next_Key, ParseWmFuncGrpArg}, -#ifdef WSM {"f.next_workspace", 0, CRS_ANY, 0, F_Next_Workspace, ParseWmFuncNoArg}, -#endif /* WSM */ {"f.nop", F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW| F_SUBCONTEXT_IB_WICON | F_SUBCONTEXT_IB_IICON, CRS_ANY, @@ -529,13 +502,11 @@ FunctionTableEntry functionTable[] = { 0, F_Normalize_And_Raise, ParseWmFuncMaybeStrArg}, -#ifdef WSM {"f.occupy_all", F_CONTEXT_ICONBOX|F_CONTEXT_ROOT, CRS_ANY, DtWM_FUNC_OCCUPY_WS, F_AddToAllWorkspaces, ParseWmFuncNoArg}, -#endif /* WSM */ {"f.pack_icons", 0, CRS_ANY, 0, @@ -546,13 +517,13 @@ FunctionTableEntry functionTable[] = { 0, F_Pass_Key, ParseWmFuncNoArg}, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) {"f.post_rmenu", 0, CRS_KEY, 0, F_Post_RMenu, ParseWmFuncNoArg}, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ {"f.post_wmenu", 0, CRS_BUTTON|CRS_KEY, 0, @@ -568,13 +539,11 @@ FunctionTableEntry functionTable[] = { 0, F_Prev_Key, ParseWmFuncGrpArg}, -#ifdef WSM {"f.prev_workspace", 0, CRS_ANY, 0, F_Prev_Workspace, ParseWmFuncNoArg}, -#endif /* WSM */ {"f.quit_mwm", F_CONTEXT_ICON|F_CONTEXT_WINDOW, CRS_ANY, 0, @@ -601,32 +570,22 @@ FunctionTableEntry functionTable[] = { 0, F_Refresh_Win, ParseWmFuncNoArg}, -#ifdef WSM {"f.remove", F_CONTEXT_ROOT, CRS_ANY, DtWM_FUNC_OCCUPY_WS, F_Remove, ParseWmFuncNoArg}, -#endif /* WSM */ {"f.resize", F_CONTEXT_ICON|F_CONTEXT_ROOT| F_SUBCONTEXT_IB_IICON|F_SUBCONTEXT_IB_WICON, CRS_ANY, MWM_FUNC_RESIZE, F_Resize, ParseWmFuncNoArg}, -#ifdef WSM {"f.restart", F_CONTEXT_ICON|F_CONTEXT_WINDOW, CRS_ANY, 0, F_Restart, ParseWmFuncStrArg}, -#else /* WSM */ - {"f.restart", F_CONTEXT_ICON|F_CONTEXT_WINDOW, - CRS_ANY, - 0, - F_Restart, - ParseWmFuncNoArg}, -#endif /* WSM */ {"f.restore", F_CONTEXT_ROOT|F_CONTEXT_NORMAL|F_SUBCONTEXT_IB_WICON, CRS_ANY, 0, @@ -658,13 +617,11 @@ FunctionTableEntry functionTable[] = { 0, F_Set_Behavior, ParseWmFuncNoArg}, -#ifdef WSM {"f.set_context", 0, CRS_ANY, 0, F_Set_Context, ParseWmFuncNbrArg}, -#endif /* WSM */ {"f.title", 0, CRS_MENU, 0, @@ -681,7 +638,6 @@ FunctionTableEntry functionTable[] = { 0, F_Version, ParseWmFuncNoArg}, -#ifdef WSM #ifdef OLD {"f.workspace_presence",F_CONTEXT_ICON|F_CONTEXT_ROOT|F_CONTEXT_ICONBOX| @@ -693,8 +649,7 @@ FunctionTableEntry functionTable[] = { DtWM_FUNC_OCCUPY_WS, F_Workspace_Presence, ParseWmFuncNoArg}, -#endif /* WSM */ -#if defined(DEBUG) && defined(WSM) +#if defined(DEBUG) {"f.zz_debug", 0, CRS_ANY, 0, @@ -713,25 +668,13 @@ FunctionTableEntry functionTable[] = { /* * Be sure to update these define, whenever adding/deleting a function. */ -#ifdef WSM -# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) -# define F_CCI_INDEX 2 -# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#if (defined(MWM_QATS_PROTOCOL)) +# define F_CCI_INDEX 2 +#endif /* defined(MWM_QATS_PROTOCOL) */ int F_ACTION_INDEX; int F_EXEC_INDEX; int F_NOP_INDEX; -#else /* WSM */ -# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) -# define F_CCI_INDEX 1 -# define F_EXEC_INDEX 4 -# define F_NOP_INDEX 16 -# else -# define F_EXEC_INDEX 3 -# define F_NOP_INDEX 14 -# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ -#endif /* WSM */ -#ifdef WSM - + /******************************<->************************************* * * void GetFunctionTableValues (int *execIndex, int *nopIndex, @@ -1682,9 +1625,7 @@ unsigned int PeekAhead(unsigned char *currentChar, return(0); } } /* END OF FUNCTION PeekAhead */ - - -#endif /* WSM */ + @@ -1867,10 +1808,8 @@ void ProcessWmFile (WmScreenData *pSD, Boolean bNested) pSD->keySpecs = NULL; pSD->menuSpecs = NULL; -#ifdef WSM /**** hhhhhhhhhhhh ******/ GetFunctionTableValues (&F_EXEC_INDEX, &F_NOP_INDEX, &F_ACTION_INDEX); -#endif /* WSM */ /* * Find and parse the default system menu string, if it exists. */ @@ -2010,11 +1949,9 @@ static char *ExtractLocaleName(lang) return lang; } -#ifdef WSM #define RC_CONFIG_SUBDIR "/config/" #define RC_DEFAULT_CONFIG_SUBDIR "/config/C" -#endif /* WSM */ - + /*************************************<->************************************* * * FopenConfigFile () @@ -2192,7 +2129,6 @@ FILE *FopenConfigFile (void) strcpy (cfileName, homeDir); #endif -#ifdef WSM if (MwmBehavior) { /* @@ -2228,14 +2164,6 @@ FILE *FopenConfigFile (void) } strncat(cfileName, LANG_DT_WMRC, MAXWMPATH - strlen(cfileName)); } -#else /* WSM */ - if (LANG != NULL) - { - strncat(cfileName, "/", MAXWMPATH-strlen(cfileName)); - strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName)); - } - strncat(cfileName, HOME_MWMRC, MAXWMPATH - strlen(cfileName)); -#endif /* WSM */ if ((fileP = fopen (cfileName, "r")) != NULL) { if (LANG != NULL) { @@ -2253,7 +2181,6 @@ FILE *FopenConfigFile (void) #else strcpy (cfileName, homeDir); #endif -#ifdef WSM if (MwmBehavior) { /* @@ -2268,9 +2195,6 @@ FILE *FopenConfigFile (void) */ strncat(cfileName, HOME_DT_WMRC, MAXWMPATH - strlen(cfileName)); } -#else /* WSM */ - strncat(cfileName, HOME_MWMRC, MAXWMPATH - strlen(cfileName)); -#endif /* WSM */ if ((fileP = fopen (cfileName, "r")) != NULL) { if (LANG != NULL) { @@ -2318,7 +2242,6 @@ FILE *FopenConfigFile (void) #endif if (LANG != NULL) { -#ifdef WSM if (MwmBehavior) { strcpy(cfileName, LIBDIR); @@ -2333,15 +2256,6 @@ FILE *FopenConfigFile (void) strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName)); strncat(cfileName, SLASH_DT_WMRC, MAXWMPATH - strlen(cfileName)); } -#else /* WSM */ - /* - * Try /$LANG/system.mwmrc within the install tree - */ - strcpy(cfileName, LIBDIR); - strncat(cfileName, "/", MAXWMPATH-strlen(cfileName)); - strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName)); - strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName)); -#endif /* WSM */ if ((fileP = fopen (cfileName, "r")) != NULL) { XtFree(LANG); @@ -2351,7 +2265,6 @@ FILE *FopenConfigFile (void) if ((fileP == NULL) && !stackPushed) { -#ifdef WSM if (MwmBehavior) { strcpy(cfileName, LIBDIR); @@ -2366,21 +2279,6 @@ FILE *FopenConfigFile (void) strncat(cfileName, SLASH_DT_WMRC, MAXWMPATH - strlen(cfileName)); fileP = fopen (cfileName, "r"); } -#else /* WSM */ - /* - * Try /system.mwmrc within the install tree - */ - strcpy(cfileName, LIBDIR); - strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName)); - - if (LANG != NULL) - { - XtFree(LANG); - LANG = NULL; - } - strcpy(cfileName, cfileName); - fileP = fopen (cfileName, "r"); -#endif /* WSM */ } } @@ -2567,10 +2465,10 @@ static void ParseMenuSet (WmScreenData *pSD, unsigned char *lineP) menuSpec->menuItems = NULL; menuSpec->accelContext = 0; menuSpec->accelKeySpecs = NULL; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) menuSpec->exclusions = NULL; menuSpec->clientLocal = FALSE; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ menuSpec->nextMenuSpec = NULL; /* @@ -2722,9 +2620,9 @@ MenuItem *ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr) *************************************<->***********************************/ static MenuItem *ParseMenuItems (WmScreenData *pSD -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) , MenuSpec *menuSpec -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ ) { unsigned char *string; @@ -2733,9 +2631,9 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD MenuItem *lastMenuItem; MenuItem *menuItem; register int ix; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) Boolean use_separators = False; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* * Parse "label [mnemonic] [accelerator] function" or @@ -2769,12 +2667,12 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD menuItem->nextMenuItem = NULL; menuItem->wmFunction = (WmFunction)NULL; menuItem->wmFuncArgs = NULL; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) menuItem->clientCommandName = NULL; menuItem->clientCommandID = 0; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* * Is this a simple menu item label or is it a * client command specification. @@ -2801,7 +2699,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD else menuItem->wmFunction = F_InvokeCommand; } else /* It must be a menu item label */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ { /* * Parse the menu item label. @@ -2835,11 +2733,11 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD * but we do want to search for a menu item name that occupies * the same place as the function does for normal menu items. */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) if (menuItem->wmFunction != NULL) ParseMenuItemName(&lineP, menuItem); else -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ ix = ParseWmFunction (&lineP, CRS_MENU, &menuItem->wmFunction); /* @@ -2871,7 +2769,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD continue; /* skip this menu item */ } -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* * If we're working on the f.cci function, this will fix-up * the menuItem entries so that it appears that we read-in @@ -2910,7 +2808,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD else firstMenuItem = separator; lastMenuItem = separator; } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /* * Add this item to the menu specification. @@ -2926,7 +2824,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD } lastMenuItem = menuItem; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* If this menu item is supposed to be wrapped in separators * then create a separator template after the menu item */ @@ -2939,7 +2837,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD } use_separators = FALSE; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ } return (firstMenuItem); @@ -2948,7 +2846,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * StoreExclusion (menuSpec, string) @@ -3338,7 +3236,7 @@ static Boolean ParseClientCommand (unsigned char **linePP, MenuSpec *menuSpec, return(return_val); } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -3402,13 +3300,8 @@ static Boolean ParseWmLabel (WmScreenData *pSD, MenuItem *menuItem, */ { string++; /* skip "@" */ -#ifdef WSM if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD, (char *)string, True)) >= 0) -#else /* WSM */ - if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD, - (char *)string)) >= 0) -#endif /* WSM */ { menuItem->labelType = XmPIXMAP; } @@ -3560,10 +3453,10 @@ static Boolean ParseWmAccelerator (unsigned char **linePP, MenuItem *menuItem) if ((*lineP != '\0') && /* something follows */ (*lineP != '!') && /* skip if we have the ! WmFunction */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* skip label name for client command */ ((*lineP != '"') || (menuItem->wmFunction != F_InvokeCommand)) && -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ (*lineP != 'f') && (*(lineP+1) != '.')) /* skip if we have f.xxx WmFunction */ { @@ -3601,7 +3494,7 @@ static Boolean ParseWmAccelerator (unsigned char **linePP, MenuItem *menuItem) } /* END OF FUNCTION ParseWmAccelerator */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * ParseMenuItemName (linePP, menuItem) @@ -3680,7 +3573,7 @@ static void ParseMenuItemName (unsigned char **linePP, MenuItem *menuItem) *linePP = lineP; } } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -4245,7 +4138,7 @@ static Boolean ParseWmFuncNbrArg (unsigned char **linePP, } /* END OF FUNCTION ParseWmFuncNbrArg */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * ParseWmFuncCCIArgs (linePP, wmFunction, pArgs) @@ -4346,7 +4239,7 @@ static Boolean ParseWmFuncCCIArgs (unsigned char **linePP, return(TRUE); } /* END OF FUNCTION ParseWmFuncCCIArgs */ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -4726,12 +4619,10 @@ static Boolean ParseContext (unsigned char **linePP, Context *context, *context |= F_CONTEXT_WINDOW; *subContext |= F_SUBCONTEXT_W_APP; } -#ifdef WSM else if (!strcmp ("ifkey", (char *)ctxStr)) { *context |= F_CONTEXT_IFKEY; } -#endif /* WSM */ else /* Unknown context name */ { @@ -4853,9 +4744,7 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP) KeySpec *lastKeySpec; unsigned int eventType; int ix; -#ifdef WSM Boolean bBadKey; -#endif /* WSM */ /* * Parse the key set bindings from the configuration file. @@ -4946,21 +4835,13 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP) /* * Parse the key specification. */ -#ifdef WSM bBadKey = False; -#endif /* WSM */ if (!ParseKeyEvent(&lineP, &eventType, &keySpec->keycode, &keySpec->state)) { -#ifdef WSM bBadKey = True; -#else /* WSM */ - PWarning (((char *)GETMESSAGE(60, 27, "Invalid key specification"))); - XtFree ((char *)keySpec); - continue; /* skip this key specification */ -#endif /* WSM */ } /* @@ -4971,15 +4852,12 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP) if (!ParseContext(&lineP, &keySpec->context, &keySpec->subContext)) { -#ifdef WSM if (bBadKey) PWarning (((char *)GETMESSAGE(60, 27, "Invalid key specification"))); -#endif /* WSM */ PWarning (((char *)GETMESSAGE(60, 28, "Invalid key context"))); XtFree ((char *)keySpec); continue; /* skip this key specification */ } -#ifdef WSM if (bBadKey) { /* @@ -4997,7 +4875,6 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP) * rest of the program doesn't see it. */ keySpec->context &= ~F_CONTEXT_IFKEY; -#endif /* WSM */ /* @@ -5048,151 +4925,6 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP) } /* END OF FUNCTION ParseKeySet */ -#ifndef WSM - -/*************************************<->************************************* - * - * GetNextLine () - * - * - * Description: - * ----------- - * Returns the next line from an fopened configuration file or a newline- - * embedded configuration string. - * - * - * Inputs: - * ------ - * cfileP = (global) file pointer to fopened configuration file or NULL - * line = (global) line buffer - * linec = (global) line count - * parseP = (global) parse string pointer if cfileP == NULL - * - * - * Outputs: - * ------- - * line = (global) next line - * linec = (global) line count incremented - * parseP = (global) parse string pointer incremented - * Return = line or NULL if file or string is exhausted. - * - * - * Comments: - * -------- - * If there are more than MAXLINE characters on a line in the file cfileP the - * excess are truncated. - * Assumes the line buffer is long enough for any parse string line. - * - *************************************<->***********************************/ - -unsigned char * -GetNextLine (void) -{ - register unsigned char *string; - int len; - -#ifndef NO_MULTIBYTE - int chlen; - wchar_t last; - wchar_t wdelim; - char delim; - int lastlen; -#endif - - if (cfileP != NULL) - /* read fopened file */ - { - if ((string = (unsigned char *) - fgets ((char *)line, MAXLINE, cfileP)) != NULL) - { -#ifndef NO_MULTIBYTE - - lastlen = 0; - while (*string && - ((len = mblen((char *)string, MB_CUR_MAX)) > 0)) - { - mbtowc(&last, (char *)string, MB_CUR_MAX); - lastlen = len; - string += len; - } - delim = '\\'; - mbtowc(&wdelim, &delim, MB_CUR_MAX); - if (lastlen == 1 && last == wdelim) - { - do - { - if (!fgets((char *)string, MAXLINE - (string - line), cfileP)) - break; - - lastlen = 0; - while (*string && - ((len = mblen((char *)string, MB_CUR_MAX)) > 0)) - { - mbtowc(&last, (char *)string, MB_CUR_MAX); - lastlen = len; - string += len; - } - linec++; - } - while (lastlen == 1 && last == wdelim); - } - string = line; -#else - len = strlen((char *)string) - 2; - if ((len > 0) && string[len] == '\\') - { - do { - string = &string[len]; - if (fgets((char *)string, - MAXLINE - (string-line), cfileP) == NULL) - break; - len = strlen((char *)string) - 2; - linec++; - } while ((len >= 0) && string[len] == '\\'); - string = line; - } -#endif - } - } - else if ((parseP != NULL) && (*parseP != '\0')) - /* read parse string */ - { - string = line; -#ifndef NO_MULTIBYTE - while ((*parseP != '\0') && - ((chlen = mblen ((char *)parseP, MB_CUR_MAX)) > 0) && - (*parseP != '\n')) - /* copy all but NULL and newlines to line buffer */ - { - while (chlen--) - { - *(string++) = *(parseP++); - } - } -#else - while ((*parseP != '\0') && (*parseP != '\n')) - /* copy all but end-of-line and newlines to line buffer */ - { - *(string++) = *(parseP++); - } -#endif - *string = '\0'; - if (*parseP == '\n') - { - parseP++; - } - } - else - { - string = NULL; - } - - linec++; - return (string); - -} /* END OF FUNCTION GetNextLine */ -#endif /* WSM */ - /*************************************<->************************************* * @@ -5548,7 +5280,7 @@ static Boolean LookupModifier (unsigned char *name, unsigned int *valueP) } /* END OF FUNCTION LookupModifier */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * GetCCIModifier (modString, mod) @@ -5691,7 +5423,7 @@ static void FixMenuItem (MenuSpec *menuSpec, MenuItem *menuItem) break; } } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -6093,103 +5825,7 @@ void ScanAlphanumeric (unsigned char **linePP) } /* END OF FUNCTION ScanAlphanumeric */ -#ifndef WSM - -/*************************************<->************************************* - * - * ScanWhitespace(linePP) - * - * - * Description: - * ----------- - * Scan the string, skipping over all white space characters. - * - * - * Inputs: - * ------ - * linePP = nonNULL pointer to current line buffer pointer - * - * - * Outputs: - * ------- - * linePP = nonNULL pointer to revised line buffer pointer - * - * - * Comments: - * -------- - * Assumes linePP is nonNULL - * - *************************************<->***********************************/ - -void ScanWhitespace(unsigned char **linePP) -{ -#ifndef NO_MULTIBYTE - while (*linePP && (mblen ((char *)*linePP, MB_CUR_MAX) == 1) && isspace (**linePP)) -#else - while (*linePP && isspace (**linePP)) -#endif - { - (*linePP)++; - } - -} /* END OF FUNCTION ScanWhitespace */ -#endif /* not WSM */ - -#ifndef WSM - -/*************************************<->************************************* - * - * ToLower (string) - * - * - * Description: - * ----------- - * Lower all characters in a string. - * - * - * Inputs: - * ------ - * string = NULL-terminated character string or NULL - * - * - * Outputs: - * ------- - * string = NULL-terminated lower case character string or NULL - * - * - * Comments: - * -------- - * None. - * - *************************************<->***********************************/ - -void ToLower (char *string) -{ - char *pch = string; -#ifndef NO_MULTIBYTE - int chlen; - - while (*pch && ((chlen = mblen (pch, MB_CUR_MAX)) > 0)) - { - if ((chlen == 1) && (isupper (*pch))) - { - *pch = tolower(*pch); - } - pch += chlen; - } -#else - while (*pch != '\0') - { - if (isupper (*pch)) - { - *pch = tolower(*pch); - } - pch++; - } -#endif -} /* END OF FUNCTION ToLower */ -#endif /* WSM */ /*************************************<->************************************* @@ -6214,7 +5850,6 @@ void PWarning (char *message) { -#ifdef WSM char pch[MAXWMPATH+1]; String sMessage; char *pchFile; @@ -6243,25 +5878,10 @@ PWarning (char *message) } _DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL); XtFree (sMessage); -#else /* WSM */ - if (cfileP != NULL) - { - fprintf (stderr, ((char *)GETMESSAGE(60, 33, "%s: %s on line %d of configuration file %s\n")), - wmGD.mwmName, message, linec, - wmGD.configFile ? wmGD.configFile : cfileName); - } - else - { - fprintf (stderr, ((char *)GETMESSAGE(60, 34, "%s: %s on line %d of specification string\n")), - wmGD.mwmName, message, linec); - } - fflush (stderr); -#endif /* WSM */ } /* END OF FUNCTION PWarning */ -#ifdef WSM /* * Key substitution table entry */ @@ -6414,8 +6034,7 @@ static void InitKeySubs ( *pNumKeySubs = numKS; } -#endif /* WSM */ - + /*************************************<->************************************* * * ProcessAccelText (startP, endP, destP) @@ -6449,7 +6068,6 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP, #ifndef NO_MULTIBYTE int chlen; #endif -#ifdef WSM static Boolean bAccelInit = False; static KeySub *pKeySub; static int numKeySubs; @@ -6463,7 +6081,6 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP, InitKeySubs (&pKeySub, &numKeySubs); bAccelInit = True; } -#endif /* WSM */ /* * Copy modifiers @@ -6477,9 +6094,7 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP, { *destP++ = *startP++; } -#ifdef WSM pchFirst = startP; -#endif /* WSM */ #ifndef NO_MULTIBYTE while (*startP && @@ -6488,25 +6103,15 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP, { while (chlen--) { -#ifdef WSM startP++; - -#else /* WSM */ - *destP++ = *startP++; -#endif /* WSM */ } } #else while (isalnum (*startP)) { -#ifdef WSM startP++; -#else /* WSM */ - *destP++ = *startP++; -#endif /* WSM */ } #endif -#ifdef WSM /* find substitution */ pchSub = NULL; lenSub = 0; @@ -6534,7 +6139,6 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP, memcpy (destP, pchFirst, startP-pchFirst); destP += startP-pchFirst; } -#endif /* WSM */ *destP++ = '+'; ScanWhitespace (&startP); @@ -7467,8 +7071,6 @@ Boolean ParseWmFuncActionArg (unsigned char **linePP, } /* END OF FUNCTION ParseWmFuncActionArg */ -#ifdef WSM - /*************************************<->************************************* * * PreprocessConfigFile (pSD) @@ -7706,10 +7308,8 @@ GetNetworkFileName (char *pchFile) return (sReturn); } /**************************** eof ***************************/ -#endif /* WSM */ - -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * SetGreyedContextAndMgtMask (menuItem, wmFunction) @@ -7804,4 +7404,4 @@ MenuItem *MakeSeparatorTemplate (int position) return(item); } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ diff --git a/cde/programs/dtwm/WmResParse.h b/cde/programs/dtwm/WmResParse.h index fd5e8385..eda77ee1 100644 --- a/cde/programs/dtwm/WmResParse.h +++ b/cde/programs/dtwm/WmResParse.h @@ -36,7 +36,6 @@ extern void ProcessWmFile (WmScreenData *pSD, Boolean bNested); extern void ProcessCommandLine (int argc, char *argv[]); extern void ProcessMotifBindings (void); -#ifdef WSM extern Boolean FindDtSessionMatch(int commandArgc, char **commandArgv, ClientData *pCD, @@ -53,18 +52,10 @@ extern void GetFunctionTableValues (int *execIndex, int *nopIndex, extern void GetNopIndex (int tableSize, int *nopIndex); extern void GetExecIndex (int tableSize, int *execIndex); extern Boolean GetSessionHintsInfo (WmScreenData *pSD, long numItems); -#endif /* WSM */ extern FILE * FopenConfigFile (void); extern void FreeMenuItem (MenuItem *menuItem); -#ifndef WSM -extern unsigned char * GetNextLine (void); -#endif /* not WSM */ -#ifdef WSM extern unsigned char * GetStringC (unsigned char **linePP, Boolean SmBehavior); extern void SystemCmd (char *pchCmd); -#else /* WSM */ -extern unsigned char * GetString (unsigned char **linePP); -#endif /* WSM */ extern Boolean ParseBtnEvent (unsigned char **linePP, unsigned int *eventType, unsigned int *button, @@ -76,7 +67,6 @@ extern void ParseKeyStr (WmScreenData *pSD, unsigned char *keyStr); extern Boolean ParseKeyEvent (unsigned char **linePP, unsigned int *eventType, KeyCode *keyCode, unsigned int *state); extern MenuItem * ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr); -#ifdef WSM extern void ParseSessionClientState (WmScreenData *pSD, int count, unsigned char *string); extern void ParseSessionCommand (WmScreenData *pSD, int count, @@ -89,14 +79,10 @@ extern void ParseSessionWorkspaces (WmScreenData *pSD, int count, extern void ParseSessionHost (WmScreenData *pSD, int count, unsigned char *string); extern void ParseDtSessionHints (WmScreenData *pSD, unsigned char *property); -#endif /* WSM */ extern int ParseWmFunction (unsigned char **linePP, unsigned int res_spec, WmFunction *pWmFunction); extern void PWarning (char *message); extern void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec); extern void ScanAlphanumeric (unsigned char **linePP); -#ifndef WSM -extern void ScanWhitespace(unsigned char **linePP); -#endif /* not WSM */ extern void ToLower (unsigned char *string); extern void SyncModifierStrings(void); extern void DeleteTempConfigFileIfAny (void); @@ -113,17 +99,15 @@ extern Boolean ParseWmFuncStrArg (unsigned char **linePP, WmFunction wmFunction, String *pArgs); extern Boolean ParseWmFuncActionArg (unsigned char **linePP, WmFunction wmFunction, String *pArgs); -#ifdef WSM #define ToLower(s) (_DtWmParseToLower (s)) #define GetNextLine() (_DtWmParseNextLine (wmGD.pWmPB)) #define GetSmartSMString(s) (_DtWmParseNextTokenC (s, True)) #define GetSmartString(s) (_DtWmParseNextTokenC (s, False)) #define GetString(s) (_DtWmParseNextTokenC (s, False)) #define ScanWhitespace(s) (_DtWmParseSkipWhitespaceC (s)) -#endif /* WSM */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) extern Boolean IsClientCommand (String); extern Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem, WmFunction wmFunction); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ diff --git a/cde/programs/dtwm/WmResource.c b/cde/programs/dtwm/WmResource.c index cc724634..422218d5 100644 --- a/cde/programs/dtwm/WmResource.c +++ b/cde/programs/dtwm/WmResource.c @@ -60,13 +60,11 @@ #include "WmGraphics.h" #include "WmMenu.h" #include "WmResParse.h" -#ifdef WSM #include "WmBackdrop.h" #include "WmIconBox.h" #include "WmWrkspace.h" #include
#define cfileP (wmGD.pWmPB->pFile) /* fopen'ed configuration file or NULL */ -#endif /* WSM */ #include "WmXSMP.h" /* @@ -113,10 +111,7 @@ void ProcessClientResources (ClientData *pCD); void SetStdClientResourceValues (ClientData *pCD); void SetStdScreenResourceValues (WmScreenData *pSD); GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap); -#ifdef WSM static void WriteOutXrmColors (WmScreenData *pSD); -#endif /* WSM */ -#ifdef WSM void ProcessPresenceResources (WmScreenData *pSD); void ProcessDefaultBackdropImages (WmScreenData *pSD); void _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value); @@ -125,7 +120,6 @@ void _WmBackdropColorSetDefault (Widget widget, int offset, XrmValue *value); void _WmIconImageMaximumDefault (Widget widget, int offset, XrmValue *value); void _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value); int DefaultWsColorSetId (WmWorkspaceData *pWS); -#endif /* WSM */ void _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pixel newBackground, XrmValue *value); Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2); @@ -163,7 +157,7 @@ char builtinSystemMenuName[] = "_MwmWindowMenu_"; char builtinSystemMenu[] = BUILTINSYSTEMMENU; #else /* !defined(NO_MESSAGE_CATALOG)*/ char *builtinSystemMenu = BUILTINSYSTEMMENU; -#ifdef WSM + #define DEFAULT_DTWM_SYSTEMMENU "_MwmWindowMenu_\n\ {\n\ Restore _R f.restore\n\ @@ -179,7 +173,6 @@ char *builtinSystemMenu = BUILTINSYSTEMMENU; no-label f.separator\n\ Close _C AltF4 f.kill\n\ }" -#endif /* WSM */ void InitBuiltinSystemMenu(void) { @@ -190,11 +183,9 @@ void InitBuiltinSystemMenu(void) char *MinString = NULL; char *MaxString = NULL; char *LowString = NULL; -#ifdef WSM char *OcpString = NULL; char *OcaString = NULL; char *RemString = NULL; -#endif /* WSM */ char *CloString = NULL; char dsm[2048]; char dsmtemp[sizeof(dsm)]; @@ -308,7 +299,7 @@ void InitBuiltinSystemMenu(void) strcpy(LowString, tmpString); } } -#ifdef WSM + if (DtwmBehavior) { if(gotItAll) @@ -357,7 +348,7 @@ void InitBuiltinSystemMenu(void) } } } /* if DTWM */ -#endif /* WSM */ + if(gotItAll) { tmpString = ((char *)GETMESSAGE(62, 48, "Close _C AltF4 f.kill")); @@ -375,7 +366,6 @@ void InitBuiltinSystemMenu(void) if (!gotItAll) { -#ifdef WSM if (DtwmBehavior) { builtinSystemMenu = (char *) @@ -386,10 +376,6 @@ void InitBuiltinSystemMenu(void) builtinSystemMenu = (char *) XtNewString((String)BUILTINSYSTEMMENU); } -#else /* WSM */ - builtinSystemMenu = (char *) - XtNewString((String)BUILTINSYSTEMMENU); -#endif /* WSM */ } else { @@ -397,14 +383,12 @@ void InitBuiltinSystemMenu(void) snprintf(dsm, sizeof(dsm), "%s\n{\n%s\n%s\n%s\n%s\n%s\n%s\n no-label f.separator\n", defaultSystemMenuName, ResString, MovString, SizString, MinString, MaxString, LowString); -#ifdef WSM if (DtwmBehavior) { snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n%s\n%s\n no-label f.separator\n", dsm, OcpString, OcaString, RemString); strcpy(dsm, dsmtemp); } -#endif /* WSM */ snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n}", dsm, CloString); strcpy(dsm, dsmtemp); @@ -412,7 +396,6 @@ void InitBuiltinSystemMenu(void) (char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL) { Warning (((char *)GETMESSAGE(62, 21, "Insufficient memory for localized default system menu"))); -#ifdef WSM if (DtwmBehavior) { builtinSystemMenu = (char *) @@ -423,10 +406,6 @@ void InitBuiltinSystemMenu(void) builtinSystemMenu = (char *) XtNewString((String)BUILTINSYSTEMMENU); } -#else /* WSM */ - builtinSystemMenu = (char *) - XtNewString((String)BUILTINSYSTEMMENU); -#endif /* WSM */ } else { @@ -446,14 +425,12 @@ void InitBuiltinSystemMenu(void) XtFree(MaxString); if (LowString != NULL) XtFree(LowString); -#ifdef WSM if (OcpString != NULL) XtFree(OcpString); if (OcaString != NULL) XtFree(OcaString); if (RemString != NULL) XtFree(RemString); -#endif /* WSM */ if (CloString != NULL) XtFree(CloString); @@ -463,9 +440,7 @@ void InitBuiltinSystemMenu(void) char builtinSystemMenu[]; #endif /* MCCABE */ -#ifdef WSM #define HARD_CODED_PRIMARY 3 -#endif /* WSM */ char defaultRootMenuName[] = "DefaultRootMenu"; char builtinRootMenuName[] = "_MwmRootMenu_"; #ifndef MCCABE @@ -537,7 +512,7 @@ char behaviorKeyBindings[]; char defaultButtonBindingsName[] = "DefaultButtonBindings"; char builtinButtonBindingsName[] = "_MwmButtonBindings_"; #ifndef MCCABE -# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +# if (defined(MWM_QATS_PROTOCOL)) # define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\ {\n\ icon|frame f.raise\n\ @@ -551,7 +526,7 @@ char builtinButtonBindingsName[] = "_MwmButtonBindings_"; icon|frame f.post_wmenu\n\ root f.menu DefaultRootMenu\n\ }"; -# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +# endif /* defined(MWM_QATS_PROTOCOL) */ char builtinButtonBindings[] = BUILTINBUTTONBINDINGS #else @@ -563,10 +538,8 @@ static ClientData *_pCD; static String _defaultBackground; static String _defaultActiveBackground; static AppearanceData *_pAppearanceData; -#ifdef WSM static WmWorkspaceData *pResWS; static WmScreenData *pResSD; -#endif /* WSM */ static char _defaultColor1HEX[] = "#A8A8A8A8A8A8"; static char _defaultColor2HEX[] = "#5F5F92929E9E"; @@ -579,14 +552,12 @@ Const char _foreground[] = "foreground"; Const char _75_foreground[] = "75_foreground"; Const char _50_foreground[] = "50_foreground"; Const char _25_foreground[] = "25_foreground"; -#ifdef WSM Const char *_Dither = XmCO_DITHER; Const char *_NoDither = XmCO_NO_DITHER; Const char CLIENT_FRAME_PART[] = "client"; Const char ICON_FRAME_PART[] = "icon"; Const char FEEDBACK_FRAME_PART[] = "feedback"; Const char MENU_ITEM_PART[] = "menu"; -#endif /* WSM */ #define WmBGC XmBACKGROUND #define WmFGC XmFOREGROUND @@ -696,7 +667,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)NULL }, -#ifdef WSM { WmNcppCommand, @@ -707,7 +677,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)NULL }, -#endif /* WSM */ { WmNdeiconifyKeyFocus, @@ -748,7 +717,7 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)True }, -#ifdef WSM + { WmNframeExternalShadowWidth, WmCFrameExternalShadowWidth, @@ -758,7 +727,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)2 }, -#endif /* WSM */ { WmNfreezeOnConfig, @@ -769,7 +737,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)True }, -#ifdef WSM { WmNuseWindowOutline, @@ -780,7 +747,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)False }, -#endif /* WSM */ { WmNiconAutoPlace, @@ -791,7 +757,7 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)True }, -#ifdef WSM + { WmNiconExternalShadowWidth, WmCIconExternalShadowWidth, @@ -801,7 +767,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)2 }, -#endif /* WSM */ { WmNiconClick, @@ -846,7 +811,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)True }, -#ifdef WSM { WmNmarqueeSelectGranularity, @@ -857,7 +821,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)0 }, -#endif /* WSM */ { WmNmoveThreshold, @@ -928,7 +891,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)False }, -#ifdef WSM { WmNrefreshByClearing, @@ -949,19 +911,6 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)True }, -#endif /* WSM */ - -#ifndef WSM - { - WmNsessionClientDB, - WmCSessionClientDB, - XtRString, - sizeof(String), - XtOffsetOf(WmGlobalData, sessionClientDB), - XtRImmediate, - (XtPointer)NULL - }, -#endif /* ! WSM */ { WmNshowFeedback, @@ -1011,7 +960,7 @@ XtResource wmGlobalResources[] = XtRImmediate, (XtPointer)True }, -#ifdef WSM + { WmNhelpDirectory, WmCHelpDirectory, @@ -1022,7 +971,6 @@ XtResource wmGlobalResources[] = (XtPointer)"DT/Dtwm/" }, -#endif /* WSM */ { WmNdtLite, WmCDtLite, @@ -1048,11 +996,7 @@ XtResource wmGlobalScreenResources[] = sizeof (Boolean), XtOffsetOf(WmGlobalData, multiScreen), XtRImmediate, -#ifdef WSM (XtPointer)True -#else /* WSM */ - (XtPointer)False -#endif /* WSM */ }, { @@ -1064,7 +1008,7 @@ XtResource wmGlobalScreenResources[] = XtRImmediate, (XtPointer)NULL }, -#ifdef WSM + { WmNbackdropDirectories, WmCBackdropDirectories, XmRString, @@ -1073,7 +1017,6 @@ XtResource wmGlobalScreenResources[] = XmRString, DEFAULT_BACKDROP_DIR }, -#endif /* WSM */ }; @@ -1257,7 +1200,6 @@ XtResource wmScreenResources[] = (XtPointer)USE_ICON_DEFAULT_APPEARANCE }, -#ifdef WSM { WmNiconImageMaximum, WmCIconImageMaximum, @@ -1267,17 +1209,6 @@ XtResource wmScreenResources[] = XtRCallProc, (XtPointer) _WmIconImageMaximumDefault }, -#else /* WSM */ - { - WmNiconImageMaximum, - WmCIconImageMaximum, - WmRSize, - sizeof (WHSize), - XtOffsetOf (WmScreenData, iconImageMaximum), - XtRString, - "50x50" - }, -#endif /* WSM */ { WmNiconImageMinimum, @@ -1328,18 +1259,6 @@ XtResource wmScreenResources[] = XtRImmediate, (XtPointer) BIGSIZE }, -#ifndef WSM - - { - WmNiconBoxGeometry, - WmCIconBoxGeometry, - XtRString, - sizeof (String), - XtOffsetOf (WmScreenData, iconBoxGeometry), - XtRString, - (XtPointer)NULL - }, -#endif /* WSM */ { WmNiconBoxName, @@ -1421,7 +1340,7 @@ XtResource wmScreenResources[] = (XtPointer)True }, -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) { WmNrootMenu, WmCRootMenu, @@ -1431,7 +1350,7 @@ XtResource wmScreenResources[] = XtRString, (XtPointer)builtinRootMenuName }, -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ { WmNtransientDecoration, @@ -1492,7 +1411,6 @@ XtResource wmScreenResources[] = XtRImmediate, (XtPointer)False -#ifdef WSM }, { @@ -1533,7 +1451,6 @@ XtResource wmScreenResources[] = XtOffsetOf (WmScreenData, numWorkspaces), XtRImmediate, (XtPointer)0 -#endif /* WSM */ } }; @@ -1567,7 +1484,6 @@ XtResource wmStdScreenResources[] = (XtPointer) BIGSIZE }, -#ifdef WSM { WmNiconImageMaximum, WmCIconImageMaximum, @@ -1577,17 +1493,6 @@ XtResource wmStdScreenResources[] = XtRCallProc, (XtPointer) _WmIconImageMaximumDefault }, -#else /* WSM */ - { - WmNiconImageMaximum, - WmCIconImageMaximum, - WmRSize, - sizeof (WHSize), - XtOffsetOf (WmScreenData, iconImageMaximum), - XtRString, - "50x50" - }, -#endif /* WSM */ { WmNiconImageMinimum, @@ -1646,7 +1551,6 @@ XtResource wmStdScreenResources[] = * "Mwm*[screen<#>*]*". * ******************************<->***********************************/ -#ifdef WSM XtResource wmWorkspaceResources[] = { { @@ -1670,9 +1574,6 @@ XtResource wmWorkspaceResources[] = } }; -#else /* WSM */ -XtResource *wmWorkspaceResources = NULL; -#endif /* WSM */ @@ -1692,7 +1593,6 @@ XtResource *wmWorkspaceResources = NULL; * *************************************<->***********************************/ -#ifdef WSM XtResource wmStdWorkspaceResources[] = { { @@ -1705,12 +1605,8 @@ XtResource wmStdWorkspaceResources[] = (XtPointer)NULL } }; -#else /* WSM */ -XtResource *wmStdWorkspaceResources = NULL; -#endif /* WSM */ -#ifdef WSM - + /*************************************<->************************************* * * wmBackdropResources @@ -1803,9 +1699,7 @@ XtResource wmWsPresenceResources[] = (XtPointer)NULL } }; -#endif /* WSM */ - /*************************************<->************************************* * * wmClientResources @@ -1824,7 +1718,6 @@ XtResource wmWsPresenceResources[] = XtResource wmClientResources[] = { -#ifdef WSM { WmNabsentMapBehavior, WmCAbsentMapBehavior, @@ -1834,7 +1727,7 @@ XtResource wmClientResources[] = XtRImmediate, (XtPointer)(AMAP_BEHAVIOR_ADD) }, -#endif /* WSM */ + { WmNclientDecoration, WmCClientDecoration, @@ -1964,7 +1857,6 @@ XtResource wmClientResources[] = XtRString, "0x0" }, -#ifdef WSM { WmNsecondariesOnTop, @@ -1975,7 +1867,6 @@ XtResource wmClientResources[] = XtRCallProc, (XtPointer)_WmSecondariesOnTopDefault }, -#endif /* WSM */ { WmNsystemMenu, @@ -1994,11 +1885,7 @@ XtResource wmClientResources[] = sizeof (Boolean), XtOffsetOf (ClientData, useClientIcon), XtRImmediate, -#ifdef WSM (XtPointer)True -#else - (XtPointer)False -#endif /* WSM */ }, { @@ -2123,7 +2010,7 @@ XtResource wmStdClientResources[] = XtRString, "0x0" }, -#ifdef WSM + { WmNsecondariesOnTop, WmCSecondariesOnTop, @@ -2133,7 +2020,6 @@ XtResource wmStdClientResources[] = XtRCallProc, (XtPointer)_WmSecondariesOnTopDefault }, -#endif /* WSM */ { WmNuseClientIcon, @@ -2781,7 +2667,6 @@ _WmATopShadowPixmapDefault (Widget widget, int offset, XrmValue *value) } /* END OF FUNCTION _WmATopShadowPixmapDefault */ -#ifdef WSM void _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value) { @@ -2975,7 +2860,6 @@ DefaultWsColorSetId (WmWorkspaceData *pWS) } /* END OF FUNCTION DefaultWsColorSetId */ -#endif /* WSM */ @@ -3060,8 +2944,7 @@ _WmMultiClickTimeDefault (Widget widget, int offset, XrmValue *value) } /* END OF FUNCTION _WmMultiClickTimeDefault */ -#ifdef WSM - + /*************************************<->************************************* * * _WmSecondariesOnTopDefault (widget, offset, value) @@ -3105,7 +2988,6 @@ _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value) value->size = sizeof (Boolean); } /* END OF FUNCTION _WmSecondariesOnTopDefault */ -#endif /* WSM */ @@ -3333,8 +3215,7 @@ ProcessScreenListResource (void) } /* END OF FUNCTION ProcessScreenListResource */ -#ifdef WSM - + /******************************<->************************************* * * ProcessWmColors () @@ -4200,7 +4081,6 @@ CheckForNoDither (AppearanceData *pAD) } /* END OF FUNCTION CheckForNoDither */ -#endif /* WSM */ @@ -4252,9 +4132,7 @@ ProcessAppearanceResources (WmScreenData *pSD) (XtPointer) &(pSD->clientAppearance), WmNclient, WmCClient, wmAppearanceResources, XtNumber (wmAppearanceResources), NULL, 0); -#ifdef WSM CheckForNoDither (&(pSD->clientAppearance)); -#endif /* WSM */ /* @@ -4284,9 +4162,7 @@ ProcessAppearanceResources (WmScreenData *pSD) (void)XtGetSubresources (clientW, (XtPointer) &(pSD->clientTitleAppearance), WmNtitle, WmCTitle, wmAppearanceResources, XtNumber (wmAppearanceResources), NULL, 0); -#ifdef WSM CheckForNoDither (&(pSD->clientTitleAppearance)); -#endif /* WSM */ /* @@ -4323,9 +4199,7 @@ ProcessAppearanceResources (WmScreenData *pSD) (XtPointer) &(pSD->iconAppearance), WmNicon, WmCIcon, wmAppearanceResources, XtNumber (wmAppearanceResources), NULL, 0); -#ifdef WSM CheckForNoDither (&(pSD->iconAppearance)); -#endif /* WSM */ /* @@ -4350,9 +4224,7 @@ ProcessAppearanceResources (WmScreenData *pSD) (XtPointer) &(pSD->feedbackAppearance), WmNfeedback, WmCFeedback, wmAppearanceResources, XtNumber (wmAppearanceResources), NULL, 0); -#ifdef WSM CheckForNoDither (&(pSD->feedbackAppearance)); -#endif /* WSM */ /* * Process the feedback resource values: @@ -4806,7 +4678,6 @@ GetAppearanceGCs (WmScreenData *pSD, Pixel fg, Pixel bg, XFontStruct *font, Pixm void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) { -#ifdef WSM pResSD = pSD; /* save current screen data for default processing */ /* * Use the screen name (e.g., "0") as the default resource name. @@ -4839,35 +4710,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) #endif } -#else /* WSM */ - /* - * Retrieve screen specific resources. - */ - - if (wmGD.useStandardBehavior) - { - XtGetSubresources (wmGD.topLevelW, (XtPointer) pSD, - (String) screenName, (String)screenName, wmStdScreenResources, - XtNumber (wmStdScreenResources), NULL, 0); - - /* - * Fill in the standard resource values. - */ - - SetStdScreenResourceValues (pSD); - } - else - { - XtGetSubresources (wmGD.topLevelW, (XtPointer) pSD, - (String)screenName, (String)screenName, wmScreenResources, - XtNumber (wmScreenResources), NULL, 0); - -#ifndef MOTIF_ONE_DOT_ONE - pSD->moveOpaque =(((XmScreen) XmGetXmScreen(XtScreen(pSD->screenTopLevelW))) - -> screen.moveOpaque); -#endif - } -#endif /* WSM */ /* * Do some additional processing on the window manager resource values. @@ -4967,18 +4809,7 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) pSD->resizeBorderWidth = (int) (avg_res * 2.2); /* limit size because big borders look ugly */ -#ifndef WSM - if (wmGD.frameStyle == WmSLAB) - { -#endif /* WSM */ if (pSD->resizeBorderWidth > 6) pSD->resizeBorderWidth = 6; -#ifndef WSM - } - else - { - if (pSD->resizeBorderWidth > 7) pSD->resizeBorderWidth = 7; - } -#endif /* WSM */ } /* Multiply times width in mm (avg. 5-6 pixels) */ @@ -5022,15 +4853,12 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) { pSD->resizeBorderWidth = MAXIMUM_FRAME_BORDER_WIDTH; } -#ifdef WSM /* * Update the resource database. */ WriteOutXrmColors (pSD); -#endif /* WSM */ - /* * Process the component appearance resources for client, * icon and feedback parts of mwm. @@ -5038,7 +4866,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) ProcessAppearanceResources (pSD); -#ifdef WSM /* * Process the workspace list and name the initial * workspaces @@ -5052,7 +4879,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) */ ProcessDefaultBackdropImages (pSD); -#endif /* WSM */ /* * Save the default icon pixmap in global data. We'll use it only * as a last resort. @@ -5064,8 +4890,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) } /* END OF FUNCTION ProcessScreenResources */ -#ifdef WSM - /*************************************<->************************************* * * ProcessDefaultBackdropImages (pSD) @@ -5242,7 +5066,6 @@ ProcessWorkspaceList (WmScreenData *pSD) } /* END OF FUNCTION ProcessWorkspaceList */ -#endif /* WSM */ /******************************<->************************************* @@ -5281,9 +5104,7 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS) /* * Retrieve workspace specific resources. */ -#ifdef WSM pResWS = pWS; /* save current ws for default processing */ -#endif /* WSM */ if (wmGD.useStandardBehavior) { @@ -5296,9 +5117,7 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS) * * (no code for this right now) */ -#ifdef WSM pWS->iconBoxGeometry = NULL; -#endif /* WSM */ } else { @@ -5306,17 +5125,14 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS) pWS->name, pWS->name, wmWorkspaceResources, XtNumber (wmWorkspaceResources), NULL, 0); -#ifdef WSM /* Dup iconbox geometry, it may be free'd later on. */ if (pWS->iconBoxGeometry) { pWS->iconBoxGeometry = XtNewString (pWS->iconBoxGeometry); } -#endif /* WSM */ } -#ifdef WSM if (pWS->title == NULL) { /* @@ -5352,12 +5168,9 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS) XtNumber (wmBackdropResources), NULL, 0); ProcessBackdropResources (pWS, 0); -#endif /* WSM */ } /* END OF FUNCTION ProcessWorkspaceResources */ -#ifdef WSM - /******************************<->************************************* * * ProcessPresenceResources (pSD) @@ -5454,7 +5267,6 @@ ProcessPresenceResources (WmScreenData *pSD) } } /* END OF FUNCTION ProcessPresenceResources */ -#endif /* WSM */ /*************************************<->************************************* @@ -5624,13 +5436,12 @@ ProcessClientResources (ClientData *pCD) /* make top and bottom shadow pixmaps */ -#ifdef WSM if (pCD->matteBottomShadowPStr && (!strcmp(pCD->matteBottomShadowPStr, _NoDither))) { pCD->matteBottomShadowPStr = NULL; } -#endif /* WSM */ + if (pCD->matteBottomShadowPStr) { if ((pCD->matteBottomShadowPStr == @@ -5662,13 +5473,12 @@ ProcessClientResources (ClientData *pCD) pCD->matteBottomShadowPixmap = (Pixmap)NULL; } -#ifdef WSM if (pCD->matteTopShadowPStr && (!strcmp(pCD->matteTopShadowPStr, _NoDither))) { pCD->matteTopShadowPStr = NULL; } -#endif /* WSM */ + if (pCD->matteTopShadowPStr) { if ((pCD->matteTopShadowPStr == @@ -5779,9 +5589,9 @@ SetStdClientResourceValues (ClientData *pCD) void SetStdScreenResourceValues (WmScreenData *pSD) { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) pSD->rootMenu = builtinRootMenuName; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ pSD->buttonBindings = builtinButtonBindingsName; pSD->cleanText = True; pSD->iconDecoration = @@ -5919,7 +5729,6 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi if (Monochrome (newScreen)) { -#ifdef WSM Boolean ok = False; /* * Check color server sets for this screen. @@ -5962,7 +5771,6 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi } if (!ok) { -#endif /* WSM */ switch (type) { case WmFGC: newValue = BlackPixelOfScreen (newScreen); break; @@ -5970,9 +5778,7 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi case WmTSC: newValue = WhitePixelOfScreen (newScreen); break; case WmBSC: newValue = BlackPixelOfScreen (newScreen); break; } -#ifdef WSM } -#endif /* WSM */ return; } @@ -6355,7 +6161,7 @@ WmScreenData *pSD; * set. */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* * Before parsing the string, substitute the real name for * the default rootmenu using the resource rootMenu @@ -6371,7 +6177,7 @@ WmScreenData *pSD; ParseKeyStr (pSD, (unsigned char *)buffer); #else ParseKeyStr (pSD, (unsigned char *)builtinKeyBindings); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ } else { @@ -6407,7 +6213,7 @@ WmScreenData *pSD; * set. */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /* * Before parsing the string, substitute the real name for * the default rootmenu using the resource rootMenu @@ -6423,7 +6229,7 @@ WmScreenData *pSD; ParseButtonStr (pSD, (unsigned char *)buffer); #else ParseButtonStr (pSD, (unsigned char *)builtinButtonBindings); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ } #ifdef NO_MESSAGE_CATALOG @@ -6535,8 +6341,6 @@ Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2) } /* END OF FUNCTION SimilarAppearanceData */ -#ifdef WSM - /*************************************<->************************************* * * Monochrome (screen) @@ -6596,7 +6400,5 @@ Monochrome (Screen *screen) return ((DefaultDepthOfScreen(screen) == 1)); } /* END OF FUNCTION Monochrome */ -#endif /* WSM */ -#ifdef WSM + /**************************** eof ***************************/ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmResource.h b/cde/programs/dtwm/WmResource.h index f9eb59dd..8c20712a 100644 --- a/cde/programs/dtwm/WmResource.h +++ b/cde/programs/dtwm/WmResource.h @@ -36,10 +36,8 @@ extern void InitBuiltinSystemMenu(void); extern void GetAppearanceGCs (WmScreenData *pSD, Pixel fg, Pixel bg, XFontStruct *font, Pixmap bg_pixmap, Pixel ts_color, Pixmap ts_pixmap, Pixel bs_color, Pixmap bs_pixmap, GC *pGC, GC *ptsGC, GC *pbsGC); extern GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap); extern void MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean makeActiveResources); -#ifdef WSM extern Boolean Monochrome (Screen *screen); extern void ProcessWmColors (WmScreenData *pSD); -#endif /* WSM */ extern void ProcessWmResources (void); extern void SetStdGlobalResourceValues (void); extern void ProcessScreenListResource (void); @@ -47,9 +45,7 @@ extern void ProcessAppearanceResources (WmScreenData *pSD); extern void ProcessGlobalScreenResources (void); extern void ProcessPresenceResources (WmScreenData *pSD); extern void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName); -#ifdef WSM extern void ProcessWorkspaceList (WmScreenData *pSD); -#endif /* WSM */ extern void ProcessWorkspaceResources (WmWorkspaceData *pWS); extern void ProcessClientResources (ClientData *pCD); extern void SetStdClientResourceValues (ClientData *pCD); @@ -58,10 +54,8 @@ extern char *WmRealloc (char *ptr, unsigned size); extern char *WmMalloc (char *ptr, unsigned size); extern void SetupDefaultResources (WmScreenData *pSD); extern Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2); -#ifdef WSM extern String ResCat (String s1, String s2, String s3, String s4); void CheckForNoDither (AppearanceData *pAD); -#endif /* WSM */ #ifndef NO_MESSAGE_CATALOG extern char *builtinSystemMenu; @@ -72,6 +66,3 @@ extern char builtinKeyBindings[]; extern char builtinRootMenu[]; extern char builtinSystemMenuName[]; -#ifndef WSM -#define Monochrome(screen) ( DefaultDepthOfScreen(screen) == 1 ) -#endif /* not WSM */ diff --git a/cde/programs/dtwm/WmSignal.c b/cde/programs/dtwm/WmSignal.c index 1b981e11..bb2998af 100644 --- a/cde/programs/dtwm/WmSignal.c +++ b/cde/programs/dtwm/WmSignal.c @@ -59,7 +59,6 @@ */ -#ifdef WSM /*************************************<->************************************* * @@ -146,7 +145,6 @@ RestoreDefaultSignalHandlers (void) (void) sigaction (SIGSYS, &sa, (struct sigaction *) 0); #endif } -#endif /* WSM */ /*************************************<->************************************* @@ -162,11 +160,6 @@ RestoreDefaultSignalHandlers (void) void SetupWmSignalHandlers (int dummy) { -#ifndef WSM - void (*signalHandler) (); -#endif - -#ifdef WSM struct sigaction sa; struct sigaction osa; @@ -220,26 +213,6 @@ void SetupWmSignalHandlers (int dummy) (void) sigaction (SIGSYS, &sa, (struct sigaction *) 0); #endif -#else /* not WSM - original mwm code*/ - - signalHandler = (void (*)())signal (SIGINT, SIG_IGN); - if (signalHandler != (void (*)())SIG_IGN) - { - signal (SIGINT, QuitWmSignalHandler); - } - - signalHandler = (void (*)())signal (SIGHUP, SIG_IGN); - if (signalHandler != (void (*)())SIG_IGN) - { - signal (SIGHUP, QuitWmSignalHandler); - } - - signal (SIGQUIT, QuitWmSignalHandler); - - signal (SIGTERM, QuitWmSignalHandler); -#endif /* WSM */ - - } /* END OF FUNCTION SetupWmSignalHandlers */ diff --git a/cde/programs/dtwm/WmWinConf.c b/cde/programs/dtwm/WmWinConf.c index c598fab2..04e73001 100644 --- a/cde/programs/dtwm/WmWinConf.c +++ b/cde/programs/dtwm/WmWinConf.c @@ -52,7 +52,6 @@ #define NotGrabbed 0 #define ResizeGrab 1 #define MoveGrab 2 -#ifdef WSM /* Anchors */ #define ANCHOR_NONE 0 @@ -64,7 +63,6 @@ #ifndef ABS #define ABS(x) ((x)>0?(x):(-(x))) #endif /* ABS */ -#endif /* WSM */ /* number of times to poll before blocking on a config event */ @@ -113,12 +111,10 @@ static unsigned int resizeBigWidthInc, resizeBigHeightInc; static int startX, startY; static unsigned int startWidth, startHeight; static unsigned int minWidth, minHeight, maxHeight, maxWidth; -#ifdef WSM static int marqueeX, marqueeY; /* root coords of UL corner of are */ static long marqueeWidth, marqueeHeight; /* size of area */ static unsigned int marqueeAnchor; /* id of anchor corner */ static long marqueeWidth0, marqueeHeight0; /* old size of area */ -#endif /* WSM */ static int opaqueMoveX = 0; /* for cancel request on opaque moves */ static int opaqueMoveY = 0; @@ -133,9 +129,9 @@ static int moveLastPointerY= 0; static Boolean anyMotion = FALSE; static Boolean configGrab = FALSE; -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) static Boolean grabServer = TRUE; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ Dimension clipWidth = 0; Dimension clipHeight = 0; @@ -1307,7 +1303,6 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev) FALSE); } } -#ifdef WSM else if (wmGD.configAction == MARQUEE_SELECT) { WmScreenData *pSD; @@ -1319,7 +1314,6 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev) dtSendMarqueeSelectionNotification(pSD, DT_MARQUEE_SELECT_END, marqueeX, marqueeY, marqueeWidth, marqueeHeight); } -#endif /* WSM */ /* * Clear configuration flags and data. @@ -1332,10 +1326,8 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev) anyMotion = FALSE; wmGD.movingIcon = FALSE; -#ifdef WSM if (pcd) { -#endif /* WSM */ /* hide the move/resize config data */ HideFeedbackWindow(pcd->pSD); @@ -1343,9 +1335,7 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev) * Set the focus back to something reasonable */ RepairFocus (); -#ifdef WSM } -#endif /* WSM */ } /* END OF FUNCTION CompleteFrameConfig */ @@ -1500,11 +1490,9 @@ void MoveOutline (int x, int y, unsigned int width, unsigned int height) } else { -#ifdef WSM if (wmGD.useWindowOutline) WindowOutline(x,y,width,height); else -#endif FlashOutline(x, y, width, height); } } /* END OF FUNCTION MoveOutline */ @@ -1571,7 +1559,6 @@ void FlashOutline (int x, int y, unsigned int width, unsigned int height) } } /* END OF FUNCTION FlashOutline */ -#ifdef WSM /*************************************<->************************************* * @@ -1773,7 +1760,6 @@ void WindowOutline (int x, int y, unsigned int width, unsigned int height) } /* END OF FUNCTION WindowOutline */ -#endif /* WSM */ /*************************************<->************************************* @@ -2586,7 +2572,7 @@ Boolean StartClientMove (ClientData *pcd, XEvent *pev) } /* END OF FUNCTION StartClientMove */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /*************************************<->************************************* * * SetGrabServer () @@ -2615,7 +2601,7 @@ void SetGrabServer (void) { grabServer = FALSE; } -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ /*************************************<->************************************* @@ -2647,7 +2633,6 @@ void SetGrabServer (void) Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTime, ClientData *pCD, Boolean alwaysGrab) { -#ifdef WSM Window root; if (pCD) @@ -2656,9 +2641,6 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi root = RootWindow (DISPLAY, ACTIVE_PSD->screen); if (pCD && pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD)) -#else - if (pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD)) -#endif { /* * Confine the pointer to the icon box clip window @@ -2688,11 +2670,7 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi pmask, GrabModeAsync, /* pointer_mode */ GrabModeAsync, /* keyboard_mode */ -#ifdef WSM root, -#else - ROOT_FOR_CLIENT(pCD), /* confine_to window */ -#endif cursor, grabTime) != GrabSuccess) { @@ -2723,20 +2701,15 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi * If running automation version of mwm, do not grab the server, since * this will confuse the automation input synthesis code. */ -# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +# if (defined(MWM_QATS_PROTOCOL)) if (grabServer == TRUE) -# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +# endif /* defined(MWM_QATS_PROTOCOL) */ if (wmGD.freezeOnConfig) { -#ifdef WSM if (!pCD || ((pCD->pSD->moveOpaque && alwaysGrab) || (!(pCD->pSD->moveOpaque)))) -#else /* WSM */ - if ((pCD->pSD->moveOpaque && alwaysGrab) || - (!(pCD->pSD->moveOpaque))) -#endif /* WSM */ { XGrabServer(DISPLAY); } @@ -2822,10 +2795,8 @@ void CancelFrameConfig (ClientData *pcd) UndoGrabs(); /* turn off feedback window */ -#ifdef WSM if (pcd) { -#endif /* WSM */ HideFeedbackWindow(pcd->pSD); /* make sure title bar is popped out */ @@ -2859,19 +2830,15 @@ void CancelFrameConfig (ClientData *pcd) opaqueMoveX, opaqueMoveY); } } -#ifdef WSM } if (wmGD.configAction == MARQUEE_SELECT) { dtSendMarqueeSelectionNotification(ACTIVE_PSD, DT_MARQUEE_SELECT_CANCEL, marqueeX, marqueeY, 0, 0); } -#endif /* WSM */ /* replace pointer if no motion events received */ -#ifdef WSM if (pcd) -#endif /* WSM */ if (!anyMotion && wmGD.enableWarp) { XWarpPointer(DISPLAY, None, ROOT_FOR_CLIENT(pcd), 0, 0, 0, 0, wmGD.preMoveX, wmGD.preMoveY); @@ -2919,21 +2886,17 @@ void CheckEatButtonRelease (ClientData *pcd, XEvent *pev) { Window grab_win; -#ifdef WSM Window root; if (pcd != (ClientData *)NULL) root = ROOT_FOR_CLIENT(pcd); else root = RootWindow (DISPLAY, ACTIVE_PSD->screen); -#endif /* WSM */ -#ifdef WSM if (pcd == (ClientData *) NULL) grab_win = root; else -#endif /* WSM */ - grab_win = GrabWin(pcd, pev); + grab_win = GrabWin(pcd, pev); if ((pev->type == KeyPress || pev->type == KeyRelease) && (pev->xbutton.state & ButtonMask)) @@ -2948,11 +2911,7 @@ CheckEatButtonRelease (ClientData *pcd, XEvent *pev) ButtonReleaseMask, GrabModeAsync, /* pointer_mode */ GrabModeAsync, /* keyboard_mode */ -#ifdef WSM root, /* confine_to window */ -#else /* WSM */ - ROOT_FOR_CLIENT(pcd), /* confine_to window */ -#endif /* WSM */ wmGD.configCursor, pev->xbutton.time) == GrabSuccess) { @@ -2993,9 +2952,7 @@ EatButtonRelease (unsigned int releaseButtons) while (releaseButtons) { -#ifdef WSM PullExposureEvents (); -#endif /* WSM */ XMaskEvent (DISPLAY, ButtonReleaseMask, &event); if (event.type == ButtonRelease) @@ -4034,8 +3991,7 @@ Window GrabWin (ClientData *pcd, XEvent *pev) return (grab_win); } /* END OF FUNCTION GrabWin */ -#ifdef WSM - + /*************************************<->************************************* * * HandleMarqueeSelect (pSD, event) @@ -4447,4 +4403,3 @@ Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev) } /* end switch(keysym) */ } /* END OF FUNCTION HandleResizeKeyPress */ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmWinConf.h b/cde/programs/dtwm/WmWinConf.h index f18bbf2f..c8ef33c9 100644 --- a/cde/programs/dtwm/WmWinConf.h +++ b/cde/programs/dtwm/WmWinConf.h @@ -71,9 +71,9 @@ extern void ProcessNewConfiguration (ClientData *pCD, int x, int y, unsigned int width, unsigned int height, Boolean clientRequest); extern void ReGrabPointer (Window grab_win, Time grabTime); -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) extern void SetGrabServer (void); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ extern void SetOutline (XSegment *pOutline, int x, int y, unsigned int width, unsigned int height, int fatness); extern void SetPointerPosition (int newX, int newY, int *actualX, @@ -84,12 +84,10 @@ extern void StartClientResize (ClientData *pcd, XEvent *pev); extern Boolean StartResizeConfig (ClientData *pcd, XEvent *pev); extern int ResizeType (ClientData *pcd, XEvent *pev); extern void UndoGrabs (void); -#ifdef WSM extern void HandleMarqueeSelect (WmScreenData *pSD, XEvent *pev); extern void StartMarqueeSelect(WmScreenData *pSD, XEvent *pev); extern void UpdateMarqueeSelectData (WmScreenData *pSD); extern Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev); extern void WindowOutline (int x, int y, unsigned int width, unsigned int height); -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmWinInfo.c b/cde/programs/dtwm/WmWinInfo.c index 2d5c2396..16787339 100644 --- a/cde/programs/dtwm/WmWinInfo.c +++ b/cde/programs/dtwm/WmWinInfo.c @@ -65,13 +65,9 @@ #include "WmOL.h" #include "WmProperty.h" #include "WmResource.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ #include "WmWinList.h" -#ifdef WSM #include "WmPresence.h" -#endif /* WSM */ #include "WmXSMP.h" #include "WmMultiHead.h" @@ -87,9 +83,7 @@ static void FixSubpanelEmbeddedClientGeometry (ClientData *pCD); /* * Global Variables: */ -#ifdef WSM WmWorkspaceData *pIconBoxInitialWS; -#endif /* WSM */ @@ -148,9 +142,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) pCD->clientID = ++(pSD->clientCounter); pCD->clientFlags = WM_INITIALIZATION; pCD->iconFlags = 0; -#ifndef WSM - pCD->pIconBox = NULL; -#endif /* WSM */ pCD->thisIconBox = NULL; pCD->pECD = NULL; pCD->pPRCD = NULL; @@ -160,9 +151,7 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) pCD->transientLeader = NULL; pCD->transientChildren = NULL; pCD->transientSiblings = NULL; -#ifdef WSM pCD->primaryStackPosition = 0; -#endif /* WSM */ pCD->fullModalCount = 0; pCD->primaryModalCount = 0; pCD->focusPriority = 0; @@ -172,14 +161,8 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) pCD->clientClass = NULL; pCD->clientName = NULL; pCD->clientFrameWin = (Window)0L; -#ifndef WSM - pCD->iconFrameWin = (Window)0L; -#endif /* WSM */ pCD->iconWindow = (Window)0L; pCD->iconPixmap = (Pixmap)0L; -#ifndef WSM - pCD->iconPlace = NO_ICON_PLACE; -#endif /* WSM */ pCD->clientProtocols = NULL; pCD->clientProtocolCount = 0; pCD->mwmMessages = NULL; @@ -188,7 +171,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) pCD->clientCmapIndex = 0; pCD->clientCmapFlagsInitialized = FALSE; pCD->systemMenuSpec = NULL; -#ifdef WSM pCD->putInAll = False; pCD->pWorkspaceHints = NULL; pCD->numInhabited = 0; @@ -197,7 +179,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) pCD->dtwmBehaviors = 0L; pCD->paInitialProperties = NULL; pCD->numInitialProperties = 0; -#endif /* WSM */ pCD->decorFlags = 0L; pCD->pTitleGadgets = NULL; @@ -238,7 +219,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) if (manageFlags & MANAGEW_WM_CLIENTS) { -#ifdef WSM WmWorkspaceData *pWS; if (manageFlags & MANAGEW_ICON_BOX) @@ -250,9 +230,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) pWS = pSD->pActiveWS; } return (GetWmClientInfo (pWS, pCD, manageFlags)); -#else /* WSM */ - return (GetWmClientInfo (pSD->pActiveWS, pCD, manageFlags)); -#endif /* WSM */ } @@ -289,13 +266,11 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) } pCD->xBorderWidth = wmGD.windowAttributes.border_width; -#ifdef WSM /* * Get the initial list of properties on this window. * Save it to optimize subsequent property fetching. */ GetInitialPropertyList (pCD); -#endif /* WSM */ /* * Retrieve and process WM_CLASS hints client window property info: @@ -326,7 +301,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) ProcessSmClientID (pCD); ProcessWmSaveHint (pCD); -#ifdef WSM /* * Set client's workspace information. NOTE: this also may * set the geometry, initial state, etc. For Sm-aware clients, @@ -349,15 +323,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags) * (results are used in ProcessMwmHints) */ ProcessDtWmHints (pCD); -#else - - /* - * For Sm-aware clients, retrieve geometry and initial state - * from private DB. - */ - FindClientDBMatch(pCD, (char **)NULL); - -#endif /* WSM */ /* * Retrieve and process M_CLIENT_DECOR client window property info: @@ -486,9 +451,7 @@ GetWmClientInfo (WmWorkspaceData *pWS, { Pixmap iconBitmap; -#ifdef WSM -int i; -#endif /* WSM */ + int i; /* * Set up the client class and name for resource retrieval. @@ -574,7 +537,6 @@ int i; } } -#ifdef WSM /* * Allocate initial workspace ID list * fill with NULL IDs @@ -601,11 +563,6 @@ int i; * PutClientIntoWorkspace. */ pCD->numInhabited = 0; -#else /* WSM */ - pCD->iconPlace = NO_ICON_PLACE; - pCD->iconX = 0; - pCD->iconY = 0; -#endif /* WSM */ pCD->windowGroup = 0L; #ifndef NO_OL_COMPAT pCD->bPseudoTransient = False; @@ -641,9 +598,7 @@ int i; if (manageFlags & MANAGEW_ICON_BOX) { pCD->clientFunctions &= ICON_BOX_FUNCTIONS; -#ifdef WSM pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; -#endif /* WSM */ if (wmGD.useFrontPanel && pCD->pSD->iconBoxControl) { /* @@ -732,9 +687,7 @@ int i; Warning (((char *)GETMESSAGE(70, 3, "Couldn't make icon box"))); return (NULL); } -#ifdef WSM PutClientIntoWorkspace (pWS, pCD); -#endif /* WSM */ } else if (manageFlags & MANAGEW_CONFIRM_BOX) { @@ -756,9 +709,7 @@ int i; pCD->widthInc = 1; pCD->heightInc = 1; pCD->clientFlags |= CONFIRM_BOX; -#ifdef WSM PutClientIntoWorkspace (ACTIVE_WS, pCD); -#endif /* WSM */ } /* @@ -789,7 +740,7 @@ int i; if (manageFlags & MANAGEW_ICON_BOX) { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /** BEGIN FIX CR 6941 **/ MenuItem *iconBoxMenuItems, *lastItem; @@ -827,7 +778,7 @@ int i; F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON, GetIconBoxMenuItems(PSD_FOR_CLIENT(pCD)), TRUE); -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ } @@ -887,12 +838,8 @@ ProcessWmClass (ClientData *pCD) classHint.res_name = ""; XGetClassHint (DISPLAY, pCD->client, &classHint); #else -#ifdef WSM if ((HasProperty (pCD, XA_WM_CLASS)) && (XGetClassHint (DISPLAY, pCD->client, &classHint))) -#else /* WSM */ - if (XGetClassHint (DISPLAY, pCD->client, &classHint)) -#endif /* WSM */ #endif { /* the WM_CLASS property exists for the client window */ @@ -1044,11 +991,9 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime) register long flags; Pixmap iconPixmap; Pixmap iconMask; -#ifdef WSM WmWorkspaceData *pWsTmp; WsClientData *pWsc; int iws; -#endif /* WSM */ int tmpIconX, tmpIconY; @@ -1058,12 +1003,10 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime) * since they may be none. */ -#ifdef WSM if (firstTime && !HasProperty (pCD, XA_WM_HINTS)) pXWMHints = NULL; else -#endif /* WSM */ - pXWMHints = XGetWMHints (DISPLAY, pCD->client); + pXWMHints = XGetWMHints (DISPLAY, pCD->client); if (pXWMHints) { @@ -1177,12 +1120,10 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime) } -#ifdef WSM if (!ClientInWorkspace (PSD_FOR_CLIENT(pCD)->pActiveWS, pCD)) { pCD->clientState |= UNSEEN_STATE; } -#endif /* WSM */ /* @@ -1286,7 +1227,6 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime) { pCD->iconFlags |= ICON_HINTS_POSITION; if (wmGD.iconAutoPlace) -#ifdef WSM { /* * Initialize icon placement data in all inhabited @@ -1328,35 +1268,11 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime) } } } -#else /* WSM */ - { - tmpIconX = (pCD->clientFlags & SM_ICON_X) ? - pCD->iconX : pXWMHints->icon_x; - tmpIconY = (pCD->clientFlags & SM_ICON_Y) ? - pCD->iconY : pXWMHints->icon_y; - pCD->iconPlace = - FindIconPlace (pCD, &(pCD->pSD->pActiveWS->IPData), - tmpIconX, tmpIconY); - if (pCD->iconPlace != NO_ICON_PLACE) - { - CvtIconPlaceToPosition (&(pCD->pSD->pActiveWS->IPData), - pCD->iconPlace, &pCD->iconX, &pCD->iconY); - } - } - else - { - if (!(pCD->clientFlags & SM_ICON_X)) - pCD->iconX = pXWMHints->icon_x; - if (!(pCD->clientFlags & SM_ICON_Y)) - pCD->iconY = pXWMHints->icon_y; - } -#endif /* WSM */ } else { if (wmGD.iconAutoPlace) { -#ifdef WSM /* * Initialize icon placement data in all inhabited * workspaces @@ -1368,11 +1284,6 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime) pWsc->iconX = 0; pWsc->iconY = 0; } -#else /* WSM */ - pCD->iconPlace = NO_ICON_PLACE; - pCD->iconX = 0; - pCD->iconY = 0; -#endif /* WSM */ } } } @@ -2300,9 +2211,7 @@ ProcessWmWindowTitle (ClientData *pCD, Boolean firstTime) XmString title_xms = NULL; if ((pCD->clientDecoration & MWM_DECOR_TITLE) && -#ifdef WSM (!firstTime || HasProperty (pCD, XA_WM_NAME)) && -#endif /* WSM */ XGetWMName(DISPLAY, pCD->client, &wmNameProp)) { title_xms = WmICCCMToXmString(&wmNameProp); @@ -2517,9 +2426,7 @@ ProcessWmIconTitle (ClientData *pCD, Boolean firstTime) if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) && (pCD->transientLeader == NULL) && -#ifdef WSM (!firstTime || HasProperty(pCD, XA_WM_ICON_NAME)) && -#endif /* WSM */ XGetWMIconName (DISPLAY, pCD->client, &wmIconNameProp)) { icon_xms = WmICCCMToXmString(&wmIconNameProp); @@ -2594,12 +2501,8 @@ ProcessWmTransientFor (ClientData *pCD) ClientData *leader; -#ifdef WSM if ((HasProperty (pCD, XA_WM_TRANSIENT_FOR)) && (XGetTransientForHint (DISPLAY, pCD->client, &window))) -#else /* WSM */ - if (XGetTransientForHint (DISPLAY, pCD->client, &window)) -#endif /* WSM */ { pCD->clientFlags |= CLIENT_TRANSIENT; @@ -2655,9 +2558,9 @@ ProcessWmTransientFor (ClientData *pCD) void MakeSystemMenu (ClientData *pCD) { -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) MenuItem *lastItem; -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ pCD->mwmMenuItems = GetMwmMenuItems(pCD); pCD->systemMenuSpec = @@ -2692,7 +2595,7 @@ MakeSystemMenu (ClientData *pCD) * without any documentation. */ -#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) +#if (defined(MWM_QATS_PROTOCOL)) /** BEGIN FIX CR 6941 **/ /* if we still don't have a menu spec, then just abort. */ @@ -2718,7 +2621,7 @@ MakeSystemMenu (ClientData *pCD) PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE, pCD->systemMenuSpec, NULL); /** END FIX CR 6941 **/ -#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ +#endif /* defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */ } /* END OF FUNCTION MakeSystemMenu */ @@ -2921,9 +2824,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags) Boolean rval = False; int xoff, yoff; int origX, origY, origWidth, origHeight; -#ifdef WSM int iwsc; -#endif /* WSM */ /* @@ -2954,11 +2855,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags) (manageFlags == MANAGEW_NORMAL) && !(pCD->clientFlags & CLIENT_TRANSIENT) && (pCD->inputMode != MWM_INPUT_SYSTEM_MODAL) && -#ifdef WSM (ClientInWorkspace(PSD_FOR_CLIENT(pCD)->pActiveWS, pCD))) -#else /* WSM */ - (PSD_FOR_CLIENT(pCD) == ACTIVE_PSD)) -#endif /* WSM */ { /* * Interactively place the window on the screen. @@ -3031,7 +2928,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags) */ -#ifdef WSM if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL) { if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUB_RESTORED) @@ -3043,9 +2939,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags) AdjustSlideOutGeometry (pCD); } } - else -#endif /* WSM */ - if (((wmGD.positionOnScreen) && !interactivelyPlaced) && + else if (((wmGD.positionOnScreen) && !interactivelyPlaced) && (!(pCD->clientFlags & (SM_X | SM_Y)))) { PlaceFrameOnScreen (pCD, &pCD->clientX, &pCD->clientY, @@ -3065,7 +2959,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags) if (!wmGD.iconAutoPlace) { -#ifdef WSM if (!(pCD->iconFlags & ICON_HINTS_POSITION)) { for (iwsc=0; iwscnumInhabited; iwsc++) @@ -3076,14 +2969,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags) &pCD->pWsList[iwsc].iconY); } } -#else /* WSM */ - if (!(pCD->iconFlags & ICON_HINTS_POSITION)) - { - pCD->iconX = pCD->clientX; - pCD->iconY = pCD->clientY; - } - PlaceIconOnScreen (pCD, &pCD->iconX, &pCD->iconY); -#endif /* WSM */ } /* @@ -4120,7 +4005,6 @@ ProcessMwmHints (ClientData *pCD) } #endif /* NO_OL_COMPAT */ -#ifdef WSM /* * If primary window can't move between workspaces, then * secondary window shouldn't either. @@ -4130,7 +4014,6 @@ ProcessMwmHints (ClientData *pCD) { pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; } -#endif /* WSM */ /* * Fix up functions based on system modal settings. System modal diff --git a/cde/programs/dtwm/WmWinList.c b/cde/programs/dtwm/WmWinList.c index 6219cb21..643bfcc0 100644 --- a/cde/programs/dtwm/WmWinList.c +++ b/cde/programs/dtwm/WmWinList.c @@ -55,9 +55,7 @@ #include "WmMenu.h" #include "WmResource.h" #include "WmWinInfo.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ @@ -104,9 +102,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop) Boolean belowSystemModal = False; XWindowChanges windowChanges; WmScreenData *pSD = pWS->pSD; -#ifdef WSM WsClientData *pWsc = GetWsClientData (pWS, pCD); -#endif /* WSM */ if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL) @@ -170,11 +166,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop) } -#ifdef WSM if (!pWsc->pIconBox && pWsc->iconFrameWin) -#else /* WSM */ - if (!pCD->pIconBox && pCD->iconFrameWin) -#endif /* WSM */ { /* * Put the icon on the bottom of the stack. @@ -182,27 +174,18 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop) if (pSD->lastClient->type == MINIMIZED_STATE) { -#ifdef WSM WsClientData *pWsib; pWsib = &pSD->lastClient->pCD->pWsList[0]; windowChanges.sibling = pWsib->iconFrameWin; -#else /* WSM */ - windowChanges.sibling = pSD->lastClient->pCD->iconFrameWin; -#endif /* WSM */ } else { windowChanges.sibling = pSD->lastClient->pCD->clientFrameWin; } windowChanges.stack_mode = Below; -#ifdef WSM XConfigureWindow (DISPLAY, pWsc->iconFrameWin, CWSibling | CWStackMode, &windowChanges); -#else /* WSM */ - XConfigureWindow (DISPLAY, pCD->iconFrameWin, - CWSibling | CWStackMode, &windowChanges); -#endif /* WSM */ pCD->iconEntry.type = MINIMIZED_STATE; pCD->iconEntry.pCD = pCD; @@ -444,9 +427,7 @@ void DeleteEntryFromList (WmWorkspaceData *pWS, ClientListEntry *pListEntry) void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD) { -#ifdef WSM WsClientData *pWsc = GetWsClientData (pWS, pCD); -#endif /* WSM */ WmScreenData *pSD = pWS->pSD; if (pCD->transientLeader) @@ -469,11 +450,7 @@ void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD) * Remove the client and icon entries from the window list. */ -#ifdef WSM if (!pWsc->pIconBox && pWsc->iconFrameWin) -#else /* WSM */ - if (!pCD->pIconBox && pCD->iconFrameWin) -#endif /* WSM */ { if (pCD->iconEntry.prevSibling) { @@ -1012,12 +989,10 @@ Boolean PutTransientOnTop (ClientData *pcd) { restack = True; } -#ifdef WSM if (BumpPrimaryToBottom (pcdLeader)) { restack = True; } -#endif /* WSM */ } return (restack); @@ -1116,9 +1091,6 @@ void RestackTransients (ClientData *pcd) int count; static int size = 0; static Window *windows = NULL; -#ifndef WSM - Window *nextWindow; -#endif /* WSM */ XWindowChanges windowChanges; int i; int leaderIndex; @@ -1150,12 +1122,7 @@ void RestackTransients (ClientData *pcd) size = count + 5; } -#ifdef WSM MakeTransientFamilyStackingList (windows, pcdLeader); -#else /* WSM */ - nextWindow = MakeTransientWindowList (windows, pcdLeader); - *nextWindow = pcdLeader->clientFrameWin; -#endif /* WSM */ /* * Changes for CDExc19397. @@ -1471,7 +1438,6 @@ ClientData * FindTransientOnTop (ClientData *pcd) */ pcd = FindTransientTreeLeader (pcd); -#ifdef WSM if (!(pcd->secondariesOnTop) && (LeaderOnTop (pcd))) { @@ -1489,7 +1455,6 @@ ClientData * FindTransientOnTop (ClientData *pcd) return (pcdSub); } } -#endif /* WSM */ /* @@ -1655,7 +1620,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop, } else { -#ifdef WSM /* * Adjust stack entry window if we're stacking below a * transient tree. @@ -1665,7 +1629,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop, stackWindow = LowestWindowInTransientFamily (pStackEntry->pCD); } -#endif /* WSM */ if (stackWindow == 0) { if (pSD->lastClient->type == MINIMIZED_STATE) @@ -1674,14 +1637,12 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop, } else { -#ifdef WSM if (pSD->lastClient->pCD->transientChildren) { stackWindow = LowestWindowInTransientFamily (pSD->lastClient->pCD); } else -#endif /* WSM */ stackWindow = pSD->lastClient->pCD->clientFrameWin; } } @@ -1882,7 +1843,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB) int bY1; int bY2; -#ifdef WSM /* * For workspace stuff: if either is unseen, then neither * is obscured. @@ -1892,7 +1852,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB) { return (False); } -#endif /* WSM */ if (pcdA->clientState == NORMAL_STATE) { @@ -2423,8 +2382,7 @@ ClientListEntry * FindClientNameMatch (ClientListEntry *pEntry, return (pEntry); } /* END OF FUNCTION FindClientNameMatch */ -#ifdef WSM - + /*************************************<->************************************* * * BumpPrimaryToTop (pcdLeader) @@ -2821,4 +2779,3 @@ LeaderOnTop ( return (bOnTop); } -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmWinList.h b/cde/programs/dtwm/WmWinList.h index 8162b1e4..7f59af61 100644 --- a/cde/programs/dtwm/WmWinList.h +++ b/cde/programs/dtwm/WmWinList.h @@ -36,10 +36,8 @@ extern void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, extern void AddEntryToList (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop, ClientListEntry *pStackEntry); extern void AddTransient (WmWorkspaceData *pWS, ClientData *pCD); -#ifdef WSM extern Boolean BumpPrimaryToBottom (ClientData *pcdLeader); extern Boolean BumpPrimaryToTop (ClientData *pcdLeader); -#endif /* WSM */ extern Boolean CheckIfClientObscuredByAny (ClientData *pcd); extern Boolean CheckIfClientObscuring (ClientData *pcdTop, ClientData *pcd); extern Boolean CheckIfClientObscuringAny (ClientData *pcd); @@ -55,28 +53,22 @@ extern ClientListEntry *FindClientNameMatch (ClientListEntry *pEntry, Boolean toNext, String clientName, unsigned long types); -#ifdef WSM extern ClientData *FindSubLeaderToTop (ClientData *pcd); -#endif /* WSM */ extern ClientData *FindTransientFocus (ClientData *pcd); extern ClientData *FindTransientOnTop (ClientData *pcd); extern ClientData *FindTransientTreeLeader (ClientData *pcd); extern void FixupFullAppModalCounts (ClientData *pcdLeader, ClientData *pcdDelete); -#ifdef WSM extern Boolean LeaderOnTop (ClientData *pcdLeader); extern Window LowestWindowInTransientFamily (ClientData *pcdLeader); extern void MakeTransientFamilyStackingList (Window *windows, ClientData *pcdLeader); -#endif /* WSM */ extern Window *MakeTransientWindowList (Window *windows, ClientData *pcd); extern void MarkModalSubtree (ClientData *pcdTree, ClientData *pcdAvoid); extern void MarkModalTransient (ClientData *pcdLeader, ClientData *pCD); extern void MoveEntryInList (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop, ClientListEntry *pStackEntry); -#ifdef WSM extern Boolean NormalizeTransientTreeStacking (ClientData *pcdLeader); -#endif /* WSM */ extern Boolean PutTransientBelowSiblings (ClientData *pcd); extern Boolean PutTransientOnTop (ClientData *pcd); extern void RestackTransients (ClientData *pcd); diff --git a/cde/programs/dtwm/WmWinState.c b/cde/programs/dtwm/WmWinState.c index 22c06f94..5c02c0d3 100644 --- a/cde/programs/dtwm/WmWinState.c +++ b/cde/programs/dtwm/WmWinState.c @@ -56,9 +56,7 @@ #include "WmProperty.h" #include "WmWinInfo.h" #include "WmWinList.h" -#ifdef WSM #include "WmWrkspace.h" -#endif /* WSM */ /* @@ -117,9 +115,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u ClientData *pcdLeader; int currentState; WmScreenData *pSD = PSD_FOR_CLIENT(pCD); -#ifdef WSM Boolean notShowing = (newState & UNSEEN_STATE); -#endif /* WSM */ currentState = pCD->clientState; if (currentState == newState) @@ -136,9 +132,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u */ pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; -#ifdef WSM SetClientWsIndex (pCD); -#endif /* WSM */ if (pCD->transientLeader) { @@ -146,12 +140,10 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u (newState != WITHDRAWN_STATE)) { newState = MINIMIZED_STATE; -#ifdef WSM if (notShowing) { newState |= UNSEEN_STATE; } -#endif /* WSM */ } else if ((newState == MINIMIZED_STATE) && (pcdLeader->clientState != MINIMIZED_STATE)) @@ -159,22 +151,18 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u if (currentState == WITHDRAWN_STATE) { newState = NORMAL_STATE; -#ifdef WSM if (notShowing) { newState |= UNSEEN_STATE; } -#endif /* WSM */ } else { newState = currentState; -#ifdef WSM if (notShowing) { newState |= UNSEEN_STATE; } -#endif /* WSM */ } } if (newState == currentState) @@ -186,11 +174,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u switch (newState) { -#ifdef WSM case UNSEEN_STATE | WITHDRAWN_STATE: -#else - case WITHDRAWN_STATE: -#endif /* WSM */ { /* * Free window manager resources (frame and icon). The @@ -205,11 +189,9 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u case MAXIMIZED_STATE: { SetupWindowStateWithEventMask (pCD, newState, setTime, event_mask); -#ifdef WSM XMapWindow (DISPLAY, pCD->client); XMapWindow (DISPLAY, pCD->clientFrameWin); WmStopWaiting(); /* in WmIPC.c */ -#endif /* WSM */ break; } @@ -275,7 +257,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u if (ICON_FRAME_WIN(pCD)) { -#ifdef WSM if (pCD->clientState & UNSEEN_STATE) { if (pCD->iconWindow) @@ -286,9 +267,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u } ShowAllIconsForMinimizedClient (pCD); -#else /* WSM */ - ShowIconForMinimizedClient (pSD->pActiveWS, pCD); -#endif /* WSM */ } SetClientWMState (pCD, IconicState, MINIMIZED_STATE); @@ -317,7 +295,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u break; } -#ifdef WSM case UNSEEN_STATE | NORMAL_STATE: case UNSEEN_STATE | MAXIMIZED_STATE: @@ -369,7 +346,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u } } break; -#endif /* WSM */ } } /* END OF FUNCTION SetClientStateWithEventMask */ @@ -408,12 +384,8 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState, Time setTime, unsigned int event_mask) { int currentState; -#ifdef WSM int wsI, iplace; WmWorkspaceData *pWS_i; -#else /* WSM */ - WmWorkspaceData *pWS = PSD_FOR_CLIENT(pCD)->pActiveWS; -#endif /* WSM */ WmScreenData *pSD = PSD_FOR_CLIENT(pCD); currentState = pCD->clientState; @@ -500,7 +472,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState, XMaskEvent(DISPLAY, event_mask, &event); XUngrabPointer(DISPLAY,CurrentTime); } -#ifdef WSM if (wmGD.iconAutoPlace) { for (wsI = 0; wsI < pCD->numInhabited; wsI++) @@ -515,13 +486,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState, } } } -#else /* WSM */ - if ((wmGD.iconAutoPlace) && (ICON_PLACE(pCD) != NO_ICON_PLACE)) - { - pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = - NULL; - } -#endif /* WSM */ } if (clearIconFocus) @@ -546,13 +510,9 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState, */ pCD->clientState = newState; -#ifdef WSM wmGD.bSuspendSecondaryRestack = True; -#endif /* WSM */ F_Raise (NULL, pCD, NULL); -#ifdef WSM wmGD.bSuspendSecondaryRestack = False; -#endif /* WSM */ } if ( (!(pCD->clientFlags & ICON_BOX)) || @@ -774,16 +734,12 @@ static void UnmapClients (ClientData *pCD, unsigned int event_mask) void SetClientWMState (ClientData *pCD, int wmState, int mwmState) { ClientData *pNext; -#ifdef WSM Boolean bToUnseen; bToUnseen = (mwmState & UNSEEN_STATE) != 0; mwmState &= ~UNSEEN_STATE; -#endif /* WSM */ -#ifdef WSM SetClientWsIndex (pCD); -#endif /* WSM */ pNext = pCD->transientChildren; while (pNext) { @@ -792,37 +748,29 @@ void SetClientWMState (ClientData *pCD, int wmState, int mwmState) SetClientWMState (pNext, wmState, mwmState); } -#ifdef WSM SetClientWsIndex (pNext); -#endif /* WSM */ SetWMState (pNext->client, wmState, ICON_FRAME_WIN(pNext)); if (pNext->maxConfig && mwmState == NORMAL_STATE) { pNext->clientState = MAXIMIZED_STATE; } -#ifdef WSM else if (!pNext->maxConfig && mwmState == MAXIMIZED_STATE) { pNext->clientState = NORMAL_STATE; } -#endif /* WSM */ else { pNext->clientState = mwmState; } -#ifdef WSM if (bToUnseen) pNext->clientState |= UNSEEN_STATE; -#endif /* WSM */ pNext = pNext->transientSiblings; } SetWMState (pCD->client, wmState, ICON_FRAME_WIN(pCD)); pCD->clientState = mwmState; -#ifdef WSM if (bToUnseen) pCD->clientState |= UNSEEN_STATE; -#endif /* WSM */ } /* END OF FUNCTION SetClientWMState */ @@ -1389,17 +1337,11 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD) CvtIconPlaceToPosition (&pWS->IPData, ICON_PLACE(pCD), &ICON_X(pCD), &ICON_Y(pCD)); -#ifndef WSM - XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), - ICON_X(pCD), ICON_Y(pCD)); -#endif /* WSM */ - } pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = pCD; } -#ifdef WSM /* * If icon on root window and this workspace is active, the * make sure it's in the right place. @@ -1409,7 +1351,7 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD) XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), ICON_X(pCD), ICON_Y(pCD)); } -#endif /* WSM */ + if (pCD->iconWindow) { XMapWindow (DISPLAY, pCD->iconWindow); @@ -1460,20 +1402,14 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD) &pCD->clientEntry); } -#ifdef WSM if (pWS == pSD->pActiveWS) { XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD)); } -#else /* WSM */ - XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD)); -#endif /* WSM */ } } /* END OF FUNCTION ShowIconForMinimizedClient */ -#ifdef WSM - /*************************************<->************************************* * * ShowAllIconsForMinimizedClient (pCD) @@ -1516,5 +1452,3 @@ void ShowAllIconsForMinimizedClient (ClientData *pCD) pCD->currentWsc = saveWsc; } /* END OF FUNCTION ShowAllIconsForMinimizedClient */ -#endif /* WSM */ - diff --git a/cde/programs/dtwm/WmWinState.h b/cde/programs/dtwm/WmWinState.h index dff6e19b..9f2c590f 100644 --- a/cde/programs/dtwm/WmWinState.h +++ b/cde/programs/dtwm/WmWinState.h @@ -36,7 +36,5 @@ extern void ConfigureNewState (ClientData *pcd); extern void SetClientWMState (ClientData *pCD, int wmState, int mwmState); extern void MapClientWindows (ClientData *pCD); extern void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD); -#ifdef WSM extern void ShowAllIconsForMinimizedClient (ClientData *pCD); -#endif /* WSM */ extern void SlideSubpanelBackIn (ClientData *pCD, Widget wSubpanel); diff --git a/cde/programs/dtwm/WmWrkspace.c b/cde/programs/dtwm/WmWrkspace.c index ee140b66..29693dbb 100644 --- a/cde/programs/dtwm/WmWrkspace.c +++ b/cde/programs/dtwm/WmWrkspace.c @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY * (c) Copyright 1993, 1994 International Business Machines Corp. @@ -47,9 +46,7 @@ #include #include "WmPanelP.h" #include "WmIPC.h" /* must be after DtP.h */ -#ifdef WSM #include "WmPresence.h" -#endif /* WSM */ /* local macros */ #ifndef MIN @@ -3979,5 +3976,3 @@ int PrintWorkspaceList (pSD) } /* END OF FUNCTION PrintWorkspaceList */ #endif /* DEBUG */ -/* DO NOT ADD ANYTHING AFTER THE FOLLOWING #ENDIF !!! */ -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmWrkspace.h b/cde/programs/dtwm/WmWrkspace.h index 567bc9ab..18366579 100644 --- a/cde/programs/dtwm/WmWrkspace.h +++ b/cde/programs/dtwm/WmWrkspace.h @@ -20,7 +20,6 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -#ifdef WSM /* * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY * (c) Copyright 1993, 1994 International Business Machines Corp. @@ -186,6 +185,4 @@ extern void SetFrontPanelTitle( WmScreenData *pSD); /******** End Public Function Declarations ********/ -#endif /* WSM */ - diff --git a/cde/programs/dtwm/WmXSMP.c b/cde/programs/dtwm/WmXSMP.c index cdd86e59..f48813de 100644 --- a/cde/programs/dtwm/WmXSMP.c +++ b/cde/programs/dtwm/WmXSMP.c @@ -41,10 +41,8 @@ #include #include "WmGlobal.h" #include "WmXSMP.h" -#ifdef WSM -# include "WmWrkspace.h" -# include
-#endif +#include "WmWrkspace.h" +#include
typedef struct _ProxyClientInfo { @@ -60,12 +58,7 @@ typedef struct _ProxyClientInfo #define MAX_RESOURCE_LEN 1024 -#ifdef WSM static char *dtwmFileName = "dtwm.db"; -#else -static char *dtwmFileName = ".mwmclientdb"; -# define EXTRA_FN_CHARS 20 -#endif /* Fully-qualified resource names/classes. */ static char *xPositionStr = "%s.position.x"; @@ -76,14 +69,9 @@ static char *initialStateStr = "%s.initialState"; static char *wmCommandStr = "%s.wmCommand"; static char *wmClientMachineStr = "%s.wmClientMachine"; static char *screenStr = "%s.screen"; -#ifdef WSM static char *workspacesStr = "%s.workspaces"; static char *iconXPosStr = "%s.iconPos.x.%s"; static char *iconYPosStr = "%s.iconPos.y.%s"; -#else -static char *iconXPosStr = "%s.iconPos.x"; -static char *iconYPosStr = "%s.iconPos.y"; -#endif /* Header for private database. */ static char *dbHeader = "\ @@ -105,10 +93,6 @@ static char *iconicStateStr = "IconicState"; static char *XSMPClientStr = "Client"; static char *proxyClientStr = "ProxyClient"; -#ifndef WSM -static char *dbFileArgStr = "-session"; -#endif - /* Flag to tell us how to treat ProxyClient info. */ static Boolean smClientDBCheckpointed = False; @@ -121,20 +105,9 @@ static void smDieCallback(Widget, XtPointer, XtPointer); /* Build client database file name. */ static void buildDBFileName(char [MAXPATHLEN], Boolean); -#ifndef WSM -/* - *Get clientDB name according to argv; set according to dbFileName. - */ -static void getClientDBName(void); -static void setClientDBName(void); -static char **getNewRestartCmd(void); -static void freeNewRestartCmd(char **); -#endif /* ! WSM */ -#ifdef WSM /* Get string of client's workspaces. */ static char *getClientWorkspaces(ClientData *); -#endif /* List-of-clients utilities. */ static Boolean addClientToList(ClientData ***, int *, ClientData *); @@ -193,7 +166,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData) return; } -#ifdef WSM /* Second phase: all other clients saved; now I can save myself. */ /* Copied from WmEvent.c. */ for (scr = 0; scr < wmGD.numScreens; scr++) @@ -207,7 +179,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData) SaveResources(&wmGD.Screens[scr]); } } -#endif /* * NEW FOR SESSION MANAGEMENT: Write private client resource database. @@ -221,30 +192,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData) wmGD.clientResourceDB = newClientDB; smClientDBCheckpointed = True; -#ifndef WSM - /* Set new session properties if wmGD.dbFileName is valid. */ - if (wmGD.dbFileName != (char *)NULL) - { - char **newRestartCmd, **ptr; - char *newDiscardCmd[4]; - Arg args[10]; - int nargs; - - newDiscardCmd[0] = "rm"; - newDiscardCmd[1] = "-f"; - newDiscardCmd[2] = wmGD.dbFileName; - newDiscardCmd[3] = (char *)NULL; - - newRestartCmd = getNewRestartCmd(); - - nargs = 0; - XtSetArg(args[nargs], XtNrestartCommand, newRestartCmd); nargs++; - XtSetArg(args[nargs], XtNdiscardCommand, newDiscardCmd); nargs++; - XtSetValues(wmGD.topLevelW, args, nargs); - - freeNewRestartCmd(newRestartCmd); - } -#endif /* ! WSM */ } } @@ -258,8 +205,6 @@ smDieCallback(Widget w, XtPointer clientData, XtPointer callData) static void buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave) { -#ifdef WSM - char *savePath = (char *)NULL; fileNameBuf[0] = '\0'; @@ -295,183 +240,8 @@ buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave) if (fileNameBuf[0] == '\0') strcpy(fileNameBuf, dtwmFileName); -#else - - strcpy(fileNameBuf, (wmGD.dbFileName == (char *)NULL) ? - dtwmFileName : wmGD.dbFileName); - -#endif -} - -#ifndef WSM - -/* - * See if dbFileArgStr specified on command line. Save subsequent arg; - * if not, see if resource set; if not, put files in user's home directory. - * NOTE: we allocate extra space for the filename so we can append numbers - * without reallocating in setClientDBName. - */ -static void -getClientDBName(void) -{ - char **argP; - - /* See if DB filename specified on command line. */ - wmGD.dbFileName = (char *)NULL; - - if (wmGD.argv != (char **)NULL) - { - for (argP = wmGD.argv; *argP != (char *)NULL; argP++) - { - if (strcmp(*argP, dbFileArgStr) == 0) - { - if (*(++argP) != (char *)NULL) - { - if ((wmGD.dbFileName = - (char *)XtMalloc((strlen(*argP) + 1 + - EXTRA_FN_CHARS) * - sizeof(char))) - != (char *)NULL) - strcpy(wmGD.dbFileName, *argP); - } - break; - } - } - } - - /* Check resource if necessary. */ - if (wmGD.dbFileName == (char *)NULL) - { - if (wmGD.sessionClientDB != (String)NULL) - { - if ((wmGD.dbFileName = - (char *)XtMalloc((strlen(wmGD.sessionClientDB) + 1 + - EXTRA_FN_CHARS) * - sizeof(char))) - != (char *)NULL) - strcpy(wmGD.dbFileName, wmGD.sessionClientDB); - } - } - - if (wmGD.dbFileName == (char *)NULL) - { - char *homeDir = XmeGetHomeDirName(); - - if ((wmGD.dbFileName = - (char *)XtMalloc((strlen(homeDir) + strlen(dtwmFileName) + 2 + - EXTRA_FN_CHARS) * sizeof(char))) - != (char *)NULL) - sprintf(wmGD.dbFileName, "%s/%s", homeDir, dtwmFileName); - } -} - -/* - * See comments above in getClientDBName. - */ -static void -setClientDBName(void) -{ - char *ptr; - - if (wmGD.dbFileName == (char *)NULL) - return; - - /* Change trailing "." to "." */ - if ((ptr = strrchr(wmGD.dbFileName, '.')) != (char *)NULL) - { - char *p1; - - for (p1 = ++ptr; *p1 != '\0'; p1++) - { - if (!isdigit(*p1)) - break; - } - - if (*p1 == '\0') - { - int numSuffix; - - numSuffix = atoi(ptr) + 1; - sprintf(ptr, "%d", numSuffix); - - /* Success! We're all done here. */ - return; - } - } - - /* Otherwise, append ".0" to filename. */ - strcat(wmGD.dbFileName, ".0"); } -static char ** -getNewRestartCmd(void) -{ - char **argP; - int argc, i; - int fileArgIndex = -1; - Arg args[10]; - int nargs; - char **restartCmd; - char **newRestartCmd; - - nargs = 0; - XtSetArg(args[nargs], XtNrestartCommand, &restartCmd); nargs++; - XtGetValues(wmGD.topLevelW, args, nargs); - - if (restartCmd == (char **)NULL) - return (char **)NULL; - - for (argc = 0, argP = restartCmd; *argP != (char *)NULL; argP++, argc++) - { - if (strcmp(*argP, dbFileArgStr) == 0) - { - if (*(++argP) == (char *)NULL) - break; - - fileArgIndex = argc++; /* Point at dbFileArgStr, not filename */ - } - } - - if (fileArgIndex < 0) - { - fileArgIndex = argc; - argc += 2; - } - - if ((newRestartCmd = (char **)XtMalloc((argc + 1) * sizeof(char *))) - == (char **)NULL) - return (char **)NULL; - - for (i = 0; i < argc; i++) - { - if (i != fileArgIndex) - { - newRestartCmd[i] = XtNewString(restartCmd[i]); - } - else - { - newRestartCmd[i++] = XtNewString(dbFileArgStr); - newRestartCmd[i] = XtNewString(wmGD.dbFileName); - } - } - newRestartCmd[i] = (char *)NULL; - - return newRestartCmd; -} - -static void -freeNewRestartCmd(char **restartCmd) -{ - while (*restartCmd != (char *)NULL) - XtFree(*(restartCmd++)); - - XtFree((char *)restartCmd); -} - -#endif /* ! WSM */ - -#ifdef WSM - static char * getClientWorkspaces(ClientData *pCD) { @@ -522,8 +292,6 @@ getClientWorkspaces(ClientData *pCD) return cwsP; } -#endif /* WSM */ - static Boolean addClientToList(ClientData ***cdList, int *nClients, ClientData *pCD) { @@ -555,21 +323,12 @@ clientWorkspaceCompare(const void *ppCD1, const void *ppCD2) if ((screenDiff = pCD1->pSD->screen - pCD2->pSD->screen) != 0) return screenDiff; -#ifdef WSM - /* If same screen, sort by workspace id. */ /* How do we handle clients that live in more than one workspace? */ /* For now, pick the "current" one - if not in active workspace, */ /* this will simply be the first one in the client's list. */ return (int)(pCD1->pWsList[pCD1->currentWsc].wsID - pCD2->pWsList[pCD2->currentWsc].wsID); - -#else - - /* If no WSM, must be in same workspace if screen is same! */ - return 0; - -#endif } /* @@ -629,24 +388,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP) pCD->clientFlags |= SM_Y; } -#ifndef WSM - if ((resourcePtr = - getXSMPResource(pCD, WMSAVE_ICON_X, iconXPosStr)) - != (char *)NULL) - { - ICON_X(pCD) = atoi(resourcePtr); - pCD->clientFlags |= SM_ICON_X; - } - - if ((resourcePtr = - getXSMPResource(pCD, WMSAVE_ICON_Y, iconYPosStr)) - != (char *)NULL) - { - ICON_Y(pCD) = atoi(resourcePtr); - pCD->clientFlags |= SM_ICON_Y; - } -#endif - if ((resourcePtr = getXSMPResource(pCD, WMSAVE_WIDTH, widthSizeStr)) != (char *)NULL) @@ -673,7 +414,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP) pCD->clientFlags |= SM_CLIENT_STATE; } -#ifdef WSM if ((workSpaceNamesP != (char **)NULL) && ((resourcePtr = getXSMPResource(pCD, WMSAVE_WORKSPACES, workspacesStr)) @@ -681,7 +421,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP) { *workSpaceNamesP = XtNewString(resourcePtr); } -#endif } /* Always return True for XSMP clients. */ @@ -838,24 +577,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP) pCD->clientFlags |= SM_Y; } -#ifndef WSM - if ((resourcePtr = - getClientResource(proxyClientID, iconXPosStr)) - != (char *)NULL) - { - ICON_X(pCD) = atoi(resourcePtr); - pCD->clientFlags |= SM_ICON_X; - } - - if ((resourcePtr = - getClientResource(proxyClientID, iconYPosStr)) - != (char *)NULL) - { - ICON_Y(pCD) = atoi(resourcePtr); - pCD->clientFlags |= SM_ICON_Y; - } -#endif - if ((resourcePtr = getClientResource(proxyClientID, widthSizeStr)) != (char *)NULL) @@ -882,7 +603,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP) pCD->clientFlags |= SM_CLIENT_STATE; } -#ifdef WSM if ((workSpaceNamesP != (char **)NULL) && ((resourcePtr = getClientResource(proxyClientID, workspacesStr)) @@ -890,12 +610,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP) { *workSpaceNamesP = XtNewString(resourcePtr); } -#endif - -#ifndef WSM - /* This is done in LoadClientIconPositions() if WSM defined. */ - dbRemoveProxyClientEntry(proxyClientID); -#endif return True; } @@ -949,7 +663,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD) if (!pCD->pSD->useIconBox) { -#ifdef WSM WmScreenData *pSD = pCD->pSD; WmWorkspaceData *pWS; int i; @@ -972,19 +685,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD) } } } -#else - if (SAVE_RESOURCE(pCD, WMSAVE_ICON_X)) - { - fprintf(fp, iconXPosStr, clientID); - fprintf(fp, intArg, ICON_X(pCD)); - } - - if (SAVE_RESOURCE(pCD, WMSAVE_ICON_Y)) - { - fprintf(fp, iconYPosStr, clientID); - fprintf(fp, intArg, ICON_Y(pCD)); - } -#endif } if (SAVE_RESOURCE(pCD, WMSAVE_WIDTH)) @@ -1003,18 +703,13 @@ saveXSMPClient(FILE *fp, ClientData *pCD) { int clientState; -#ifdef WSM clientState = pCD->clientState & ~UNSEEN_STATE; -#else - clientState = pCD->clientState; -#endif fprintf(fp, initialStateStr, clientID); fprintf(fp, strArg, (clientState == NORMAL_STATE) ? normalStateStr : iconicStateStr); } -#ifdef WSM if (SAVE_RESOURCE(pCD, WMSAVE_WORKSPACES)) { char *clientWorkspaces = getClientWorkspaces(pCD); @@ -1026,7 +721,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD) XtFree(clientWorkspaces); } } -#endif return True; } @@ -1042,9 +736,7 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum) ProxyClientInfo proxyClientInfo; int clientX, clientY; unsigned int clientWd, clientHt; -#ifdef WSM char *clientWorkspaces; -#endif if (!getProxyClientInfo(pCD, &proxyClientInfo)) return False; @@ -1076,7 +768,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum) if (!pCD->pSD->useIconBox) { -#ifdef WSM WmScreenData *pSD = pCD->pSD; WmWorkspaceData *pWS; int i; @@ -1093,13 +784,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum) fprintf(fp, intArg, pCD->pWsList[i].iconY); } } -#else - fprintf(fp, iconXPosStr, clientID); - fprintf(fp, intArg, ICON_X(pCD)); - - fprintf(fp, iconYPosStr, clientID); - fprintf(fp, intArg, ICON_Y(pCD)); -#endif } fprintf(fp, widthSizeStr, clientID); @@ -1108,17 +792,12 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum) fprintf(fp, heightSizeStr, clientID); fprintf(fp, intArg, clientHt); -#ifdef WSM clientState = pCD->clientState & ~UNSEEN_STATE; -#else - clientState = pCD->clientState; -#endif fprintf(fp, initialStateStr, clientID); fprintf(fp, strArg, (clientState == NORMAL_STATE) ? normalStateStr : iconicStateStr); -#ifdef WSM clientWorkspaces = getClientWorkspaces(pCD); if (clientWorkspaces != (char *)NULL) { @@ -1126,7 +805,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum) fprintf(fp, strArg, clientWorkspaces); XtFree(clientWorkspaces); } -#endif return True; } @@ -1187,9 +865,6 @@ LoadClientResourceDB(void) { char dbFileName[MAXPATHLEN]; -#ifndef WSM - getClientDBName(); -#endif buildDBFileName(dbFileName, False); return XrmGetFileDatabase(dbFileName); @@ -1212,9 +887,6 @@ SaveClientResourceDB(void) /* Iterate through client list, saving */ /* appropriate resources for each. */ -#ifndef WSM - setClientDBName(); -#endif buildDBFileName(dbFileName, True); if ((fp = fopen(dbFileName, "w")) == (FILE *)NULL) return (XrmDatabase)NULL; @@ -1315,9 +987,6 @@ SortClientListByWorkspace(ClientData **clients, int nClients) } } -#ifdef WSM -/* This needs to be called if WSM defined; if WSM not defined, icon */ -/* positions are read at the same time as other resources. */ void LoadClientIconPositions(ClientData *pCD) { @@ -1394,4 +1063,3 @@ LoadClientIconPositions(ClientData *pCD) } } } -#endif /* WSM */ diff --git a/cde/programs/dtwm/WmXSMP.h b/cde/programs/dtwm/WmXSMP.h index 57be34cb..48ec2caf 100644 --- a/cde/programs/dtwm/WmXSMP.h +++ b/cde/programs/dtwm/WmXSMP.h @@ -46,9 +46,7 @@ #define WMSAVE_WIDTH (1L << 2) #define WMSAVE_HEIGHT (1L << 3) #define WMSAVE_STATE (1L << 4) -#ifdef WSM -# define WMSAVE_WORKSPACES (1L << 5) -#endif +#define WMSAVE_WORKSPACES (1L << 5) #define WMSAVE_ICON_X (1L << 6) #define WMSAVE_ICON_Y (1L << 7) @@ -60,8 +58,6 @@ extern XrmDatabase SaveClientResourceDB(void); extern Boolean FindClientDBMatch(ClientData *, char **); extern Boolean GetSmClientIdClientList(ClientData ***, int *); extern void SortClientListByWorkspace(ClientData **, int); -#ifdef WSM extern void LoadClientIconPositions(ClientData *); -#endif #endif /* _WmXSMP_h */