1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtwm: Remove WSM define, that is always on for CDE

This commit is contained in:
Peter Howkins 2018-06-20 00:46:58 +01:00
parent 5dc05eaeb4
commit 9a551dd8a6
57 changed files with 237 additions and 2797 deletions

View file

@ -9,7 +9,7 @@ MWMDEFINES = $(VFORK_DEFINE) -DLARGECURSORS -DR2_COMPAT -DOPAQUE -DSHAPE \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
DTWMDEFINES = -DWSM DTWMDEFINES =
DEPEND_DEFINES = $(DEPENDDEFINES) DEPEND_DEFINES = $(DEPENDDEFINES)
DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE

View file

@ -152,9 +152,6 @@ header file include flags, and macros (e.g. ABS).
UNMAP_ON_RESTART UNMAP_ON_RESTART
All windows are unmapped on restart. All windows are unmapped on restart.
WSM
Workspace manager code.
_BMS _BMS
Formerly used to denote code that interfaced to the HP Broadcast Formerly used to denote code that interfaced to the HP Broadcast
message server. This code has been switched over to ICCC message server. This code has been switched over to ICCC

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp. * (c) Copyright 1993, 1994 International Business Machines Corp.
@ -691,5 +690,4 @@ IsBackdropWindow(
return (rval); return (rval);
} }
#endif /* WSM */
/********************* eof ***************************/ /********************* eof ***************************/

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
@ -46,5 +45,4 @@ extern Boolean IsBackdropWindow(
/******** End Public Function Declarations ********/ /******** End Public Function Declarations ********/
#endif /* WSM */
/**************************** eof ***************************/ /**************************** eof ***************************/

View file

@ -722,7 +722,6 @@ Boolean GetFramePartInfo (ClientData *pcd, int part, int *pX, int *pY, unsigned
rval = TRUE; rval = TRUE;
} }
break; break;
#ifdef WSM
case FRAME_TITLEBAR: case FRAME_TITLEBAR:
if (decor & MWM_DECOR_TITLE) { if (decor & MWM_DECOR_TITLE) {
@ -734,7 +733,6 @@ Boolean GetFramePartInfo (ClientData *pcd, int part, int *pX, int *pY, unsigned
rval = TRUE; rval = TRUE;
} }
break; break;
#endif /* WSM */
case FRAME_MINIMIZE: case FRAME_MINIMIZE:
if (decor & MWM_DECOR_MINIMIZE) { if (decor & MWM_DECOR_MINIMIZE) {

View file

@ -695,7 +695,6 @@ void GenerateFrameDisplayLists (ClientData *pcd)
/* produce default border with no resizing functions */ /* produce default border with no resizing functions */
#ifdef WSM
BevelRectangle (pcd->pclientTopShadows, /* outside */ BevelRectangle (pcd->pclientTopShadows, /* outside */
pcd->pclientBottomShadows, pcd->pclientBottomShadows,
0, 0, 0, 0,
@ -704,13 +703,6 @@ void GenerateFrameDisplayLists (ClientData *pcd)
FRAME_EXTERNAL_SHADOW_WIDTH, FRAME_EXTERNAL_SHADOW_WIDTH,
FRAME_EXTERNAL_SHADOW_WIDTH, 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) && if ((pcd->internalBevel > 1) &&
!matte_width && !matte_width &&
@ -1100,11 +1092,11 @@ void GetTextBox (ClientData *pcd, XRectangle *pBox)
{ {
int x,y; int x,y;
unsigned int width,height; unsigned int width,height;
#if defined(WSM) && defined(DT_LEFT_JUSTIFIED_TITLE) #if defined(DT_LEFT_JUSTIFIED_TITLE)
Dimension textWidth; Dimension textWidth;
Dimension offset; Dimension offset;
XmFontList fontList; XmFontList fontList;
#endif /* WSM */ #endif
/* get size of title area */ /* get size of title area */
@ -1261,14 +1253,9 @@ void DrawWindowTitle (ClientData *pcd, Boolean eraseFirst)
textBox.x, textBox.y, textBox.width, &textBox, textBox.x, textBox.y, textBox.width, &textBox,
((wmGD.frameStyle == WmSLAB) ? False : True)); ((wmGD.frameStyle == WmSLAB) ? False : True));
#else /* DT_LEFT_JUSTIFIED_TITLE */ #else /* DT_LEFT_JUSTIFIED_TITLE */
#ifdef WSM
WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC, WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC,
textBox.x, textBox.y, textBox.width, &textBox, textBox.x, textBox.y, textBox.width, &textBox,
True); True);
#else
WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC,
textBox.x, textBox.y, textBox.width, &textBox);
#endif
#endif /* DT_LEFT_JUSTIFIED_TITLE */ #endif /* DT_LEFT_JUSTIFIED_TITLE */

View file

@ -59,9 +59,7 @@
#include "WmWinInfo.h" #include "WmWinInfo.h"
#include "WmWinList.h" #include "WmWinList.h"
#include "WmWinState.h" #include "WmWinState.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
/* /*
@ -246,10 +244,8 @@ Boolean WmDispatchClientEvent (XEvent *event)
{ {
SetActiveScreen (PSD_FOR_CLIENT(pCD)); SetActiveScreen (PSD_FOR_CLIENT(pCD));
} }
#ifdef WSM
/* Get workspace specific client data */ /* Get workspace specific client data */
SetClientWsIndex (pCD); SetClientWsIndex (pCD);
#endif /* WSM */
/* /*
* Handle events on top-level client windows. * 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 * This is a request to change the state of the client window from
* iconic (minimized) to normal. * iconic (minimized) to normal.
*/ */
#ifdef WSM
if (!ClientInWorkspace (ACTIVE_WS, pCD)) if (!ClientInWorkspace (ACTIVE_WS, pCD))
{ {
if (pCD->absentMapBehavior == AMAP_BEHAVIOR_IGNORE) if (pCD->absentMapBehavior == AMAP_BEHAVIOR_IGNORE)
@ -430,9 +425,6 @@ Boolean WmDispatchClientEvent (XEvent *event)
{ {
SetClientState (pCD, NORMAL_STATE, GetTimestamp ()); SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
} }
#else /* WSM */
SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
#endif /* WSM */
break; break;
} }
@ -515,9 +507,7 @@ Boolean WmDispatchClientEvent (XEvent *event)
Boolean HandleEventsOnSpecialWindows (XEvent *pEvent) Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
{ {
Boolean dispatchEvent = True; Boolean dispatchEvent = True;
#ifdef WSM
WmScreenData *pSD; WmScreenData *pSD;
#endif /* WSM */
/* /*
@ -557,7 +547,6 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
} }
dispatchEvent = False; /* don't have the toolkit dispatch the event */ dispatchEvent = False; /* don't have the toolkit dispatch the event */
} }
#ifdef WSM
else if (!XFindContext (DISPLAY, pEvent->xany.window, else if (!XFindContext (DISPLAY, pEvent->xany.window,
wmGD.mwmWindowContextType, (caddr_t *)&pSD)) wmGD.mwmWindowContextType, (caddr_t *)&pSD))
{ {
@ -572,7 +561,6 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
HandleDtWmClientMessage ((XClientMessageEvent *)pEvent); HandleDtWmClientMessage ((XClientMessageEvent *)pEvent);
} }
} }
#endif /* WSM */
else else
{ {
/* /*
@ -795,12 +783,10 @@ void HandleCPropertyNotify (ClientData *pCD, XPropertyEvent *propertyEvent)
{ {
ProcessWmProtocols (pCD); ProcessWmProtocols (pCD);
} }
#ifdef WSM
else if (propertyEvent->atom == wmGD.xa_DT_WORKSPACE_HINTS) else if (propertyEvent->atom == wmGD.xa_DT_WORKSPACE_HINTS)
{ {
(void) ProcessWorkspaceHints (pCD); (void) ProcessWorkspaceHints (pCD);
} }
#endif /* WSM */
else if (propertyEvent->atom == wmGD.xa_MWM_MESSAGES) else if (propertyEvent->atom == wmGD.xa_MWM_MESSAGES)
{ {
if (pCD->protocolFlags & PROTOCOL_MWM_MESSAGES) if (pCD->protocolFlags & PROTOCOL_MWM_MESSAGES)
@ -2577,12 +2563,10 @@ void HandleClientMessage (ClientData *pCD, XClientMessageEvent *clientEvent)
{ {
newState = NORMAL_STATE; newState = NORMAL_STATE;
} }
#ifdef WSM
if (!ClientInWorkspace (ACTIVE_WS, pCD)) if (!ClientInWorkspace (ACTIVE_WS, pCD))
{ {
newState |= UNSEEN_STATE; newState |= UNSEEN_STATE;
} }
#endif /* WSM */
SetClientState (pCD, newState, GetTimestamp ()); SetClientState (pCD, newState, GetTimestamp ());

View file

@ -36,9 +36,7 @@
#include "WmGlobal.h" #include "WmGlobal.h"
#include <stdio.h> #include <stdio.h>
#ifdef WSM
#include <Dt/UserMsg.h> #include <Dt/UserMsg.h>
#endif /* WSM */
#include "WmXSMP.h" #include "WmXSMP.h"
/* /*
@ -319,21 +317,15 @@ WmXtWarningHandler (char *message)
void void
Warning (char *message) Warning (char *message)
{ {
#ifdef WSM
char pch[MAXWMPATH+1]; char pch[MAXWMPATH+1];
sprintf (pch, "%s: %s\n", sprintf (pch, "%s: %s\n",
GETMESSAGE(20, 1, "Workspace Manager"), message); GETMESSAGE(20, 1, "Workspace Manager"), message);
_DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL); _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 */ } /* END OF FUNCTION Warning */
#ifdef WSM
#ifdef DEBUGGER #ifdef DEBUGGER
/******************************<->************************************* /******************************<->*************************************
@ -366,4 +358,3 @@ PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char *s4, char *
/************************ eof **************************/ /************************ eof **************************/
#endif /* DEBUGGER */ #endif /* DEBUGGER */
#endif /* WSM */

View file

@ -30,11 +30,9 @@
/* /*
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
#ifdef WSM
#ifdef DEBUGGER #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); 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 /* DEBUGGER */
#endif /* WSM */
extern void WmInitErrorHandler (Display *display); extern void WmInitErrorHandler (Display *display);
extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent); extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent);
extern int WmXIOErrorHandler (Display *display); extern int WmXIOErrorHandler (Display *display);
@ -44,6 +42,4 @@ extern void Warning (char *message);
#ifndef NO_MESSAGE_CATALOG #ifndef NO_MESSAGE_CATALOG
extern char * GetMessage(int set, int n, char * s); extern char * GetMessage(int set, int n, char * s);
#endif #endif
#ifdef WSM
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -44,10 +44,8 @@
*/ */
#include "WmEvent.h" #include "WmEvent.h"
#include "WmError.h" #include "WmError.h"
#ifdef WSM
#include "WmBackdrop.h" #include "WmBackdrop.h"
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
#include "WmCDInfo.h" #include "WmCDInfo.h"
#include "WmCDecor.h" #include "WmCDecor.h"
#include "WmCEvent.h" #include "WmCEvent.h"
@ -57,10 +55,8 @@
#include "WmPanelP.h" /* for typedef in WmManage.h */ #include "WmPanelP.h" /* for typedef in WmManage.h */
#include "WmManage.h" #include "WmManage.h"
#include "WmMenu.h" #include "WmMenu.h"
#ifdef WSM
#include "WmICCC.h" #include "WmICCC.h"
#include "WmProperty.h" #include "WmProperty.h"
#endif /* WSM */
#include "WmWinInfo.h" #include "WmWinInfo.h"
#include "WmWinState.h" #include "WmWinState.h"
#include "WmResNames.h" #include "WmResNames.h"
@ -71,7 +67,6 @@
#include <Xm/RowColumnP.h> /* for MS_LastManagedMenuTime */ #include <Xm/RowColumnP.h> /* for MS_LastManagedMenuTime */
extern XmMenuState _XmGetMenuState(); extern XmMenuState _XmGetMenuState();
#ifdef WSM
/* /*
* FUNCTION PARSER TABLE * FUNCTION PARSER TABLE
*/ */
@ -85,7 +80,6 @@ typedef struct {
Boolean (*parseProc)(); Boolean (*parseProc)();
} FunctionTableEntry; } FunctionTableEntry;
#endif /* WSM */
/* /*
@ -93,11 +87,9 @@ typedef struct {
*/ */
extern unsigned int buttonModifierMasks[]; extern unsigned int buttonModifierMasks[];
#ifdef WSM
int smAckState = SM_UNITIALIZED; int smAckState = SM_UNITIALIZED;
extern FunctionTableEntry functionTable[]; extern FunctionTableEntry functionTable[];
extern int F_NOP_INDEX; extern int F_NOP_INDEX;
#endif /* WSM */
#ifndef MOTIF_ONE_DOT_ONE #ifndef MOTIF_ONE_DOT_ONE
#include <Xm/MenuShellP.h> #include <Xm/MenuShellP.h>
@ -675,12 +667,8 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
(short) wmGD.hotspotRectangle.width)) && (short) wmGD.hotspotRectangle.width)) &&
(event->y_root < (wmGD.hotspotRectangle.y + (event->y_root < (wmGD.hotspotRectangle.y +
(short) wmGD.hotspotRectangle.height))&& (short) wmGD.hotspotRectangle.height))&&
#ifdef WSM
(pCD || (pCD ||
(wmGD.rootButtonClick && wmGD.clickData.clickPending))) (wmGD.rootButtonClick && wmGD.clickData.clickPending)))
#else /* WSM */
pCD)
#endif /* WSM */
{ {
/* ^^^ /* ^^^
* Added check for NULL pCD in the above condition. * Added check for NULL pCD in the above condition.
@ -698,10 +686,8 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
if (event->type == ButtonRelease) if (event->type == ButtonRelease)
{ {
#ifdef WSM
if (pCD) if (pCD)
{ {
#endif /* WSM */
/* /*
* The system menu is posted from a system menu button or an * The system menu is posted from a system menu button or an
* icon. By doing a button release over the system menu button * icon. By doing a button release over the system menu button
@ -724,7 +710,6 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time; ->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time;
doXtDispatchEvent = True; doXtDispatchEvent = True;
#endif #endif
#ifdef WSM
} }
else if ((!wmGD.clickData.pCD) && else if ((!wmGD.clickData.pCD) &&
(((XButtonEvent *)event)->button == wmGD.clickData.button) && (((XButtonEvent *)event)->button == wmGD.clickData.button) &&
@ -768,7 +753,6 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
} }
wmGD.clickData.clickPending = False; wmGD.clickData.clickPending = False;
} }
#endif /* WSM */
} }
else else
{ {
@ -1238,9 +1222,9 @@ Boolean HandleKeyPress (XKeyEvent *keyEvent,
} }
if ((keySpecs->wmFunction == F_Menu) || if ((keySpecs->wmFunction == F_Menu) ||
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
(keySpecs->wmFunction == F_Post_RMenu) || (keySpecs->wmFunction == F_Post_RMenu) ||
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
(keySpecs->wmFunction == F_Post_SMenu)) (keySpecs->wmFunction == F_Post_SMenu))
{ {
wmGD.menuUnpostKeySpec = keySpecs; /* menu unpost key spec */ 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.time = buttonEvent->time;
wmGD.clickData.clickPending = True; wmGD.clickData.clickPending = True;
wmGD.clickData.doubleClickPending = True; wmGD.clickData.doubleClickPending = True;
#ifdef WSM
wmGD.clickData.bReplayed = wmGD.bReplayedButton; wmGD.clickData.bReplayed = wmGD.bReplayedButton;
#endif /* WSM */
} }
@ -1882,9 +1864,6 @@ void ProcessClickBRelease (XButtonEvent *buttonEvent, ClientData *pCD, Context c
} /* END OF FUNCTION ProcessClickBRelease */ } /* END OF FUNCTION ProcessClickBRelease */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* HandleDtWmClientMessage (clientEvent) * HandleDtWmClientMessage (clientEvent)
@ -2132,9 +2111,6 @@ HandleDtWmRequest (WmScreenData *pSD, XEvent *pev)
} /* END OF FUNCTION HandleDtWmRequest */ } /* END OF FUNCTION HandleDtWmRequest */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
* *
* HandleWsEnterNotify (enterEvent) * HandleWsEnterNotify (enterEvent)
@ -2592,7 +2568,7 @@ Time GetTimestamp (void)
} /* END OF FUNCTION GetTimestamp */ } /* END OF FUNCTION GetTimestamp */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/*************************************<->************************************* /*************************************<->*************************************
* *
* LastTime () * LastTime ()
@ -2624,7 +2600,7 @@ Time LastTime ()
return (evTime); 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 * Force the exposure events into the queue
*/ */
XSync (DISPLAY, False); XSync (DISPLAY, False);
#ifdef WSM
XSync (DISPLAY1, False); XSync (DISPLAY1, False);
#endif /* WSM */
/* /*
* Selectively extract the exposure events * Selectively extract the exposure events
*/ */
#ifdef WSM
while (XCheckMaskEvent (DISPLAY, while (XCheckMaskEvent (DISPLAY,
ExposureMask|VisibilityChangeMask, &event) || ExposureMask|VisibilityChangeMask, &event) ||
XCheckMaskEvent (DISPLAY1, XCheckMaskEvent (DISPLAY1,
ExposureMask|VisibilityChangeMask, &event)) ExposureMask|VisibilityChangeMask, &event))
#else /* WSM */
while (XCheckMaskEvent (DISPLAY, ExposureMask, &event))
#endif /* WSM */
{ {
/* /*
* Check for, and process non-widget events. The events may be * 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. * to an icon window, or to a "special" window management window.
*/ */
#ifdef WSM
switch (event.type) switch (event.type)
{ {
case Expose: case Expose:
#endif /* WSM */
if (event.xany.window == ACTIVE_ROOT) if (event.xany.window == ACTIVE_ROOT)
{ {
dispatchEvent = WmDispatchWsEvent (&event); dispatchEvent = WmDispatchWsEvent (&event);
@ -2691,11 +2659,9 @@ void PullExposureEvents (void)
{ {
dispatchEvent = WmDispatchClientEvent (&event); dispatchEvent = WmDispatchClientEvent (&event);
} }
#ifdef WSM
default: default:
dispatchEvent = True; dispatchEvent = True;
} }
#endif /* WSM */
if (dispatchEvent) if (dispatchEvent)
{ {
@ -2709,8 +2675,6 @@ void PullExposureEvents (void)
} /* END OF FUNCTION PullExposureEvents */ } /* END OF FUNCTION PullExposureEvents */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* ReplayedButtonEvent () * ReplayedButtonEvent ()
@ -2761,4 +2725,3 @@ ReplayedButtonEvent (
return (rval); return (rval);
} }
#endif /* WSM */

View file

@ -30,19 +30,17 @@
/* /*
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
#ifdef WSM
/* Shared Variables */ /* Shared Variables */
extern int smAckState; extern int smAckState;
#endif /* WSM */
extern Boolean CheckForButtonAction (XButtonEvent *buttonEvent, extern Boolean CheckForButtonAction (XButtonEvent *buttonEvent,
Context context, Context subContext, Context context, Context subContext,
ClientData *pCD); ClientData *pCD);
extern Time GetTimestamp (void); extern Time GetTimestamp (void);
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
extern Time LastTime (void); extern Time LastTime (void);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
extern Boolean HandleKeyPress (XKeyEvent *keyEvent, KeySpec *keySpecs, extern Boolean HandleKeyPress (XKeyEvent *keyEvent, KeySpec *keySpecs,
Boolean checkContext, Context context, Boolean checkContext, Context context,
Boolean onlyFirst, ClientData *pCD); Boolean onlyFirst, ClientData *pCD);
@ -74,8 +72,6 @@ extern void WmGrabKey (Display *display, int keycode, unsigned int modifiers,
int keyboard_mode); int keyboard_mode);
extern void WmUngrabButton (Display *display, unsigned int button, extern void WmUngrabButton (Display *display, unsigned int button,
unsigned int modifiers, Window grab_window); unsigned int modifiers, Window grab_window);
#ifdef WSM
extern void HandleDtWmClientMessage (XClientMessageEvent *clientEvent); extern void HandleDtWmClientMessage (XClientMessageEvent *clientEvent);
extern void HandleDtWmRequest (WmScreenData *pSD, XEvent *pev); extern void HandleDtWmRequest (WmScreenData *pSD, XEvent *pev);
extern Boolean ReplayedButtonEvent (XButtonEvent *pevB1, XButtonEvent *pevB2); extern Boolean ReplayedButtonEvent (XButtonEvent *pevB1, XButtonEvent *pevB2);
#endif /* WSM */

View file

@ -39,19 +39,14 @@
*/ */
#include "WmGlobal.h" #include "WmGlobal.h"
#ifndef WSM
#include <signal.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <X11/Xos.h> #include <X11/Xos.h>
#include "WmICCC.h" #include "WmICCC.h"
#ifdef WSM
#include "WmWrkspace.h" /* for ClientInWorkspace() test */ #include "WmWrkspace.h" /* for ClientInWorkspace() test */
#include <Dt/EnvControlP.h> /* for restoring **environ before an exec() */ #include <Dt/EnvControlP.h> /* for restoring **environ before an exec() */
#include "WmResNames.h" #include "WmResNames.h"
#include <Dt/Message.h> #include <Dt/Message.h>
#include <Dt/Help.h> #include <Dt/Help.h>
#endif /* WSM */
#include <Dt/DtStrDefs.h> #include <Dt/DtStrDefs.h>
#include "WmPanelP.h" #include "WmPanelP.h"
#include "WmSignal.h" #include "WmSignal.h"
@ -62,24 +57,18 @@
*/ */
#include "WmFunction.h" #include "WmFunction.h"
#include "WmCEvent.h" #include "WmCEvent.h"
#ifdef WSM
#include "WmHelp.h" #include "WmHelp.h"
#endif /* WSM */
#include "WmCDInfo.h" #include "WmCDInfo.h"
#include "WmColormap.h" #include "WmColormap.h"
#include "WmError.h" #include "WmError.h"
#include "WmEvent.h" #include "WmEvent.h"
#include "WmFeedback.h" #include "WmFeedback.h"
#ifdef WSM
#include "WmIPC.h" #include "WmIPC.h"
#endif /* WSM */
#include "WmIPlace.h" #include "WmIPlace.h"
#include "WmIconBox.h" #include "WmIconBox.h"
#include "WmKeyFocus.h" #include "WmKeyFocus.h"
#include "WmMenu.h" #include "WmMenu.h"
#ifdef WSM
#include "WmPresence.h" #include "WmPresence.h"
#endif /* WSM */
#include "WmProperty.h" #include "WmProperty.h"
#include "WmProtocol.h" #include "WmProtocol.h"
#include "WmResParse.h" #include "WmResParse.h"
@ -100,15 +89,12 @@ extern pid_t vfork();
static unsigned int GetEventInverseMask(XEvent *event); static unsigned int GetEventInverseMask(XEvent *event);
#ifdef WSM
#if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE) #if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE)
#define _NFILE FOPEN_MAX #define _NFILE FOPEN_MAX
#endif #endif
#define CLOSE_FILES_ON_EXEC() \ #define CLOSE_FILES_ON_EXEC() \
{int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, 1);} {int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, 1);}
#endif /* WSM */
/* /*
* Global Variables: * Global Variables:
*/ */
@ -120,8 +106,6 @@ static unsigned int GetEventInverseMask(XEvent *event);
static ClientData *dirtyStackEntry = NULL; static ClientData *dirtyStackEntry = NULL;
static ClientData *dirtyLeader = NULL; static ClientData *dirtyLeader = NULL;
#ifdef WSM
/***********************<->************************************* /***********************<->*************************************
* *
* F_Action (args, pCD, event) * F_Action (args, pCD, event)
@ -186,9 +170,7 @@ F_Action (String actionName, ClientData *pCD, XEvent *event)
return (True); return (True);
} /* END OF FUNCTION F_Action */ } /* END OF FUNCTION F_Action */
#endif /* WSM */
/******************************<->************************************* /******************************<->*************************************
* *
* F_Beep (args, pCD, event) * F_Beep (args, pCD, event)
@ -274,7 +256,6 @@ Boolean ForceLowerWindow (ClientData *pcd)
#endif #endif
XWindowChanges changes; XWindowChanges changes;
Boolean restack = False; Boolean restack = False;
#ifdef WSM
Window stackWindow; Window stackWindow;
WmScreenData *pSD = (ACTIVE_WS)->pSD; WmScreenData *pSD = (ACTIVE_WS)->pSD;
unsigned int mask; unsigned int mask;
@ -316,7 +297,6 @@ Boolean ForceLowerWindow (ClientData *pcd)
pCLE = pCLE->prevSibling; pCLE = pCLE->prevSibling;
} }
} }
#endif /* WSM */
#if 0 #if 0
if (pSD->lastClient->type == MINIMIZED_STATE) if (pSD->lastClient->type == MINIMIZED_STATE)
{ {
@ -329,15 +309,10 @@ Boolean ForceLowerWindow (ClientData *pcd)
#endif #endif
changes.stack_mode = Below; changes.stack_mode = Below;
#ifdef WSM
if (mask) if (mask)
{ {
XConfigureWindow (DISPLAY, pcd->clientFrameWin, mask, &changes); XConfigureWindow (DISPLAY, pcd->clientFrameWin, mask, &changes);
} }
#else /* WSM */
XConfigureWindow (DISPLAY, pcd->clientFrameWin, CWStackMode,
&changes);
#endif /* WSM */
return (restack); return (restack);
} }
@ -379,9 +354,7 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event)
ClientListEntry *pStackEntry; ClientListEntry *pStackEntry;
String string = args; String string = args;
int flags = STACK_NORMAL; int flags = STACK_NORMAL;
#ifdef WSM
WmWorkspaceData *pWS = ACTIVE_WS; WmWorkspaceData *pWS = ACTIVE_WS;
#endif /* WSM */
if (string) if (string)
{ {
@ -398,15 +371,11 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event)
string, F_GROUP_ALL))) string, F_GROUP_ALL)))
{ {
pNextEntry = pEntry->prevSibling; pNextEntry = pEntry->prevSibling;
#ifdef WSM
if (ClientInWorkspace (pWS, pEntry->pCD)) if (ClientInWorkspace (pWS, pEntry->pCD))
{ {
#endif /* WSM */
Do_Lower (pEntry->pCD, pStackEntry, STACK_NORMAL); Do_Lower (pEntry->pCD, pStackEntry, STACK_NORMAL);
pStackEntry = pEntry; pStackEntry = pEntry;
#ifdef WSM
} }
#endif /* WSM */
} }
} }
/* process family stacking stuff */ /* process family stacking stuff */
@ -430,26 +399,18 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event)
} }
index += len; index += len;
} }
#ifdef WSM
if (ClientInWorkspace (pWS, pCD)) if (ClientInWorkspace (pWS, pCD))
{ {
#endif /* WSM */
Do_Lower (pCD, (ClientListEntry *) NULL, flags); Do_Lower (pCD, (ClientListEntry *) NULL, flags);
#ifdef WSM
} }
#endif /* WSM */
} }
} }
else if (pCD) else if (pCD)
{ {
#ifdef WSM
if (ClientInWorkspace (pWS, pCD)) if (ClientInWorkspace (pWS, pCD))
{ {
#endif /* WSM */
Do_Lower (pCD, (ClientListEntry *) NULL, STACK_NORMAL); 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; Boolean restackTransients;
ClientData *pcdLeader; ClientData *pcdLeader;
WmWorkspaceData *pWS = ACTIVE_WS; WmWorkspaceData *pWS = ACTIVE_WS;
#ifdef WSM
Boolean bLeaderRestacked; Boolean bLeaderRestacked;
#endif /* WSM */
if (pCD->pECD) if (pCD->pECD)
{ {
@ -506,7 +465,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
return; return;
} }
else else
#ifdef WSM
if (ClientInWorkspace(pWS, pCD) && if (ClientInWorkspace(pWS, pCD) &&
(!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD))) (!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD)))
{ {
@ -528,7 +486,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
*/ */
return; return;
} }
#endif /* WSM */
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; 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 */ else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */
{ {
#ifdef WSM
/* /*
* Handle restacking of primary/secondary windows * Handle restacking of primary/secondary windows
* within the transient window tree. * 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 * If this is a transient window then put it below its
* sibling transient windows. * sibling transient windows.
@ -701,11 +657,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
MoveEntryInList (pWS, &pcdLeader->clientEntry, True /*above*/, MoveEntryInList (pWS, &pcdLeader->clientEntry, True /*above*/,
pStackEntry); pStackEntry);
} }
#ifdef WSM
else if ((restackTransients) || (bLeaderRestacked)) else if ((restackTransients) || (bLeaderRestacked))
#else /* WSM */
else if (restackTransients)
#endif /* WSM */
{ {
RestackTransients (pCD); RestackTransients (pCD);
} }
@ -722,11 +674,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
MoveEntryInList (pWS, &pcdLeader->clientEntry, MoveEntryInList (pWS, &pcdLeader->clientEntry,
False /*on bottom*/, (ClientListEntry *) NULL); False /*on bottom*/, (ClientListEntry *) NULL);
} }
#ifdef WSM
else if ((restackTransients) || (bLeaderRestacked)) else if ((restackTransients) || (bLeaderRestacked))
#else /* WSM */
else if (restackTransients)
#endif /* WSM */
{ {
RestackTransients (pCD); RestackTransients (pCD);
} }
@ -813,13 +761,9 @@ Boolean F_Circle_Down (String args, ClientData *pCD, XEvent *event)
* on the screen. Lower the window. * on the screen. Lower the window.
*/ */
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True; wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Lower (NULL, pcdNext, (XEvent *) NULL); F_Lower (NULL, pcdNext, (XEvent *) NULL);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False; wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
break; break;
} }
} }
@ -909,13 +853,9 @@ Boolean F_Circle_Up (String args, ClientData *pCD, XEvent *event)
* window on the screen. Raise the window. * window on the screen. Raise the window.
*/ */
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True; wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Raise (NULL, pcdNext, (XEvent *) NULL); F_Raise (NULL, pcdNext, (XEvent *) NULL);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False; wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
break; break;
} }
} }
@ -986,12 +926,6 @@ Boolean F_Focus_Color (String args, ClientData *pCD, XEvent *event)
Boolean F_Exec (String args, ClientData *pCD, XEvent *event) Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
{ {
int pid; int pid;
#ifndef WSM
int status;
int w;
void (*intStat) ();
void (*quitStat) ();
#endif /* WSM */
char *shell; char *shell;
char *shellname; char *shellname;
@ -1036,7 +970,7 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
#endif /* SYSV */ #endif /* SYSV */
#endif /* SVR4 */ #endif /* SVR4 */
#endif /* NO_SETPGRP */ #endif /* NO_SETPGRP */
#ifdef WSM
/* /*
* Clean up window manager resources. * Clean up window manager resources.
* The X file descriptor should be automatically closed. * 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); _DtEnvControl(DT_ENV_RESTORE_PRE_DT);
CLOSE_FILES_ON_EXEC(); CLOSE_FILES_ON_EXEC();
#endif /* WSM */
/* /*
* Exec the command using $MWMSHELL if set or * 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. * 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 * 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 * Restore original DISPLAY environment variable value
@ -1212,9 +1127,7 @@ void Do_Quit_Mwm (Boolean diedOnRestart)
{ {
if (wmGD.Screens[scr].managed) if (wmGD.Screens[scr].managed)
{ {
#ifdef WSM
SaveResources(&wmGD.Screens[scr]); SaveResources(&wmGD.Screens[scr]);
#endif /* WSM */
pNextEntry = wmGD.Screens[scr].lastClient; pNextEntry = wmGD.Screens[scr].lastClient;
while (pNextEntry) while (pNextEntry)
{ {
@ -1230,16 +1143,10 @@ void Do_Quit_Mwm (Boolean diedOnRestart)
} }
UnParentControls (&wmGD.Screens[scr], False); 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 */ /* shut down the messaging connection */
dtCloseIPC(); dtCloseIPC();
#endif /* WSM */
ResignFromSM(); ResignFromSM();
XSync (DISPLAY, False); XSync (DISPLAY, False);
XCloseDisplay (DISPLAY); XCloseDisplay (DISPLAY);
@ -1286,14 +1193,9 @@ void ReBorderClient (ClientData *pCD, Boolean reMapClient)
(!(reMapClient))) (!(reMapClient)))
{ {
XUnmapWindow (DISPLAY, pCD->iconWindow); XUnmapWindow (DISPLAY, pCD->iconWindow);
#ifdef WSM
XReparentWindow (DISPLAY, pCD->iconWindow, XReparentWindow (DISPLAY, pCD->iconWindow,
ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX, ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX,
pCD->pWsList->iconY); pCD->pWsList->iconY);
#else /* WSM */
XReparentWindow (DISPLAY, pCD->iconWindow,
ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY);
#endif /* WSM */
} }
if (!(reMapClient)) if (!(reMapClient))
@ -1429,9 +1331,7 @@ static Window FindSomeReasonableClient(void)
{ {
if ((pNextEntry->type != MINIMIZED_STATE) && if ((pNextEntry->type != MINIMIZED_STATE) &&
(pCD->clientState != MINIMIZED_STATE) && (pCD->clientState != MINIMIZED_STATE) &&
#ifdef WSM
(ClientInWorkspace (ACTIVE_WS, pCD)) && (ClientInWorkspace (ACTIVE_WS, pCD)) &&
#endif /* WSM */
(pCD != pcdNoFocus)) (pCD != pcdNoFocus))
{ {
if (pCD->transientChildren) if (pCD->transientChildren)
@ -1457,12 +1357,8 @@ static Window FindSomeReasonableClient(void)
* Set the focus window if one is found * Set the focus window if one is found
*/ */
#ifdef WSM
if (pcdLastFocus && if (pcdLastFocus &&
ClientInWorkspace (ACTIVE_WS, pcdLastFocus)) ClientInWorkspace (ACTIVE_WS, pcdLastFocus))
#else /* WSM */
if (pcdLastFocus)
#endif /* WSM */
focusWindow = pcdLastFocus->client; focusWindow = pcdLastFocus->client;
/* /*
@ -1478,19 +1374,15 @@ static Window FindSomeReasonableClient(void)
{ {
pCD = pNextEntry->pCD; pCD = pNextEntry->pCD;
#ifdef WSM
if (ClientInWorkspace (ACTIVE_WS, pCD)) if (ClientInWorkspace (ACTIVE_WS, pCD))
{ {
#endif /* WSM */
if ((pNextEntry->type == MINIMIZED_STATE) || if ((pNextEntry->type == MINIMIZED_STATE) ||
(pCD->clientState == MINIMIZED_STATE)) (pCD->clientState == MINIMIZED_STATE))
{ {
focusWindow = ICON_FRAME_WIN(pCD); focusWindow = ICON_FRAME_WIN(pCD);
break; break;
} }
#ifdef WSM
} }
#endif /* WSM */
pNextEntry = pNextEntry->nextSibling; pNextEntry = pNextEntry->nextSibling;
} }
} }
@ -1533,15 +1425,11 @@ void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags)
wmGD.replayEnterEvent = False; wmGD.replayEnterEvent = False;
pcdFocus = pCD; pcdFocus = pCD;
#ifdef WSM
/* /*
* Make sure the client is in the current workspace * Make sure the client is in the current workspace
*/ */
if ((pCD) && if ((pCD) &&
(ClientInWorkspace (ACTIVE_WS, pCD))) (ClientInWorkspace (ACTIVE_WS, pCD)))
#else /* WSM */
if (pCD)
#endif /* WSM */
{ {
if (pCD->clientState == MINIMIZED_STATE) 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 */ } /* END OF FUNCTION Do_Focus_Key */
#ifdef WSM
/***********************<->************************************* /***********************<->*************************************
* *
* F_Goto_Workspace (args, pCD, event) * F_Goto_Workspace (args, pCD, event)
@ -1851,10 +1737,7 @@ F_Goto_Workspace (String args, ClientData *pCD, XEvent *event)
return (False); return (False);
} /* END OF FUNCTION F_Goto_Workspace */ } /* END OF FUNCTION F_Goto_Workspace */
#endif /* WSM */
#ifdef WSM
/******************************<->************************************* /******************************<->*************************************
* *
* Boolean F_Help (String args, ClientData *pCD, XEvent *event) * Boolean F_Help (String args, ClientData *pCD, XEvent *event)
@ -1924,8 +1807,7 @@ F_Help_Mode (String args, ClientData *pCD, XEvent *event)
return (False); return (False);
} /* END OF FUNCTION F_Help_Mode */ } /* END OF FUNCTION F_Help_Mode */
#endif /* WSM */
/******************************<->************************************* /******************************<->*************************************
* *
* F_Next_Key (args, pCD, event) * F_Next_Key (args, pCD, event)
@ -2232,13 +2114,9 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event)
} }
/* Make this client visible */ /* Make this client visible */
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True; wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Normalize_And_Raise (NULL, pPRCD->pCD, event); F_Normalize_And_Raise (NULL, pPRCD->pCD, event);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False; wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
} }
else else
{ {
@ -2413,7 +2291,6 @@ Boolean F_Menu (String args, ClientData *pCD, XEvent *event)
{ {
flags |= POST_TRAVERSAL_ON; flags |= POST_TRAVERSAL_ON;
} }
#ifdef WSM
/* /*
* Root menu, if posted with button press, then * Root menu, if posted with button press, then
* set up to handle root menu click to make the menu * 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.width = wmGD.moveThreshold;
wmGD.hotspotRectangle.height = wmGD.moveThreshold; wmGD.hotspotRectangle.height = wmGD.moveThreshold;
} }
#endif /* WSM */
} }
else if (event && else if (event &&
((event->type == KeyPress) || (event->type == KeyRelease))) ((event->type == KeyPress) || (event->type == KeyRelease)))
@ -2724,13 +2600,9 @@ Boolean F_Normalize_And_Raise (String args, ClientData *pCD, XEvent *event)
GetEventInverseMask(event)); GetEventInverseMask(event));
/* Raise the window and set the keyboard focus to the window */ /* Raise the window and set the keyboard focus to the window */
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True; wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Raise (NULL, pCD, (XEvent *)NULL); F_Raise (NULL, pCD, (XEvent *)NULL);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False; wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
if (wmGD.raiseKeyFocus) if (wmGD.raiseKeyFocus)
{ {
F_Focus_Key (NULL, pCD, 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); F_Restore (NULL, pCD, event);
/* Raise the window and set the keyboard focus to the window */ /* Raise the window and set the keyboard focus to the window */
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True; wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Raise (NULL, pCD, (XEvent *)NULL); F_Raise (NULL, pCD, (XEvent *)NULL);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False; wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
if (wmGD.raiseKeyFocus) if (wmGD.raiseKeyFocus)
{ {
F_Focus_Key (NULL, pCD, 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 */ } /* END OF FUNCTION F_Pack_Icons */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/*************************************<->************************************* /*************************************<->*************************************
* *
* F_Post_RMenu (args, pCD, event) * F_Post_RMenu (args, pCD, event)
@ -2978,7 +2846,7 @@ Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event)
return (False); return (False);
} /* END OF FUNCTION F_Post_RMenu */ } /* 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) else if (event->type == ButtonPress)
{ {
#ifdef WSM
/* /*
* Root menu, if posted with button press, then * Root menu, if posted with button press, then
* set up to handle root menu click to make the menu * 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.width = wmGD.moveThreshold;
wmGD.hotspotRectangle.height = wmGD.moveThreshold; wmGD.hotspotRectangle.height = wmGD.moveThreshold;
} }
#endif /* WSM */
PostMenu (pCD->systemMenuSpec, pCD, PostMenu (pCD->systemMenuSpec, pCD,
event->xbutton.x_root, event->xbutton.y_root, event->xbutton.x_root, event->xbutton.y_root,
event->xbutton.button, menuContext, POST_AT_XY, event); 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, SendClientMsg (pCD->client, (long) wmGD.xa_WM_PROTOCOLS,
(long) wmGD.xa_WM_DELETE_WINDOW, CurrentTime, NULL, 0); (long) wmGD.xa_WM_DELETE_WINDOW, CurrentTime, NULL, 0);
} }
#ifdef WSM
/* /*
* HP does not want to send a client message for both * HP does not want to send a client message for both
* delete_window AND save_yourself. The current OSF * 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 * to the behavior of dt 2.01
*/ */
else if (do_save_yourself) 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 * 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 */ } /* END OF FUNCTION F_Kill */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* F_Marquee_Selection (args, pCD, event) * F_Marquee_Selection (args, pCD, event)
@ -3267,7 +3127,6 @@ RefreshByClearing (Window win)
XFree((char *)winChildren); XFree((char *)winChildren);
} }
} }
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
@ -3286,14 +3145,12 @@ Boolean F_Refresh (String args, ClientData *pCD, XEvent *event)
{ {
Window win; Window win;
#ifdef WSM
if (wmGD.refreshByClearing) if (wmGD.refreshByClearing)
{ {
RefreshByClearing (ACTIVE_ROOT); RefreshByClearing (ACTIVE_ROOT);
} }
else else
{ {
#endif /* WSM */
/* default background_pixmap is None */ /* default background_pixmap is None */
win = XCreateWindow (DISPLAY, win = XCreateWindow (DISPLAY,
ACTIVE_ROOT, 0, 0, ACTIVE_ROOT, 0, 0,
@ -3310,9 +3167,7 @@ Boolean F_Refresh (String args, ClientData *pCD, XEvent *event)
XMapWindow (DISPLAY, win); XMapWindow (DISPLAY, win);
XDestroyWindow (DISPLAY, win); XDestroyWindow (DISPLAY, win);
#ifdef WSM
} }
#endif /* WSM */
XFlush (DISPLAY); XFlush (DISPLAY);
return (True); return (True);
@ -3362,14 +3217,11 @@ Boolean F_Resize (String args, ClientData *pCD, XEvent *event)
Boolean F_Restart (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)) if (args && *args && !strcmp (args, DTWM_REQP_NO_CONFIRM))
{ {
RestartWm (MWM_INFO_STARTUP_CUSTOM); RestartWm (MWM_INFO_STARTUP_CUSTOM);
} }
else else if (wmGD.showFeedback & WM_SHOW_FB_RESTART)
#endif /* WSM */
if (wmGD.showFeedback & WM_SHOW_FB_RESTART)
{ {
ConfirmAction (ACTIVE_PSD, RESTART_ACTION); ConfirmAction (ACTIVE_PSD, RESTART_ACTION);
} }
@ -3435,9 +3287,7 @@ void RestartWm (long startupFlags)
*/ */
SetMwmInfo (wmGD.Screens[scr].rootWindow, startupFlags, 0); SetMwmInfo (wmGD.Screens[scr].rootWindow, startupFlags, 0);
#ifdef WSM
SaveResources(&wmGD.Screens[scr]); SaveResources(&wmGD.Screens[scr]);
#endif /* WSM */
/* /*
* Unmap client windows and reparent them to the root window. * 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 */ /* shut down the messaging connection */
dtCloseIPC(); dtCloseIPC();
#endif /* WSM */
ResignFromSM(); ResignFromSM();
/* /*
@ -3483,10 +3331,8 @@ void RestartWm (long startupFlags)
XSetInputFocus (DISPLAY, PointerRoot, RevertToPointerRoot, CurrentTime); XSetInputFocus (DISPLAY, PointerRoot, RevertToPointerRoot, CurrentTime);
XSync (DISPLAY, False); XSync (DISPLAY, False);
#ifdef WSM
CLOSE_FILES_ON_EXEC(); CLOSE_FILES_ON_EXEC();
_DtEnvControl(DT_ENV_RESTORE_PRE_DT); _DtEnvControl(DT_ENV_RESTORE_PRE_DT);
#endif /* WSM */
/* /*
* Restart the window manager with the initial arguments plus * Restart the window manager with the initial arguments plus
* the restart settings. * the restart settings.
@ -3494,13 +3340,9 @@ void RestartWm (long startupFlags)
execvp (*(wmGD.argv), wmGD.argv); execvp (*(wmGD.argv), wmGD.argv);
#ifdef WSM
Warning (((char *)GETMESSAGE(26, 1, Warning (((char *)GETMESSAGE(26, 1,
"The window manager restart failed. The window manager program could not \ "The window manager restart failed. The window manager program could not \
be found or could not be executed."))); be found or could not be executed.")));
#else /* WSM */
Warning ("Cannot restart the window manager");
#endif /* WSM */
Do_Quit_Mwm (True); Do_Quit_Mwm (True);
@ -3542,14 +3384,9 @@ void DeFrameClient (ClientData *pCD)
{ {
XUnmapWindow (DISPLAY, pCD->iconWindow); XUnmapWindow (DISPLAY, pCD->iconWindow);
XRemoveFromSaveSet (DISPLAY, pCD->iconWindow); XRemoveFromSaveSet (DISPLAY, pCD->iconWindow);
#ifdef WSM
XReparentWindow (DISPLAY, pCD->iconWindow, XReparentWindow (DISPLAY, pCD->iconWindow,
ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX, ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX,
pCD->pWsList->iconY); pCD->pWsList->iconY);
#else /* WSM */
XReparentWindow (DISPLAY, pCD->iconWindow,
ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY);
#endif /* WSM */
} }
if (pCD->maxConfig) if (pCD->maxConfig)
@ -3831,9 +3668,7 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event)
ClientListEntry *pStackEntry; ClientListEntry *pStackEntry;
String string = args; String string = args;
int flags = STACK_NORMAL; int flags = STACK_NORMAL;
#ifdef WSM
WmWorkspaceData *pWS = ACTIVE_WS; WmWorkspaceData *pWS = ACTIVE_WS;
#endif /* WSM */
if (string) if (string)
{ {
@ -3850,15 +3685,11 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event)
F_GROUP_ALL))) F_GROUP_ALL)))
{ {
pNextEntry = pEntry->nextSibling; pNextEntry = pEntry->nextSibling;
#ifdef WSM
if (ClientInWorkspace (pWS, pEntry->pCD)) if (ClientInWorkspace (pWS, pEntry->pCD))
{ {
#endif /* WSM */
Do_Raise (pEntry->pCD, pStackEntry, STACK_NORMAL); Do_Raise (pEntry->pCD, pStackEntry, STACK_NORMAL);
pStackEntry = pEntry; pStackEntry = pEntry;
#ifdef WSM
} }
#endif /* WSM */
} }
} }
/* process family stacking stuff */ /* process family stacking stuff */
@ -3882,26 +3713,18 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event)
} }
index += len; index += len;
} }
#ifdef WSM
if (ClientInWorkspace (pWS, pCD)) if (ClientInWorkspace (pWS, pCD))
{ {
#endif /* WSM */
Do_Raise (pCD, (ClientListEntry *) NULL, flags); Do_Raise (pCD, (ClientListEntry *) NULL, flags);
#ifdef WSM
} }
#endif /* WSM */
} }
} }
else if (pCD) else if (pCD)
{ {
#ifdef WSM
if (ClientInWorkspace (pWS, pCD)) if (ClientInWorkspace (pWS, pCD))
{ {
#endif /* WSM */
Do_Raise (pCD, (ClientListEntry *) NULL, STACK_NORMAL); Do_Raise (pCD, (ClientListEntry *) NULL, STACK_NORMAL);
#ifdef WSM
} }
#endif /* WSM */
} }
return (True); return (True);
@ -3936,9 +3759,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
Boolean restackTransients; Boolean restackTransients;
ClientData *pcdLeader; ClientData *pcdLeader;
WmWorkspaceData *pWS = ACTIVE_WS; WmWorkspaceData *pWS = ACTIVE_WS;
#ifdef WSM
Boolean bLeaderRestacked; Boolean bLeaderRestacked;
#endif /* WSM */
if (pCD->pECD) if (pCD->pECD)
{ {
@ -3948,9 +3769,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
*/ */
return; return;
} }
else else if (ClientInWorkspace(pWS, pCD) &&
#ifdef WSM
if (ClientInWorkspace(pWS, pCD) &&
(!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD))) (!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD)))
{ {
/* /*
@ -3971,7 +3790,6 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
*/ */
return; return;
} }
#endif /* WSM */
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; 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 */ else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */
{ {
#ifdef WSM
/* /*
* Handle restacking of primary/secondary windows * Handle restacking of primary/secondary windows
* within the transient window tree. Don't raise this * 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 * If this is a transient window then put it on top of its
* sibling transient windows. * sibling transient windows.
@ -4170,11 +3987,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
/* Restack the transients if needed */ /* Restack the transients if needed */
#ifdef WSM
if ((restackTransients) || (bLeaderRestacked)) if ((restackTransients) || (bLeaderRestacked))
#else /* WSM */
if (restackTransients)
#endif /* WSM */
{ {
RestackTransients (pCD); 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. * The window is obscured by another window, raise the window.
*/ */
#ifdef WSM
F_Raise (NULL, pCD, (XEvent *)NULL); F_Raise (NULL, pCD, (XEvent *)NULL);
#else /* WSM */
F_Raise (NULL, pcdLeader, (XEvent *)NULL);
#endif /* WSM */
} }
else if (CheckIfClientObscuringAny (pcdLeader) && else if (CheckIfClientObscuringAny (pcdLeader) &&
!(wmGD.systemModalActive && !(wmGD.systemModalActive &&
@ -4232,7 +4041,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
*/ */
F_Lower (NULL, pcdLeader, (XEvent *)NULL); F_Lower (NULL, pcdLeader, (XEvent *)NULL);
#ifdef WSM
if ((pcdLeader->secondariesOnTop == False) && if ((pcdLeader->secondariesOnTop == False) &&
(pCD->transientLeader != NULL) && (pCD->transientLeader != NULL) &&
(!IS_APP_MODALIZED(pcdLeader))) (!IS_APP_MODALIZED(pcdLeader)))
@ -4241,9 +4049,7 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
(void) BumpPrimaryToTop (pcdLeader); (void) BumpPrimaryToTop (pcdLeader);
RestackTransients (pcdLeader); RestackTransients (pcdLeader);
} }
#endif /* WSM */
} }
#ifdef WSM
else if ((pcdLeader->secondariesOnTop == False) && else if ((pcdLeader->secondariesOnTop == False) &&
(pcdLeader->transientChildren != NULL) && (pcdLeader->transientChildren != NULL) &&
(!wmGD.systemModalActive) && (!wmGD.systemModalActive) &&
@ -4263,7 +4069,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
RestackTransients (pcdLeader); RestackTransients (pcdLeader);
} }
} }
#endif /* WSM */
} }
return (True); return (True);
@ -4303,14 +4108,12 @@ Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event)
h = (unsigned int) pCD->maxHeight; h = (unsigned int) pCD->maxHeight;
} }
#ifdef WSM
if (wmGD.refreshByClearing) if (wmGD.refreshByClearing)
{ {
RefreshByClearing (pCD->clientFrameWin); RefreshByClearing (pCD->clientFrameWin);
} }
else else
{ {
#endif /* WSM */
/* default background_pixmap is None */ /* default background_pixmap is None */
win = XCreateWindow (DISPLAY, win = XCreateWindow (DISPLAY,
pCD->clientBaseWin, pCD->clientBaseWin,
@ -4326,9 +4129,7 @@ Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event)
XMapWindow (DISPLAY, win); XMapWindow (DISPLAY, win);
XDestroyWindow (DISPLAY, win); XDestroyWindow (DISPLAY, win);
#ifdef WSM
} }
#endif /* WSM */
XFlush (DISPLAY); XFlush (DISPLAY);
} }
@ -4399,8 +4200,6 @@ void Do_Set_Behavior (Boolean dummy)
} /* END OF FUNCTION Do_Set_Behavior */ } /* END OF FUNCTION Do_Set_Behavior */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* F_Set_Context (args, pCD, event) * F_Set_Context (args, pCD, event)
@ -4420,7 +4219,6 @@ Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event)
return (True); return (True);
} /* END OF FUNCTION F_Set_Context */ } /* 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) * F_InvokeCommand (args, pCD, event)
@ -4586,7 +4384,7 @@ Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event)
return (True); return (True);
} /* END OF FUNCTION F_InvokeCommand */ } /* 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; 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 */ #endif /* DEBUG */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* F_Next_Workspace (args, pCD, event) * F_Next_Workspace (args, pCD, event)
@ -4882,7 +4678,3 @@ DumpWindowList ()
} }
#endif /* DEBUG */ #endif /* DEBUG */
#endif /* WSM */

View file

@ -31,9 +31,7 @@
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
#ifdef WSM
extern Boolean F_Action (String actionName, ClientData *pCD, XEvent *event); 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_Beep (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Lower (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); 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 void Do_Quit_Mwm (Boolean diedOnRestart);
extern Boolean F_Focus_Key (String args, ClientData *pCD, XEvent *event); extern Boolean F_Focus_Key (String args, ClientData *pCD, XEvent *event);
extern void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags); 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_Goto_Workspace (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Help (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); 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_Next_Key (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Prev_Cmap (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_Prev_Key (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Pass_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); 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_Maximize (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Menu (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); 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 Do_Restart (Boolean dummy);
extern void RestartWm (long startupFlags); extern void RestartWm (long startupFlags);
extern void DeFrameClient (ClientData *pCD); extern void DeFrameClient (ClientData *pCD);
#ifdef WSM
extern Boolean F_Send (String args, ClientData *pCD, XEvent *event); 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_Send_Msg (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Separator (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); 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_Raise_Lower (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Refresh_Win (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); extern Boolean F_Set_Behavior (String args, ClientData *pCD, XEvent *event);
#ifdef WSM
extern Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event); extern Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event);
#endif
extern void Do_Set_Behavior (Boolean dummy); extern void Do_Set_Behavior (Boolean dummy);
extern Boolean F_Title (String args, ClientData *pCD, XEvent *event); extern Boolean F_Title (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Screen (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, extern Boolean F_Toggle_Front_Panel (String args, ClientData *pCD,
XEvent *event); XEvent *event);
extern Boolean F_Version (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_Next_Workspace (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Prev_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, 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) #if defined(DEBUG)
extern Boolean F_ZZ_Debug (String, ClientData *, XEvent *); extern Boolean F_ZZ_Debug (String, ClientData *, XEvent *);
#endif /* DEBUG */ #endif /* DEBUG */
#endif /* WSM */ #if (defined(MWM_QATS_PROTOCOL))
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
extern Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event); extern Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Post_RMenu (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 Time GetFunctionTimestamp (XButtonEvent *pEvent);
extern void ReBorderClient (ClientData *pCD, Boolean reMapClient); extern void ReBorderClient (ClientData *pCD, Boolean reMapClient);
extern void ClearDirtyStackEntry (ClientData *pCD); /* Fix for 5325 */ extern void ClearDirtyStackEntry (ClientData *pCD); /* Fix for 5325 */

View file

@ -59,14 +59,12 @@
#include <X11/StringDefs.h> #include <X11/StringDefs.h>
#include <Xm/MwmUtil.h> #include <Xm/MwmUtil.h>
#include <Xm/Xm.h> #include <Xm/Xm.h>
#ifdef WSM
#include <Xm/ColorObjP.h> #include <Xm/ColorObjP.h>
#include <Dt/Service.h> #include <Dt/Service.h>
#include <Dt/Wsm.h> #include <Dt/Wsm.h>
#include <Dt/WsmP.h> #include <Dt/WsmP.h>
#include "WmParse.h" #include "WmParse.h"
#include <Dt/Action.h> #include <Dt/Action.h>
#endif /* WSM */
#if defined(sun) && defined(ALLPLANES) #if defined(sun) && defined(ALLPLANES)
#include <X11/extensions/allplanes.h> #include <X11/extensions/allplanes.h>
@ -79,7 +77,6 @@
#ifdef MOTIF_ONE_DOT_ONE #ifdef MOTIF_ONE_DOT_ONE
#define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET" #define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET"
#endif #endif
#ifdef WSM
extern int WmIdentity; extern int WmIdentity;
@ -89,13 +86,11 @@ extern int WmIdentity;
#define CSERVE_NORMAL 0 #define CSERVE_NORMAL 0
#define CSERVE_NOT_AVAILABLE 1 #define CSERVE_NOT_AVAILABLE 1
#define CSERVE_FAILURE 2 #define CSERVE_FAILURE 2
#endif /* WSM */
/* window manager name and class used to get resources: */ /* window manager name and class used to get resources: */
#define WM_RESOURCE_CLASS "Mwm" #define WM_RESOURCE_CLASS "Mwm"
#define WM_RESOURCE_NAME "mwm" #define WM_RESOURCE_NAME "mwm"
#ifdef WSM
#define DT_WM_RESOURCE_CLASS "Dtwm" #define DT_WM_RESOURCE_CLASS "Dtwm"
#define DT_WM_RESOURCE_NAME "dtwm" #define DT_WM_RESOURCE_NAME "dtwm"
@ -117,18 +112,14 @@ extern Pixel FPselectcolor;
#define MwmBehavior (WmIdentity == MWM) #define MwmBehavior (WmIdentity == MWM)
#define DtwmBehavior (WmIdentity == DT_MWM) #define DtwmBehavior (WmIdentity == DT_MWM)
#else
#define MwmBehavior (True)
#endif /* WSM */
/* ICCC atom names: */ /* ICCC atom names: */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# define _XA_TARGETS "TARGETS" # define _XA_TARGETS "TARGETS"
# define _XA_MULTIPLE "MULTIPLE" # define _XA_MULTIPLE "MULTIPLE"
# define _XA_TIMESTAMP "TIMESTAMP" # 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_STATE "WM_STATE"
#define _XA_WM_PROTOCOLS "WM_PROTOCOLS" #define _XA_WM_PROTOCOLS "WM_PROTOCOLS"
@ -138,7 +129,7 @@ extern Pixel FPselectcolor;
#define _XA_WM_TAKE_FOCUS "WM_TAKE_FOCUS" #define _XA_WM_TAKE_FOCUS "WM_TAKE_FOCUS"
#define _XA_WM_COLORMAP_WINDOWS "WM_COLORMAP_WINDOWS" #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 */ /* original set of query targets */
# define _XA_MOTIF_WM_CLIENT_WINDOW "_MOTIF_WM_CLIENT_WINDOW" # define _XA_MOTIF_WM_CLIENT_WINDOW "_MOTIF_WM_CLIENT_WINDOW"
# define _XA_MOTIF_WM_POINTER_WINDOW "_MOTIF_WM_POINTER_WINDOW" # define _XA_MOTIF_WM_POINTER_WINDOW "_MOTIF_WM_POINTER_WINDOW"
@ -157,7 +148,7 @@ extern Pixel FPselectcolor;
/* automation support */ /* automation support */
# define _XA_MOTIF_WM_AUTOMATION "_MOTIF_WM_AUTOMATION" # 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: */ /* window manager exit value on fatal errors: */
#define WM_ERROR_EXIT_VALUE 1 #define WM_ERROR_EXIT_VALUE 1
@ -193,12 +184,8 @@ extern Pixel FPselectcolor;
#define MANAGEW_CONFIRM_BOX (1L << 4) #define MANAGEW_CONFIRM_BOX (1L << 4)
#define MANAGEW_WM_RESTART_ICON (1L << 5) #define MANAGEW_WM_RESTART_ICON (1L << 5)
#ifdef WSM
#define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | \ #define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | \
MANAGEW_CONFIRM_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) */ /* keyboard input focus flag values (for calls to SetKeyboardFocus) */
#define ALWAYS_SET_FOCUS (1L << 0) #define ALWAYS_SET_FOCUS (1L << 0)
@ -228,11 +215,7 @@ extern Pixel FPselectcolor;
#define TEXT_HEIGHT(pfs) (((pfs)->ascent)+((pfs)->descent)) #define TEXT_HEIGHT(pfs) (((pfs)->ascent)+((pfs)->descent))
/* icon frame shadow widths */ /* icon frame shadow widths */
#ifdef WSM
#define ICON_EXTERNAL_SHADOW_WIDTH (wmGD.iconExternalShadowWidth) #define ICON_EXTERNAL_SHADOW_WIDTH (wmGD.iconExternalShadowWidth)
#else /* WSM */
#define ICON_EXTERNAL_SHADOW_WIDTH 2
#endif /* WSM */
#define ICON_INTERNAL_SHADOW_WIDTH 1 #define ICON_INTERNAL_SHADOW_WIDTH 1
/* padding widths */ /* padding widths */
@ -281,11 +264,7 @@ extern Pixel FPselectcolor;
/* client frame shadow widths */ /* client frame shadow widths */
#ifdef WSM
#define FRAME_EXTERNAL_SHADOW_WIDTH (wmGD.frameExternalShadowWidth) #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_INTERNAL_SHADOW_WIDTH 1
#define FRAME_CLIENT_SHADOW_WIDTH 1 #define FRAME_CLIENT_SHADOW_WIDTH 1
#define FRAME_MATTE_SHADOW_WIDTH 1 #define FRAME_MATTE_SHADOW_WIDTH 1
@ -314,14 +293,12 @@ extern Pixel FPselectcolor;
#define STRETCH_COUNT 8 #define STRETCH_COUNT 8
#ifdef WSM
/* Workspace allocation granularity */ /* Workspace allocation granularity */
#define WS_ALLOC_AMOUNT 8 #define WS_ALLOC_AMOUNT 8
/* Window list allocation granularity */ /* Window list allocation granularity */
#define WINDOW_ALLOC_AMOUNT 16 #define WINDOW_ALLOC_AMOUNT 16
#endif /* WSM */
/* function flag masks */ /* function flag masks */
#define WM_FUNC_DEFAULT MWM_FUNC_ALL #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_PANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE)
#define WM_FUNC_SUBPANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE|\ #define WM_FUNC_SUBPANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE|\
MWM_FUNC_CLOSE) MWM_FUNC_CLOSE)
#ifdef WSM
/* workspace controller definitions */ /* workspace controller definitions */
#define CONTROL_BOX_FUNCTIONS (MWM_FUNC_MOVE) #define CONTROL_BOX_FUNCTIONS (MWM_FUNC_MOVE)
/* workspace presence definitions */ /* workspace presence definitions */
#define PRESENCE_BOX_FUNCTIONS (MWM_FUNC_MOVE) #define PRESENCE_BOX_FUNCTIONS (MWM_FUNC_MOVE)
#endif /* WSM */
/* show feedback definitions */ /* show feedback definitions */
#define WM_SHOW_FB_BEHAVIOR (1L << 0) #define WM_SHOW_FB_BEHAVIOR (1L << 0)
@ -380,7 +355,6 @@ extern Pixel FPselectcolor;
#define WM_SHOW_FB_DEFAULT WM_SHOW_FB_ALL #define WM_SHOW_FB_DEFAULT WM_SHOW_FB_ALL
#ifdef WSM
/* flags identifying resources to save */ /* flags identifying resources to save */
#define WM_RES_WORKSPACE_LIST (1L << 0) #define WM_RES_WORKSPACE_LIST (1L << 0)
@ -391,7 +365,6 @@ extern Pixel FPselectcolor;
#define WM_RES_ICONBOX_GEOMETRY (1L << 5) #define WM_RES_ICONBOX_GEOMETRY (1L << 5)
#define WM_RES_WORKSPACE_COUNT (1L << 6) #define WM_RES_WORKSPACE_COUNT (1L << 6)
#endif /* WSM */
@ -433,9 +406,7 @@ typedef struct _WmColorData
} WmColorData; } WmColorData;
#ifdef WSM
typedef Atom WorkspaceID; typedef Atom WorkspaceID;
#endif
/*************************************<->************************************* /*************************************<->*************************************
@ -496,9 +467,7 @@ typedef struct _ButtonSpec
#define F_CONTEXT_NORMAL (1L << 2) #define F_CONTEXT_NORMAL (1L << 2)
#define F_CONTEXT_MAXIMIZE (1L << 3) #define F_CONTEXT_MAXIMIZE (1L << 3)
#define F_CONTEXT_ICONBOX (1L << 4) #define F_CONTEXT_ICONBOX (1L << 4)
#ifdef WSM
#define F_CONTEXT_IFKEY (1L << 7) #define F_CONTEXT_IFKEY (1L << 7)
#endif /* WSM */
#define F_CONTEXT_WINDOW (F_CONTEXT_NORMAL|F_CONTEXT_MAXIMIZE) #define F_CONTEXT_WINDOW (F_CONTEXT_NORMAL|F_CONTEXT_MAXIMIZE)
#define F_CONTEXT_ALL (F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW) #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_NBORDER 14
#define FRAME_MATTE 15 #define FRAME_MATTE 15
#define FRAME_MISC FRAME_MATTE #define FRAME_MISC FRAME_MATTE
#ifdef WSM
#define FRAME_TITLEBAR 17 #define FRAME_TITLEBAR 17
#endif /* WSM */
/* icon part contexts */ /* icon part contexts */
#define ICON_PART_NONE 0 #define ICON_PART_NONE 0
@ -629,9 +596,7 @@ typedef struct _ClickData
{ {
Boolean clickPending; Boolean clickPending;
Boolean doubleClickPending; Boolean doubleClickPending;
#ifdef WSM
Boolean bReplayed; Boolean bReplayed;
#endif /* WSM */
unsigned int button; unsigned int button;
unsigned int state; unsigned int state;
unsigned int releaseState; unsigned int releaseState;
@ -677,8 +642,7 @@ typedef struct _Gadget_Rectangle
#define F_GROUP_ALL (F_GROUP_DEFAULT | F_GROUP_TRANSIENT) #define F_GROUP_ALL (F_GROUP_DEFAULT | F_GROUP_TRANSIENT)
#define F_GROUP_GROUP (1L << 3) #define F_GROUP_GROUP (1L << 3)
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* Workspace data structures ... * Workspace data structures ...
@ -783,9 +747,7 @@ typedef struct _SessionGeom
#define SM_START_ACK 1 #define SM_START_ACK 1
#define SM_STOP_ACK 2 #define SM_STOP_ACK 2
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
* *
* Menu specification data structures ... * 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 denote where the separators belong in a pair of separators
* used to surround a client command. * 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. * Used to denote what kind of change to make to a client command.
*/ */
typedef enum { ENABLE, DISABLE, REMOVE, RENAME } CmdModifier; typedef enum { ENABLE, DISABLE, REMOVE, RENAME } CmdModifier;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
typedef struct _MenuItem typedef struct _MenuItem
{ {
@ -828,16 +790,15 @@ typedef struct _MenuItem
String wmFuncArgs; String wmFuncArgs;
Context greyedContext; Context greyedContext;
long mgtMask; long mgtMask;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
String clientCommandName; /* as specified by the user in String clientCommandName; /* as specified by the user in
his .mwmrc file. */ his .mwmrc file. */
CARD32 clientCommandID; CARD32 clientCommandID;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
struct _MenuItem *nextMenuItem; struct _MenuItem *nextMenuItem;
} MenuItem; } MenuItem;
#ifdef WSM
/* /*
* We use the top part of mgtMask for workspace function bits. * We use the top part of mgtMask for workspace function bits.
@ -848,7 +809,6 @@ typedef struct _MenuItem
#define MWM_MGT_MASK 0x0000FFFF #define MWM_MGT_MASK 0x0000FFFF
#define DTWM_MGT_MASK 0xFFFF0000 #define DTWM_MGT_MASK 0xFFFF0000
#endif /* WSM */
typedef struct _MenuButton typedef struct _MenuButton
{ {
@ -858,13 +818,13 @@ typedef struct _MenuButton
} MenuButton; } MenuButton;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
typedef struct _MenuExclusion typedef struct _MenuExclusion
{ {
String command_string; String command_string;
struct _MenuExclusion *nextExclusion; struct _MenuExclusion *nextExclusion;
} MenuExclusion; } MenuExclusion;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
typedef struct _MenuSpec typedef struct _MenuSpec
{ {
@ -880,20 +840,20 @@ typedef struct _MenuSpec
Context accelContext; /* accelerator context */ Context accelContext; /* accelerator context */
KeySpec *accelKeySpecs; /* list of accelerator KeySpecs */ 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 MenuExclusion *exclusions; /* list of client commands to be
excluded from this menu. */ excluded from this menu. */
Boolean clientLocal; /* this menu is owned by a client and not Boolean clientLocal; /* this menu is owned by a client and not
shared with any other clients */ shared with any other clients */
CARD32 commandID; /* if this is a client command, then this CARD32 commandID; /* if this is a client command, then this
its id value - globally unique. */ its id value - globally unique. */
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
struct _MenuSpec *nextMenuSpec; struct _MenuSpec *nextMenuSpec;
} MenuSpec; } MenuSpec;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/* The range to which a client command operation should apply. */ /* The range to which a client command operation should apply. */
typedef enum { SINGLE, ROOT, ALL } OpRange; typedef enum { SINGLE, ROOT, ALL } OpRange;
@ -919,7 +879,7 @@ typedef struct _matchlist {
struct _matchlist *next; struct _matchlist *next;
} MatchList; } MatchList;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/*************************************<->************************************* /*************************************<->*************************************
@ -1140,9 +1100,7 @@ typedef struct _IconBoxData
int currentCol; int currentCol;
int lastRow; int lastRow;
int lastCol; int lastCol;
#ifdef WSM
WorkspaceID wsID; /* workspace identifier */ WorkspaceID wsID; /* workspace identifier */
#endif /* WSM */
struct _ClientData *pCD_iconBox; /* ptr to its own clientdata */ struct _ClientData *pCD_iconBox; /* ptr to its own clientdata */
struct _IconBoxData *pNextIconBox; /* ptr to next icon box */ struct _IconBoxData *pNextIconBox; /* ptr to next icon box */
struct _IconPlacementData IPD; /* icon placement data */ struct _IconPlacementData IPD; /* icon placement data */
@ -1271,24 +1229,20 @@ typedef struct _WmScreenData
Window rootWindow; Window rootWindow;
Widget screenTopLevelW; Widget screenTopLevelW;
Widget screenTopLevelW1; /* for internal WM components */ Widget screenTopLevelW1; /* for internal WM components */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
Widget utmShell; /* DrawingArea used for UTM */ Widget utmShell; /* DrawingArea used for UTM */
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
Widget confirmboxW[4]; Widget confirmboxW[4];
Widget wPanelist; /* panel object */ Widget wPanelist; /* panel object */
#ifdef WSM
WsPresenceData presence; /* workspace presence dialog*/ WsPresenceData presence; /* workspace presence dialog*/
Widget switcherW; /* workspace switcher */ Widget switcherW; /* workspace switcher */
Widget switcherShellW; /* shell for ws switcher */ Widget switcherShellW; /* shell for ws switcher */
#endif /* WSM */
Window wmWorkspaceWin; /* holds wm properties */ Window wmWorkspaceWin; /* holds wm properties */
Window feedbackWin; Window feedbackWin;
Window activeIconTextWin; Window activeIconTextWin;
Window activeLabelParent; Window activeLabelParent;
String displayString; /* used for putenv in F_Exec */ String displayString; /* used for putenv in F_Exec */
#ifdef WSM
int displayResolutionType; int displayResolutionType;
#endif /* WSM */
struct _WmFpEmbeddedClientData *pECD; /* clients living in front panel */ struct _WmFpEmbeddedClientData *pECD; /* clients living in front panel */
int numEmbeddedClients; int numEmbeddedClients;
struct _WmFpPushRecallClientData *pPRCD; /* push_recall clients */ struct _WmFpPushRecallClientData *pPRCD; /* push_recall clients */
@ -1303,12 +1257,10 @@ typedef struct _WmScreenData
Colormap workspaceColormap; Colormap workspaceColormap;
Colormap lastInstalledColormap; Colormap lastInstalledColormap;
struct _WmWorkspaceData *pActiveWS; /* for this screen */ struct _WmWorkspaceData *pActiveWS; /* for this screen */
#ifdef WSM
struct _WmWorkspaceData *pLastWS; /* previously active WS */ struct _WmWorkspaceData *pLastWS; /* previously active WS */
#endif /* WSM */ #if (defined(MWM_QATS_PROTOCOL))
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
CmdTree *cciTree; /* pointer to cci definitions */ CmdTree *cciTree; /* pointer to cci definitions */
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/* per screen caches */ /* per screen caches */
BitmapCache *bitmapCache; BitmapCache *bitmapCache;
@ -1331,14 +1283,11 @@ typedef struct _WmScreenData
GC fadeIconGC; GC fadeIconGC;
GC fadeIconTextGC; GC fadeIconTextGC;
#ifdef WSM
/* per screen configuration outline windows */ /* per screen configuration outline windows */
Window woN; /* North outline window */ Window woN; /* North outline window */
Window woS; /* South outline window */ Window woS; /* South outline window */
Window woE; /* East outline window */ Window woE; /* East outline window */
Window woW; /* West outline window */ Window woW; /* West outline window */
#endif /* WSM */
/* per screen feedback data */ /* per screen feedback data */
unsigned long fbStyle; unsigned long fbStyle;
@ -1359,9 +1308,9 @@ typedef struct _WmScreenData
int actionNbr; int actionNbr;
/* resource description file data: */ /* resource description file data: */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
String rootMenu; /* resource */ String rootMenu; /* resource */
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
String buttonBindings; /* resource */ String buttonBindings; /* resource */
ButtonSpec *buttonSpecs; ButtonSpec *buttonSpecs;
String keyBindings; /* resource */ String keyBindings; /* resource */
@ -1381,9 +1330,6 @@ typedef struct _WmScreenData
Boolean decoupleTitleAppearance; /* see clientTitleAppearance */ Boolean decoupleTitleAppearance; /* see clientTitleAppearance */
int frameBorderWidth; /* resource */ int frameBorderWidth; /* resource */
String feedbackGeometry; /* resource */ String feedbackGeometry; /* resource */
#ifndef WSM
String iconBoxGeometry; /* resource */
#endif /* WSM */
String iconBoxName; /* resource */ String iconBoxName; /* resource */
String iconBoxSBDisplayPolicy; /* resource */ String iconBoxSBDisplayPolicy; /* resource */
int iconBoxScheme; /* resource - testing */ int iconBoxScheme; /* resource - testing */
@ -1402,8 +1348,6 @@ typedef struct _WmScreenData
Boolean iconBoxControl; /* FP control for icon box */ Boolean iconBoxControl; /* FP control for icon box */
Boolean moveOpaque; /* move window not outlines */ Boolean moveOpaque; /* move window not outlines */
#ifdef WSM
/* pixel set info (from color object) */ /* pixel set info (from color object) */
XmPixelSet *pPixelData; /* all pixel data */ XmPixelSet *pPixelData; /* all pixel data */
XmPixelSet *pActivePixelSet; /* ptr into pPixelData */ XmPixelSet *pActivePixelSet; /* ptr into pPixelData */
@ -1412,7 +1356,6 @@ typedef struct _WmScreenData
XmPixelSet *pSecondaryPixelSet; /* ptr into pPixelData */ XmPixelSet *pSecondaryPixelSet; /* ptr into pPixelData */
XmPixelSet *pTextPixelSet; /* ptr into pPixelData */ XmPixelSet *pTextPixelSet; /* ptr into pPixelData */
int colorUse; /* indication from color obj */ int colorUse; /* indication from color obj */
#endif /* WSM */
/* client frame component appearance resources and data: */ /* client frame component appearance resources and data: */
@ -1437,7 +1380,6 @@ typedef struct _WmScreenData
ClientListEntry *clientList; ClientListEntry *clientList;
ClientListEntry *lastClient; ClientListEntry *lastClient;
#ifdef WSM
/* DtSessionHints for clients */ /* DtSessionHints for clients */
struct _DtSessionItem *pDtSessionItems; struct _DtSessionItem *pDtSessionItems;
int totalSessionItems; int totalSessionItems;
@ -1457,12 +1399,6 @@ typedef struct _WmScreenData
DtSvcHandle hWsm; /* WORKSPACEMGR message handle */ DtSvcHandle hWsm; /* WORKSPACEMGR message handle */
Boolean bMarqueeSelectionInitialized; Boolean bMarqueeSelectionInitialized;
#else /* WSM */
/* workspace for this screen */
struct _WmWorkspaceData *pWS;
#endif /* WSM */
} WmScreenData; } WmScreenData;
typedef struct _WmScreenData *PtrScreenData; typedef struct _WmScreenData *PtrScreenData;
@ -1494,21 +1430,12 @@ typedef struct _WmScreenData *PtrScreenData;
#define FADE_ICON_GC(pcd) ((pcd)->pSD->fadeIconGC) #define FADE_ICON_GC(pcd) ((pcd)->pSD->fadeIconGC)
#define FADE_ICON_TEXT_GC(pcd) ((pcd)->pSD->fadeIconTextGC) #define FADE_ICON_TEXT_GC(pcd) ((pcd)->pSD->fadeIconTextGC)
#define DEFAULT_PIXMAP(pcd) ((pcd)->pSD->defaultPixmap) #define DEFAULT_PIXMAP(pcd) ((pcd)->pSD->defaultPixmap)
#ifdef WSM
#define ICON_PLACE(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconPlace) #define ICON_PLACE(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconPlace)
#define ICON_X(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconX) #define ICON_X(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconX)
#define ICON_Y(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconY) #define ICON_Y(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconY)
#define P_ICON_BOX(pcd) ((pcd)->pWsList[(pcd)->currentWsc].pIconBox) #define P_ICON_BOX(pcd) ((pcd)->pWsList[(pcd)->currentWsc].pIconBox)
#define ICON_FRAME_WIN(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconFrameWin) #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 * Definitions for Screen data
*/ */
@ -1589,7 +1516,6 @@ typedef struct _WmActionArg {
String szExecParms; String szExecParms;
} WmActionArg; } WmActionArg;
#endif /* WSM */
@ -1610,14 +1536,12 @@ typedef struct _WmWorkspaceData
{ {
int dataType; int dataType;
#ifdef WSM
WorkspaceID id; WorkspaceID id;
int map_state; int map_state;
BackdropData backdrop; BackdropData backdrop;
Widget buttonW; Widget buttonW;
XmString title; /* resource (visible name) */ XmString title; /* resource (visible name) */
String iconBoxGeometry;/* resource */ String iconBoxGeometry;/* resource */
#endif /* WSM */
String name; /* workspace name */ String name; /* workspace name */
/* (used for resource fetching) */ /* (used for resource fetching) */
@ -1631,11 +1555,9 @@ typedef struct _WmWorkspaceData
struct _ClientData *keyboardFocus; /* ptr to client with the key focus */ struct _ClientData *keyboardFocus; /* ptr to client with the key focus */
struct _ClientData *nextKeyboardFocus; /* next client to get focus */ struct _ClientData *nextKeyboardFocus; /* next client to get focus */
#ifdef WSM
struct _ClientData **ppClients; /* list of client data ptrs */ struct _ClientData **ppClients; /* list of client data ptrs */
unsigned int numClients; /* number of client in list */ unsigned int numClients; /* number of client in list */
unsigned int sizeClientList; /* size of client list */ unsigned int sizeClientList; /* size of client list */
#endif /* WSM */
} WmWorkspaceData; } WmWorkspaceData;
@ -1665,9 +1587,6 @@ typedef struct _WmWorkspaceData *PtrWorkspaceData;
#define ACTIVE_LABEL_PARENT(pcd) ((pcd)->pSD->activeLabelParent) #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 ICON_BOX_TITLE(pcd) ((pcd)->pSD->iconBoxTitle)
#define TRANSIENT_DECORATION(pcd) ((pcd)->pSD->transientDecoration) #define TRANSIENT_DECORATION(pcd) ((pcd)->pSD->transientDecoration)
@ -1707,10 +1626,8 @@ typedef struct _ClientData
int wmUnmapCount; int wmUnmapCount;
struct _WmFpEmbeddedClientData *pECD; /* embedded client data */ struct _WmFpEmbeddedClientData *pECD; /* embedded client data */
struct _WmFpPushRecallClientData *pPRCD; /* embedded client data */ struct _WmFpPushRecallClientData *pPRCD; /* embedded client data */
#ifdef WSM
Atom * paInitialProperties; /* initial window properties */ Atom * paInitialProperties; /* initial window properties */
int numInitialProperties; /* number of initial properties */ int numInitialProperties; /* number of initial properties */
#endif /* WSM */
/* client supported protocols: */ /* client supported protocols: */
@ -1740,9 +1657,6 @@ typedef struct _ClientData
#ifndef NO_OL_COMPAT #ifndef NO_OL_COMPAT
Boolean bPseudoTransient; /* transientFor window group */ Boolean bPseudoTransient; /* transientFor window group */
#endif /* NO_OL_COMPAT */ #endif /* NO_OL_COMPAT */
#ifndef WSM
IconBoxData *pIconBox; /* icon box for this win */
#endif /* WSM */
IconBoxData *thisIconBox; /* icon box data for self */ IconBoxData *thisIconBox; /* icon box data for self */
/* if this is an icon box */ /* if this is an icon box */
Context grabContext; /* used to support 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 *transientLeader; /* trans leader of this win */
struct _ClientData *transientChildren; /* transients of this win */ struct _ClientData *transientChildren; /* transients of this win */
struct _ClientData *transientSiblings; /* related transient win's */ struct _ClientData *transientSiblings; /* related transient win's */
#ifdef WSM
int primaryStackPosition; /* stack pos'n of primary */ int primaryStackPosition; /* stack pos'n of primary */
Boolean secondariesOnTop; /* resource */ Boolean secondariesOnTop; /* resource */
#endif /* WSM */
int primaryModalCount; /* primary modal win count */ int primaryModalCount; /* primary modal win count */
int fullModalCount; /* full modal win count */ int fullModalCount; /* full modal win count */
@ -1860,12 +1772,6 @@ typedef struct _ClientData
long iconFlags; long iconFlags;
XmString iconTitle; /* WM_ICON_NAME field */ 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 iconPixmap; /* WM_HINTS field */
Pixmap iconMask; /* WM_HINTS field */ Pixmap iconMask; /* WM_HINTS field */
Window iconWindow; /* WM_HINTS field */ Window iconWindow; /* WM_HINTS field */
@ -1874,7 +1780,6 @@ typedef struct _ClientData
/* to reflect the */ /* to reflect the */
RList *piconBottomShadows; /* depressed icon image */ RList *piconBottomShadows; /* depressed icon image */
#ifdef WSM
/* workspace data */ /* workspace data */
int absentMapBehavior; /* resource */ int absentMapBehavior; /* resource */
@ -1890,7 +1795,6 @@ typedef struct _ClientData
Window attachWindow; /* _DT_WM_HINTS */ Window attachWindow; /* _DT_WM_HINTS */
SlideDirection slideDirection; /* slide-up direction */ SlideDirection slideDirection; /* slide-up direction */
SlideOutRec *pSOR; /* slide-out record */ SlideOutRec *pSOR; /* slide-out record */
#endif /* WSM */
#ifndef NO_SHAPE #ifndef NO_SHAPE
short wShaped; /* this window has a bounding shape */ short wShaped; /* this window has a bounding shape */
#endif /* NO_SHAPE */ #endif /* NO_SHAPE */
@ -1921,15 +1825,13 @@ typedef struct _ClientData *PtrClientData;
#define NORMAL_STATE 1 #define NORMAL_STATE 1
#define MINIMIZED_STATE 2 #define MINIMIZED_STATE 2
#define MAXIMIZED_STATE 3 #define MAXIMIZED_STATE 3
#ifdef WSM
#define UNSEEN_STATE 8 #define UNSEEN_STATE 8
#endif /* WSM */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# define NO_CHANGE -1 # define NO_CHANGE -1
# define UNSET 0 # define UNSET 0
# define SET 1 # define SET 1
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/* clientFlags field values: */ /* clientFlags field values: */
#define CLIENT_HINTS_TITLE (1L << 0) #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 FRONT_PANEL_BOX (1L << 14) /* a DT 3.0 front panel */
#define GOT_DT_WM_HINTS (1L << 15) #define GOT_DT_WM_HINTS (1L << 15)
#ifdef WSM
#define SM_LAUNCHED (1L << 17) /* launched by dtsession */ #define SM_LAUNCHED (1L << 17) /* launched by dtsession */
#endif /* WSM */
#define SM_X (1L << 18) /* X from DB/dtsession */ #define SM_X (1L << 18) /* X from DB/dtsession */
#define SM_Y (1L << 19) /* Y from DB/dtsession */ #define SM_Y (1L << 19) /* Y from DB/dtsession */
@ -1991,8 +1891,7 @@ typedef struct _ClientData *PtrClientData;
/* global return buffer */ /* global return buffer */
#define MAXWMPATH 1023 #define MAXWMPATH 1023
#define MAXBUF (MAXWMPATH+1) #define MAXBUF (MAXWMPATH+1)
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* WsClientData * WsClientData
@ -2015,7 +1914,6 @@ typedef struct _WsClientData
} WsClientData; } WsClientData;
#endif /* WSM */
/* /*
* frame style types * frame style types
@ -2047,9 +1945,7 @@ typedef struct _WmGlobalData
char **environ; /* environment vector */ char **environ; /* environment vector */
char *mwmName; /* name of our executable */ char *mwmName; /* name of our executable */
Widget topLevelW; Widget topLevelW;
#ifdef WSM
Widget topLevelW1; /* from which WM components hang */ Widget topLevelW1; /* from which WM components hang */
#endif /* WSM */
Boolean confirmDialogMapped; /* confirm dialog is mapped */ Boolean confirmDialogMapped; /* confirm dialog is mapped */
XtAppContext mwmAppContext; /* application context for mwm */ XtAppContext mwmAppContext; /* application context for mwm */
XContext windowContextType; /* window context for XSaveContext */ XContext windowContextType; /* window context for XSaveContext */
@ -2057,21 +1953,17 @@ typedef struct _WmGlobalData
#ifndef IBM_169380 #ifndef IBM_169380
XContext cmapWindowContextType; /* list of pCD's in WM_COLORMAP_WINDOWS context for XSaveContext */ XContext cmapWindowContextType; /* list of pCD's in WM_COLORMAP_WINDOWS context for XSaveContext */
#endif #endif
#ifdef WSM
XContext mwmWindowContextType; /* mwm win context for XSaveContext */ XContext mwmWindowContextType; /* mwm win context for XSaveContext */
Window dtSmWindow; /* used for contention management */ Window dtSmWindow; /* used for contention management */
Window commandWindow; /* WM_SAVE_YOURSELF win for dtwm */ Window commandWindow; /* WM_SAVE_YOURSELF win for dtwm */
#endif /* WSM */
/* presentation resource id's: */ /* presentation resource id's: */
String displayString; /* used for putenv in F_Exec */ String displayString; /* used for putenv in F_Exec */
Display *display; /* display we are running to */ Display *display; /* display we are running to */
#ifdef WSM
Display *display1; /* second display connection */ Display *display1; /* second display connection */
int statusColorServer; /* CSERVE_NORMAL, CSERVE_NOT_AVAILABLE */ int statusColorServer; /* CSERVE_NORMAL, CSERVE_NOT_AVAILABLE */
DtWmpParseBuf *pWmPB; /* global parse buffer */ DtWmpParseBuf *pWmPB; /* global parse buffer */
#endif /* WSM */
int numScreens; /* number of screens */ int numScreens; /* number of screens */
unsigned char **screenNames; /* default names for screens */ unsigned char **screenNames; /* default names for screens */
WmScreenData *Screens; /* array of screen info */ WmScreenData *Screens; /* array of screen info */
@ -2136,10 +2028,6 @@ typedef struct _WmGlobalData
/* Resource database used to restore client geometries, etc. */ /* Resource database used to restore client geometries, etc. */
XrmDatabase clientResourceDB; XrmDatabase clientResourceDB;
#ifndef WSM
char *dbFileName;
String sessionClientDB; /* resource */
#endif
/* atoms used in inter-client communication: */ /* atoms used in inter-client communication: */
@ -2156,7 +2044,7 @@ typedef struct _WmGlobalData
Atom xa_MWM_INFO; Atom xa_MWM_INFO;
Atom xa_MWM_OFFSET; Atom xa_MWM_OFFSET;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
Atom *xa_WM; Atom *xa_WM;
Atom xa_TARGETS; Atom xa_TARGETS;
@ -2181,7 +2069,7 @@ typedef struct _WmGlobalData
/* automation support */ /* automation support */
Atom _MOTIF_WM_AUTOMATION; Atom _MOTIF_WM_AUTOMATION;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
Atom xa_MOTIF_BINDINGS; Atom xa_MOTIF_BINDINGS;
Atom xa_COMPOUND_TEXT; Atom xa_COMPOUND_TEXT;
@ -2189,8 +2077,6 @@ typedef struct _WmGlobalData
Atom xa_WMSAVE_HINT; Atom xa_WMSAVE_HINT;
#ifdef WSM
/* atoms used for workspace management: */ /* atoms used for workspace management: */
Atom xa_DT_WORKSPACE_HINTS; Atom xa_DT_WORKSPACE_HINTS;
@ -2211,7 +2097,7 @@ typedef struct _WmGlobalData
Atom xa_DT_WM_EXIT_SESSION; Atom xa_DT_WM_EXIT_SESSION;
Atom xa_DT_WM_LOCK_DISPLAY; Atom xa_DT_WM_LOCK_DISPLAY;
Atom xa_DT_WM_READY; Atom xa_DT_WM_READY;
#endif /* WSM */
#ifndef NO_OL_COMPAT #ifndef NO_OL_COMPAT
Atom xa_OL_WIN_ATTR; Atom xa_OL_WIN_ATTR;
Atom xa_OL_DECOR_RESIZE; Atom xa_OL_DECOR_RESIZE;
@ -2236,23 +2122,17 @@ typedef struct _WmGlobalData
Boolean autoKeyFocus; /* resource */ Boolean autoKeyFocus; /* resource */
int autoRaiseDelay; /* resource */ int autoRaiseDelay; /* resource */
String bitmapDirectory; /* resource */ String bitmapDirectory; /* resource */
#ifdef WSM
String backdropDirs; /* resource */ String backdropDirs; /* resource */
#endif /* WSM */
Boolean clientAutoPlace; /* resource */ Boolean clientAutoPlace; /* resource */
int colormapFocusPolicy; /* resource */ int colormapFocusPolicy; /* resource */
String configFile; /* resource */ String configFile; /* resource */
#ifdef WSM
String cppCommand; /* resource */ String cppCommand; /* resource */
#endif /* WSM */
Boolean deiconifyKeyFocus; /* resource */ Boolean deiconifyKeyFocus; /* resource */
int doubleClickTime; /* resource */ int doubleClickTime; /* resource */
Boolean enableWarp; /* resource */ Boolean enableWarp; /* resource */
Boolean enforceKeyFocus; /* resource */ Boolean enforceKeyFocus; /* resource */
Boolean freezeOnConfig; /* resource - testing */ Boolean freezeOnConfig; /* resource - testing */
#ifdef WSM
Boolean useWindowOutline; /* resource */ Boolean useWindowOutline; /* resource */
#endif /* WSM */
Boolean iconAutoPlace; /* resource */ Boolean iconAutoPlace; /* resource */
Boolean iconClick; /* resource */ Boolean iconClick; /* resource */
Boolean interactivePlacement; /* resource */ Boolean interactivePlacement; /* resource */
@ -2269,26 +2149,21 @@ typedef struct _WmGlobalData
Boolean multiScreen; /* resource */ Boolean multiScreen; /* resource */
String screenList; /* resource */ String screenList; /* resource */
int showFeedback; /* resource */ int showFeedback; /* resource */
#ifdef WSM
Boolean refreshByClearing; /* resource */ Boolean refreshByClearing; /* resource */
Boolean rootButtonClick; /* resource */ Boolean rootButtonClick; /* resource */
#endif /* WSM */
Boolean startupKeyFocus; /* resource */ Boolean startupKeyFocus; /* resource */
Boolean systemButtonClick; /* resource */ Boolean systemButtonClick; /* resource */
Boolean systemButtonClick2; /* resource */ Boolean systemButtonClick2; /* resource */
Boolean useLargeCursors; Boolean useLargeCursors;
Boolean useFrontPanel; /* resource */ Boolean useFrontPanel; /* resource */
#ifdef WSM
String helpDirectory; /* resource */ String helpDirectory; /* resource */
Window requestContextWin; /* for WmRequest f.fcns */ Window requestContextWin; /* for WmRequest f.fcns */
#endif /* WSM */
Boolean dtLite; /* resource */ Boolean dtLite; /* resource */
Boolean blinkOnExec; /* resource */ Boolean blinkOnExec; /* resource */
WmScreenData *dtSD; /* screen for front panel */ WmScreenData *dtSD; /* screen for front panel */
int iSlideUpsInProgress; int iSlideUpsInProgress;
Boolean waitForClicks; /* resource */ Boolean waitForClicks; /* resource */
FrameStyle frameStyle; /* resource */ FrameStyle frameStyle; /* resource */
#ifdef WSM
Dimension iconExternalShadowWidth; /* resource */ Dimension iconExternalShadowWidth; /* resource */
Dimension frameExternalShadowWidth; /* resource */ Dimension frameExternalShadowWidth; /* resource */
int marqueeSelectGranularity; /* resource */ int marqueeSelectGranularity; /* resource */
@ -2297,7 +2172,6 @@ typedef struct _WmGlobalData
Boolean bReplayedButton; /* true if button replayed */ Boolean bReplayedButton; /* true if button replayed */
Boolean bSuspendSecondaryRestack; /* overrides transient Boolean bSuspendSecondaryRestack; /* overrides transient
stacking */ stacking */
#endif /* WSM */
XmString clientDefaultTitle; XmString clientDefaultTitle;
XmString iconDefaultTitle; XmString iconDefaultTitle;
@ -2329,9 +2203,7 @@ typedef struct _WmGlobalData
/* quick references to global data: */ /* quick references to global data: */
#define DISPLAY wmGD.display #define DISPLAY wmGD.display
#ifdef WSM
#define DISPLAY1 wmGD.display1 #define DISPLAY1 wmGD.display1
#endif /* WSM */
#define ACTIVE_PSD (wmGD.pActiveSD) #define ACTIVE_PSD (wmGD.pActiveSD)
#define ACTIVE_SCREEN (wmGD.pActiveSD->screen) #define ACTIVE_SCREEN (wmGD.pActiveSD->screen)
#define ACTIVE_WS (wmGD.pActiveSD->pActiveWS) #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 */ /* According to the xkb protocol bits 13 and 14 are interpreted as a */
/* two-bit unsigned numeric value and report the state keyboard group */ /* two-bit unsigned numeric value and report the state keyboard group */
#define NOLOCKMOD(state) ((state) & ~wmGD.lockingModMask & ~(3 << 13)) #define NOLOCKMOD(state) ((state) & ~wmGD.lockingModMask & ~(3 << 13))
#ifdef WSM
/* absent map behavior policy values (absentMapBehavior): */ /* absent map behavior policy values (absentMapBehavior): */
#define AMAP_BEHAVIOR_ADD 0 #define AMAP_BEHAVIOR_ADD 0
#define AMAP_BEHAVIOR_MOVE 1 #define AMAP_BEHAVIOR_MOVE 1
#define AMAP_BEHAVIOR_IGNORE 2 #define AMAP_BEHAVIOR_IGNORE 2
#endif /* WSM */
/* colormap focus policy values (colormapFocus): */ /* colormap focus policy values (colormapFocus): */
#define CMAP_FOCUS_EXPLICIT 0 #define CMAP_FOCUS_EXPLICIT 0
@ -2399,9 +2269,7 @@ typedef struct _WmGlobalData
#define MOVE_CLIENT 1 #define MOVE_CLIENT 1
#define RESIZE_CLIENT 2 #define RESIZE_CLIENT 2
#define PLACE_CLIENT 3 #define PLACE_CLIENT 3
#ifdef WSM
#define MARQUEE_SELECT 4 #define MARQUEE_SELECT 4
#endif /* WSM */
/* Motif input bindings file name */ /* Motif input bindings file name */
#define MOTIF_BINDINGS_FILE ".motifbind" #define MOTIF_BINDINGS_FILE ".motifbind"
@ -2486,13 +2354,9 @@ extern char *_DtGetMessage(char *filename, int set, int n, char *s);
# else /* __ultrix */ # else /* __ultrix */
# define _CLIENT_CAT_NAME "dtwm" # define _CLIENT_CAT_NAME "dtwm"
# endif /* __ultrix */ # endif /* __ultrix */
# ifdef WSM
# define GETMESSAGE(set, number, string)\ # define GETMESSAGE(set, number, string)\
_DtGetMessage(_CLIENT_CAT_NAME, set, number, string) _DtGetMessage(_CLIENT_CAT_NAME, set, number, string)
#else #else
# define GETMESSAGE(set, number, string) (string)
# endif /* WSM */
#else
# define GETMESSAGE(set, number, string)\ # define GETMESSAGE(set, number, string)\
string string
#endif #endif

View file

@ -1110,42 +1110,22 @@ void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y, char *string,
* B/W displays. * B/W displays.
* *
*************************************<->***********************************/ *************************************<->***********************************/
#ifdef WSM
void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
XmString xmstring, GC gc, Position x, Position y, XmString xmstring, GC gc, Position x, Position y,
Dimension width, XRectangle *pbox, Boolean bCenter) 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; Dimension textWidth;
#ifdef WSM
int alignment; int alignment;
#else /* WSM */
int alignment = XmALIGNMENT_BEGINNING;
#endif /* WSM */
textWidth = XmStringWidth(xmfontlist, xmstring); textWidth = XmStringWidth(xmfontlist, xmstring);
#ifdef WSM
alignment = bCenter ? XmALIGNMENT_CENTER : XmALIGNMENT_BEGINNING; alignment = bCenter ? XmALIGNMENT_CENTER : XmALIGNMENT_BEGINNING;
if (textWidth >= pbox->width) /* can't center text if no room */ if (textWidth >= pbox->width) /* can't center text if no room */
{ /* left justify & clip text */ { /* left justify & clip text */
alignment = XmALIGNMENT_BEGINNING; 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) if (ACTIVE_PSD->cleanText)
{ {
@ -1160,8 +1140,6 @@ void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
} }
} /* END OF FUNCTION WmDrawXmString */ } /* END OF FUNCTION WmDrawXmString */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* WmInstallBitmapIntoXmCache (pchName, bitmap, width, height) * WmInstallBitmapIntoXmCache (pchName, bitmap, width, height)
@ -1258,4 +1236,3 @@ void WmInstallBitmapDataIntoXmCache (WmScreenData *pSD,
} }
} /* END OF FUNCTION WmInstallBitmapDataIntoXmCache */ } /* END OF FUNCTION WmInstallBitmapDataIntoXmCache */
#endif /* WSM */

View file

@ -52,16 +52,10 @@ extern void StretcherCorner (RList *prTop, RList *prBot, int x, int y,
unsigned int cwidth, unsigned int cheight); unsigned int cwidth, unsigned int cheight);
extern void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y, extern void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y,
char *string, unsigned int length); char *string, unsigned int length);
#ifdef WSM
extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
XmString xmstring, GC gc, Position x, Position y, XmString xmstring, GC gc, Position x, Position y,
Dimension width, XRectangle *pbox, Dimension width, XRectangle *pbox,
Boolean bCenter); 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); extern GC WmGetGC (WmScreenData *pSD, unsigned long gc_mask, XGCValues *pGcv);

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY * (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
@ -3038,7 +3037,6 @@ wmDtErrorDialogPopupCB(
} /* END OF FUNCTION wmDtErrorDialogPopupCB */ } /* END OF FUNCTION wmDtErrorDialogPopupCB */
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
@ -82,4 +81,3 @@ extern void WmDtWmTopicHelpCB (Widget theWidget,
/******** End Public Function Declarations ********/ /******** End Public Function Declarations ********/
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -255,7 +255,6 @@ static unsigned char fntpl_i_bm_bits[] = {
#endif /* DTWM_NEED_FNTPL */ #endif /* DTWM_NEED_FNTPL */
#ifdef WSM
/* /*
* Backdrop bitmap patterns * Backdrop bitmap patterns
*/ */
@ -297,7 +296,6 @@ static unsigned char bits6_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#endif /* DTWM_NEED_BACKBITS */ #endif /* DTWM_NEED_BACKBITS */
#endif /* WSM */
/* /*
* *
* Used to define the small hourglass and mask used to indicate * 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}; 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f};
#endif /* DTWM_NEED_TIME16 */ #endif /* DTWM_NEED_TIME16 */
#ifdef WSM
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -47,9 +47,7 @@
#include "WmIconBox.h" #include "WmIconBox.h"
#include "WmMenu.h" #include "WmMenu.h"
#include "WmWinInfo.h" #include "WmWinInfo.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
@ -100,9 +98,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
unsigned long attr_mask; unsigned long attr_mask;
int xOffset; int xOffset;
int yOffset; int yOffset;
#ifdef WSM
WsClientData *pWsc = GetWsClientData (pWS, pcd); WsClientData *pWsc = GetWsClientData (pWS, pcd);
#endif /* WSM */
/* /*
@ -145,24 +141,13 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
ICON_APPEARANCE(pcd).background; ICON_APPEARANCE(pcd).background;
} }
#ifdef WSM
if ((!pcd->pSD->useIconBox) || if ((!pcd->pSD->useIconBox) ||
(pcd->clientFlags & (CLIENT_WM_CLIENTS | FRONT_PANEL_BOX))) (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, pWsc->iconFrameWin = XCreateWindow (DISPLAY,
ROOT_FOR_CLIENT(pcd), /* parent */ ROOT_FOR_CLIENT(pcd), /* parent */
pWsc->iconX, pWsc->iconX,
pWsc->iconY, 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_WIDTH(pcd),
(unsigned int) ICON_HEIGHT(pcd), (unsigned int) ICON_HEIGHT(pcd),
0, /* border width */ 0, /* border width */
@ -183,11 +168,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
*/ */
if ((pcd->pSD->useIconBox) && if ((pcd->pSD->useIconBox) &&
#ifdef WSM
(!(pcd->clientFlags & CLIENT_WM_CLIENTS)) && (!(pcd->clientFlags & CLIENT_WM_CLIENTS)) &&
#else
(!(pcd->clientFlags & ICON_BOX)) &&
#endif /* WSM */
(pcd->clientFunctions & MWM_FUNC_MINIMIZE) ) (pcd->clientFunctions & MWM_FUNC_MINIMIZE) )
{ {
if (!InsertIconIntoBox(pWS->pIconBox, pcd)) if (!InsertIconIntoBox(pWS->pIconBox, pcd))
@ -244,9 +225,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
ReparentIconWindow (pcd, xOffset, yOffset); ReparentIconWindow (pcd, xOffset, yOffset);
} }
#ifdef WSM
if (pcd->piconTopShadows->used == 0) if (pcd->piconTopShadows->used == 0)
#endif /* WSM */
MakeIconShadows (pcd, xOffset, yOffset); MakeIconShadows (pcd, xOffset, yOffset);
return(TRUE); return(TRUE);
@ -860,13 +839,9 @@ void DrawIconTitle (ClientData *pcd)
GetIconTitleBox (pcd, &textBox); GetIconTitleBox (pcd, &textBox);
/* get appropriate GCs */ /* get appropriate GCs */
#ifdef WSM
if ((ACTIVE_PSD->useIconBox && if ((ACTIVE_PSD->useIconBox &&
!((pcd->dtwmBehaviors & (DtWM_BEHAVIOR_PANEL)) || !((pcd->dtwmBehaviors & (DtWM_BEHAVIOR_PANEL)) ||
(pcd->clientFlags & CLIENT_WM_CLIENTS))) || (pcd->clientFlags & CLIENT_WM_CLIENTS))) ||
#else
if ((ACTIVE_PSD->useIconBox && !(pcd->clientFlags & ICON_BOX)) ||
#endif /* WSM */
!(wmGD.keyboardFocus == pcd)) !(wmGD.keyboardFocus == pcd))
{ {
iconGC = ICON_APPEARANCE(pcd).inactiveGC; iconGC = ICON_APPEARANCE(pcd).inactiveGC;
@ -892,15 +867,9 @@ void DrawIconTitle (ClientData *pcd)
/* paint the text */ /* paint the text */
#ifdef WSM
WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList, WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList,
pcd->iconTitle, iconGC, pcd->iconTitle, iconGC,
textBox.x, textBox.y, textBox.width, &textBox, True); 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 */ } /* END OF FUNCTION DrawIconTitle */
@ -952,13 +921,8 @@ void RedisplayIconTitle (ClientData *pcd)
* Get appropriate GCs * Get appropriate GCs
* Dim text if this is in the icon box and the client is mapped * Dim text if this is in the icon box and the client is mapped
*/ */
#ifdef WSM
if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) && if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) &&
!(pcd->clientFlags & CLIENT_WM_CLIENTS)) || !(pcd->clientFlags & CLIENT_WM_CLIENTS)) ||
#else
if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) &&
!(pcd->clientFlags & ICON_BOX)) ||
#endif /* WSM */
!(wmGD.keyboardFocus == pcd)) !(wmGD.keyboardFocus == pcd))
{ {
iconGC = ICON_APPEARANCE(pcd).inactiveGC; iconGC = ICON_APPEARANCE(pcd).inactiveGC;
@ -984,18 +948,11 @@ void RedisplayIconTitle (ClientData *pcd)
FALSE); FALSE);
/* in with the new */ /* in with the new */
#ifdef WSM
WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd),
ICON_APPEARANCE(pcd).fontList, ICON_APPEARANCE(pcd).fontList,
pcd->iconTitle, iconGC, pcd->iconTitle, iconGC,
textBox.x, textBox.y, textBox.width, &textBox, textBox.x, textBox.y, textBox.width, &textBox,
True); 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 * Erase & paint text in the active icon text window
@ -1825,17 +1782,10 @@ void PaintActiveIconText (ClientData *pcd, Boolean erase)
FALSE); FALSE);
} }
#ifdef WSM
WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin, WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin,
ICON_APPEARANCE(pcd).fontList, ICON_APPEARANCE(pcd).fontList,
pcd->iconTitle, iconGC, pcd->iconTitle, iconGC,
textBox.x, textBox.y, textBox.width, &textBox, True); 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 */ } /* END OF FUNCTION PaintActiveIconText */

View file

@ -859,11 +859,7 @@ RequestMsgCB(Tt_message m, Tt_pattern p)
pCD = clients[i]; pCD = clients[i];
strcpy(ptr, pCD->smClientID); strcpy(ptr, pCD->smClientID);
clientWorkspaces[i] = clientWorkspaces[i] =
#ifdef WSM
pCD->pWsList[pCD->currentWsc].wsID; pCD->pWsList[pCD->currentWsc].wsID;
#else
pCD->pSD->pWS->id;
#endif
} }
} }
} }

View file

@ -44,9 +44,7 @@
#include "WmIDecor.h" #include "WmIDecor.h"
#include "WmIconBox.h" #include "WmIconBox.h"
#include "WmWinConf.h" #include "WmWinConf.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
/* /*
@ -802,9 +800,7 @@ void PackRootIcons (void)
ClientData *pCD; ClientData *pCD;
ClientData *pCD_active; ClientData *pCD_active;
int hasActiveText = 1; int hasActiveText = 1;
#ifdef WSM
WsClientData *pWsc; WsClientData *pWsc;
#endif /* WSM */
/* /*
* find context of the activeIconTextWin to get pCD and then * find context of the activeIconTextWin to get pCD and then
@ -841,39 +837,23 @@ void PackRootIcons (void)
MoveIconInfo (&ACTIVE_WS->IPData, iOld, iNew); MoveIconInfo (&ACTIVE_WS->IPData, iOld, iNew);
pCD = ACTIVE_WS->IPData.placeList[iNew].pCD; pCD = ACTIVE_WS->IPData.placeList[iNew].pCD;
#ifdef WSM
pWsc = GetWsClientData (ACTIVE_WS, pCD); pWsc = GetWsClientData (ACTIVE_WS, pCD);
pWsc->iconPlace = iNew; pWsc->iconPlace = iNew;
CvtIconPlaceToPosition (&ACTIVE_WS->IPData, CvtIconPlaceToPosition (&ACTIVE_WS->IPData,
pWsc->iconPlace, &pWsc->iconX, &pWsc->iconY); 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)) if (hasActiveText && (pCD == pCD_active))
{ {
/* hide activeIconTextWin first */ /* hide activeIconTextWin first */
HideActiveIconText ((WmScreenData *)NULL); HideActiveIconText ((WmScreenData *)NULL);
#ifdef WSM
XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX, XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX,
pWsc->iconY); pWsc->iconY);
#else /* WSM */
XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX,
pCD->iconY);
#endif /* WSM */
ShowActiveIconText (pCD); ShowActiveIconText (pCD);
} }
else else
{ {
#ifdef WSM
XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX, XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX,
pWsc->iconY); 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) void MoveIconInfo (IconPlacementData *pIPD, int p1, int p2)
{ {
#ifdef WSM
WsClientData *pWsc; WsClientData *pWsc;
#endif /* WSM */
/* only move if destination is empty */ /* only move if destination is empty */
if (pIPD->placeList[p2].pCD == NULL) if (pIPD->placeList[p2].pCD == NULL)
{ {
pIPD->placeList[p2].pCD = pIPD->placeList[p1].pCD; pIPD->placeList[p2].pCD = pIPD->placeList[p1].pCD;
pIPD->placeList[p2].theWidget = pIPD->placeList[p1].theWidget; pIPD->placeList[p2].theWidget = pIPD->placeList[p1].theWidget;
#ifdef WSM
pWsc = GetWsClientData (pIPD->placeList[p2].pCD->pSD->pActiveWS, pWsc = GetWsClientData (pIPD->placeList[p2].pCD->pSD->pActiveWS,
pIPD->placeList[p2].pCD); pIPD->placeList[p2].pCD);
pWsc->iconPlace = p2; pWsc->iconPlace = p2;
#else /* WSM */
pIPD->placeList[p2].pCD->iconPlace = p2;
#endif /* WSM */
pIPD->placeList[p1].pCD = NULL; pIPD->placeList[p1].pCD = NULL;
pIPD->placeList[p1].theWidget = NULL; pIPD->placeList[p1].theWidget = NULL;
} }
} }
#ifdef WSM
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -39,9 +39,7 @@
*/ */
#include "WmGlobal.h" #include "WmGlobal.h"
#ifdef WSM
#include "WmHelp.h" #include "WmHelp.h"
#endif /* WSM */
#include <X11/StringDefs.h> #include <X11/StringDefs.h>
#include <X11/Intrinsic.h> #include <X11/Intrinsic.h>
#include <X11/Shell.h> #include <X11/Shell.h>
@ -89,9 +87,7 @@
#include "WmResParse.h" #include "WmResParse.h"
#include "WmResource.h" #include "WmResource.h"
#include "WmWinInfo.h" #include "WmWinInfo.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
#ifndef MAX #ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b))
@ -129,16 +125,13 @@ Const char *szvertical = "vertical";
void InitIconBox (WmScreenData *pSD) void InitIconBox (WmScreenData *pSD)
{ {
#ifdef WSM
int iws; int iws;
#endif /* WSM */
/* /*
* Start the process of making the icon boxes * Start the process of making the icon boxes
*/ */
#ifdef WSM
/* /*
* Manage a separate icon box in every workspace * Manage a separate icon box in every workspace
* on this screen. * on this screen.
@ -148,10 +141,6 @@ void InitIconBox (WmScreenData *pSD)
AddIconBoxForWorkspace (&pSD->pWS[iws]); AddIconBoxForWorkspace (&pSD->pWS[iws]);
} }
#else /* WSM */
ManageWindow (pSD, None, MANAGEW_ICON_BOX);
#endif /* WSM */
if (pSD->fadeNormalIcon) if (pSD->fadeNormalIcon)
{ {
MakeFadeIconGC (pSD); MakeFadeIconGC (pSD);
@ -160,8 +149,6 @@ void InitIconBox (WmScreenData *pSD)
} /* END OF FUNCTION InitIconBox */ } /* END OF FUNCTION InitIconBox */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* AddIconBoxForWorkspace (pWS) * AddIconBoxForWorkspace (pWS)
@ -182,9 +169,7 @@ void AddIconBoxForWorkspace (WmWorkspaceData *pWS)
ManageWindow (pWS->pSD, None, MANAGEW_ICON_BOX); ManageWindow (pWS->pSD, None, MANAGEW_ICON_BOX);
} /* END OF FUNCTION AddIconBoxForWorkspace */ } /* END OF FUNCTION AddIconBoxForWorkspace */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
* *
* MakeIconBox (pWS, pCD); * MakeIconBox (pWS, pCD);
@ -284,8 +269,6 @@ Boolean MakeIconBox (WmWorkspaceData *pWS, ClientData *pCD)
} /* END OF FUNCTION MakeIconBox */ } /* END OF FUNCTION MakeIconBox */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* DestroyIconBox (pWS) * DestroyIconBox (pWS)
@ -328,9 +311,7 @@ void DestroyIconBox (WmWorkspaceData *pWS)
XtFree ((char *) pIBD); XtFree ((char *) pIBD);
} /* END OF FUNCTION DestroyIconBox */ } /* END OF FUNCTION DestroyIconBox */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
* *
* MakeShell (pWS, pIBD) * MakeShell (pWS, pIBD)
@ -367,9 +348,7 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD)
Arg setArgs[20]; Arg setArgs[20];
int i; int i;
#ifdef WSM
char *pchIBTitle = NULL; char *pchIBTitle = NULL;
#endif /* WSM */
/* /*
* Create top level application shell for icon box * 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++; 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) if (pWS->pSD->iconBoxTitle)
{ {
pchIBTitle = WmXmStringToString (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], XmNtitle, (XtArgVal)pchIBTitle); i++;
XtSetArg (setArgs[i], XmNiconName, (XtArgVal)pchIBTitle); i++; XtSetArg (setArgs[i], XmNiconName, (XtArgVal)pchIBTitle); i++;
} }
#endif /* WSM */
XtSetArg (setArgs[i], XmNmappedWhenManaged, (XtArgVal)False); i++; XtSetArg (setArgs[i], XmNmappedWhenManaged, (XtArgVal)False); i++;
XtSetArg (setArgs[i], XmNdialogStyle, (XtArgVal)XmDIALOG_MODELESS); i++; XtSetArg (setArgs[i], XmNdialogStyle, (XtArgVal)XmDIALOG_MODELESS); i++;
XtSetArg (setArgs[i], XmNdepth, XtSetArg (setArgs[i], XmNdepth,
@ -407,19 +376,12 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD)
XtSetArg (setArgs[i], XmNscreen, XtSetArg (setArgs[i], XmNscreen,
(XtArgVal) ScreenOfDisplay (DISPLAY, pWS->pSD->screen)); i++; (XtArgVal) ScreenOfDisplay (DISPLAY, pWS->pSD->screen)); i++;
#ifdef WSM
pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNclient, pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNclient,
topLevelShellWidgetClass, topLevelShellWidgetClass,
pWS->workspaceTopLevelW, pWS->workspaceTopLevelW,
(ArgList)setArgs, i); (ArgList)setArgs, i);
if (pchIBTitle != NULL) XtFree (pchIBTitle); if (pchIBTitle != NULL) XtFree (pchIBTitle);
#else /* WSM */
pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNiconBox,
topLevelShellWidgetClass,
pWS->workspaceTopLevelW,
(ArgList)setArgs, i);
#endif /* WSM */
} /* END OF FUNCTION MakeShell */ } /* END OF FUNCTION MakeShell */
@ -466,17 +428,6 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
*/ */
i=0; 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], XmNborderWidth, (XtArgVal) 0 ); i++;
XtSetArg (setArgs[i], XmNmarginWidth, (XtArgVal) 0 ); i++; XtSetArg (setArgs[i], XmNmarginWidth, (XtArgVal) 0 ); i++;
XtSetArg (setArgs[i], XmNmarginHeight, (XtArgVal) 0 ); i++; XtSetArg (setArgs[i], XmNmarginHeight, (XtArgVal) 0 ); i++;
@ -488,11 +439,9 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
pIBD->shellWidget, pIBD->shellWidget,
(ArgList)setArgs, i); (ArgList)setArgs, i);
#ifdef WSM
XtAddCallback (pIBD->frameWidget, XmNhelpCallback, XtAddCallback (pIBD->frameWidget, XmNhelpCallback,
WmDtWmTopicHelpCB, WM_DT_ICONBOX_TOPIC); WmDtWmTopicHelpCB, WM_DT_ICONBOX_TOPIC);
#endif /* WSM */
/* /*
* Create scrolled window to hold row column manager * 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], XmNborderWidth , (XtArgVal) 0 ); i++;
XtSetArg (setArgs[i], XmNspacing , (XtArgVal) IB_MARGIN_WIDTH ); 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 * do we want to get these from a resource or set it here
* to control the appearance of the iconBox * to control the appearance of the iconBox
@ -596,17 +535,6 @@ void MakeBulletinBoard (WmWorkspaceData *pWS, IconBoxData *pIBD)
#endif /* DEBUG_ICON_BOX */ #endif /* DEBUG_ICON_BOX */
XtSetArg (setArgs[i], XmNshadowThickness,(XtArgVal) 0); i++; 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], XmNspacing , 0); i++;
XtSetArg (setArgs[i], XmNmarginHeight , 0); i++; XtSetArg (setArgs[i], XmNmarginHeight , 0); i++;
@ -851,9 +779,7 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD)
pIBD->scrolledWidget = NULL; pIBD->scrolledWidget = NULL;
pIBD->bBoardWidget = NULL; pIBD->bBoardWidget = NULL;
pIBD->clipWidget = NULL; pIBD->clipWidget = NULL;
#ifdef WSM
pIBD->wsID = pWS->id; pIBD->wsID = pWS->id;
#endif /* WSM */
ToLower (pWS->pSD->iconBoxSBDisplayPolicy); ToLower (pWS->pSD->iconBoxSBDisplayPolicy);
@ -871,11 +797,7 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD)
* iconBoxGeometry width and height are not specified * iconBoxGeometry width and height are not specified
*/ */
#ifdef WSM
if (pWS->iconBoxGeometry == NULL) /* not set by user */ 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 * Use the iconPlacement resource
@ -898,13 +820,8 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD)
} }
else else
{ {
#ifdef WSM
mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y, mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y,
&width, &height); &width, &height);
#else /* WSM */
mask = XParseGeometry(pWS->pSD->iconBoxGeometry, &X, &Y,
&width, &height);
#endif /* WSM */
if ((mask & WidthValue) && (width > 0)) if ((mask & WidthValue) && (width > 0))
{ {
@ -1385,13 +1302,8 @@ void SetGeometry (WmWorkspaceData *pWS, ClientData *pCD, IconBoxData *pIBD)
* Set initial placement of icon box * Set initial placement of icon box
*/ */
#ifdef WSM
mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y, mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y,
&width, &height); &width, &height);
#else /* WSM */
mask = XParseGeometry(pCD->pSD->iconBoxGeometry,
&X, &Y, &width, &height);
#endif /* WSM */
if (mask & XValue) if (mask & XValue)
{ {
@ -1720,10 +1632,6 @@ void MapIconBoxes (WmWorkspaceData *pWS)
while (pibd) while (pibd)
{ {
XtPopup(pibd->shellWidget, XtGrabNone); 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; pibd = pibd->pNextIconBox;
} }
} }
@ -1731,8 +1639,6 @@ void MapIconBoxes (WmWorkspaceData *pWS)
} /* END OF FUNCTION MapIconBoxes */ } /* END OF FUNCTION MapIconBoxes */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* UnmapIconBoxes (pWS) * UnmapIconBoxes (pWS)
@ -1775,7 +1681,6 @@ void UnmapIconBoxes (WmWorkspaceData *pWS)
} }
} /* END OF FUNCTION UnmapIconBoxes */ } /* END OF FUNCTION UnmapIconBoxes */
#endif /* WSM */
/******************************<->************************************* /******************************<->*************************************
* *
@ -1907,12 +1812,10 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
Widget iconWidget; Widget iconWidget;
IconInfo *pIconInfo; IconInfo *pIconInfo;
static XmString dummyString = NULL; static XmString dummyString = NULL;
#ifdef WSM
WsClientData *pWsc; WsClientData *pWsc;
WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID); WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID);
pWsc = GetWsClientData (pWS, pCD); pWsc = GetWsClientData (pWS, pCD);
#endif /* WSM */
/* /*
* If we go to multiple icon boxes, find the box this client * 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) if (pCD->client)
{ {
#ifdef WSM
pWsc->pIconBox = tmpPointerToIconBox; pWsc->pIconBox = tmpPointerToIconBox;
#else /* WSM */
P_ICON_BOX(pCD) = tmpPointerToIconBox;
#endif /* WSM */
iconWidth = ICON_WIDTH(pCD) iconWidth = ICON_WIDTH(pCD)
+ (2 * IB_MARGIN_WIDTH); + (2 * IB_MARGIN_WIDTH);
@ -1937,19 +1836,11 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
iconHeight = ICON_HEIGHT(pCD) iconHeight = ICON_HEIGHT(pCD)
+ (2 * IB_MARGIN_HEIGHT); + (2 * IB_MARGIN_HEIGHT);
#ifdef WSM
pIconInfo = InsertIconInfo (pWsc->pIconBox, pCD, (Widget) NULL); pIconInfo = InsertIconInfo (pWsc->pIconBox, pCD, (Widget) NULL);
#else /* WSM */
pIconInfo = InsertIconInfo (P_ICON_BOX(pCD), pCD, (Widget) NULL);
#endif /* WSM */
if (pIconInfo) if (pIconInfo)
{ {
#ifdef WSM
pWsc->pIconBox->numberOfIcons++; pWsc->pIconBox->numberOfIcons++;
#else /* WSM */
P_ICON_BOX(pCD)->numberOfIcons++;
#endif /* WSM */
i = 0; i = 0;
XtSetArg (setArgs[i], XmNbackground, XtSetArg (setArgs[i], XmNbackground,
@ -1957,13 +1848,8 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
XtSetArg (setArgs[i], XmNforeground, XtSetArg (setArgs[i], XmNforeground,
(XtArgVal) ICON_APPEARANCE(pCD).foreground ); i++; (XtArgVal) ICON_APPEARANCE(pCD).foreground ); i++;
#ifdef WSM
XtSetArg (setArgs[i], XmNx , (XtArgVal) pWsc->iconX); i++; XtSetArg (setArgs[i], XmNx , (XtArgVal) pWsc->iconX); i++;
XtSetArg (setArgs[i], XmNy , (XtArgVal) pWsc->iconY); 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], XmNwidth , (XtArgVal) iconWidth); i++;
XtSetArg (setArgs[i], XmNheight , (XtArgVal) iconHeight); i++; XtSetArg (setArgs[i], XmNheight , (XtArgVal) iconHeight); i++;
@ -1990,11 +1876,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
iconWidget = XtCreateManagedWidget("iconInIconBox", iconWidget = XtCreateManagedWidget("iconInIconBox",
xmDrawnButtonWidgetClass, xmDrawnButtonWidgetClass,
#ifdef WSM
pWsc->pIconBox->bBoardWidget, pWsc->pIconBox->bBoardWidget,
#else /* WSM */
P_ICON_BOX(pCD)->bBoardWidget,
#endif /* WSM */
(ArgList)setArgs, i); (ArgList)setArgs, i);
if (dummyString == NULL) if (dummyString == NULL)
@ -2011,11 +1893,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
pIconInfo->theWidget = iconWidget; pIconInfo->theWidget = iconWidget;
#ifdef WSM
pWsc->iconFrameWin = XtWindow (iconWidget); pWsc->iconFrameWin = XtWindow (iconWidget);
#else /* WSM */
ICON_FRAME_WIN(pCD) = XtWindow (iconWidget);
#endif /* WSM */
XtAddCallback (iconWidget, XmNactivateCallback, XtAddCallback (iconWidget, XmNactivateCallback,
(XtCallbackProc)IconActivateCallback, (XtCallbackProc)IconActivateCallback,
@ -2055,19 +1933,11 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
} }
} }
#ifdef WSM
ResetIconBoxMaxSize(pWsc->pIconBox->pCD_iconBox, ResetIconBoxMaxSize(pWsc->pIconBox->pCD_iconBox,
pWsc->pIconBox->bBoardWidget); pWsc->pIconBox->bBoardWidget);
ResetArrowButtonIncrements (pWsc->pIconBox->pCD_iconBox); 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; rval = True;
} }
} }
@ -2114,9 +1984,7 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
Arg setArgs[3]; Arg setArgs[3];
Arg getArgs[4]; Arg getArgs[4];
Dimension clipWidth, clipHeight; Dimension clipWidth, clipHeight;
#ifdef WSM
WsClientData *pWsc; WsClientData *pWsc;
#endif /* WSM */
place = GetNextIconPlace (&pIBD->IPD); place = GetNextIconPlace (&pIBD->IPD);
if (place == NO_ICON_PLACE) if (place == NO_ICON_PLACE)
@ -2158,7 +2026,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
pII->pCD = pCD; pII->pCD = pCD;
#ifdef WSM
pWsc = GetWsClientData (GetWorkspaceData (pCD->pSD, pIBD->wsID), pCD); pWsc = GetWsClientData (GetWorkspaceData (pCD->pSD, pIBD->wsID), pCD);
pWsc->iconPlace = place; pWsc->iconPlace = place;
@ -2171,19 +2038,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
pIBD->currentCol = pWsc->iconX / pIBD->pCD_iconBox->widthInc; pIBD->currentCol = pWsc->iconX / pIBD->pCD_iconBox->widthInc;
pIBD->currentRow = pWsc->iconY / pIBD->pCD_iconBox->heightInc; 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 * Increase bboard size if necessary
@ -2204,7 +2058,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
if (pIBD->currentRow > pIBD->lastRow) if (pIBD->currentRow > pIBD->lastRow)
{ {
pIBD->lastRow = pIBD->currentRow; pIBD->lastRow = pIBD->currentRow;
#ifdef WSM
if (clipHeight <= (Dimension) (pWsc->iconY + if (clipHeight <= (Dimension) (pWsc->iconY +
pIBD->pCD_iconBox->heightInc)) pIBD->pCD_iconBox->heightInc))
{ {
@ -2214,16 +2067,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
XtSetArg (setArgs[i], XmNheight, (XtArgVal) XtSetArg (setArgs[i], XmNheight, (XtArgVal)
pWsc->iconY + pIBD->pCD_iconBox->heightInc); i++; 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 else
@ -2231,7 +2074,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
if (pIBD->currentCol > pIBD->lastCol) if (pIBD->currentCol > pIBD->lastCol)
{ {
pIBD->lastCol = pIBD->currentCol; pIBD->lastCol = pIBD->currentCol;
#ifdef WSM
if (clipWidth <= (Dimension) if (clipWidth <= (Dimension)
(pWsc->iconX + pIBD->pCD_iconBox->widthInc)) (pWsc->iconX + pIBD->pCD_iconBox->widthInc))
{ {
@ -2242,17 +2084,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
(XtArgVal) pWsc->iconX + (XtArgVal) pWsc->iconX +
pIBD->pCD_iconBox->widthInc); i++; 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) if (pIBD->currentRow > pIBD->lastRow)
@ -2294,12 +2125,10 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD)
Dimension oldWidth, oldHeight; Dimension oldWidth, oldHeight;
int newWidth, newHeight; int newWidth, newHeight;
int i, newCols, newRows; int i, newCols, newRows;
#ifdef WSM
WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID); WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID);
WsClientData *pWsc; WsClientData *pWsc;
pWsc = GetWsClientData (pWS, pCD); pWsc = GetWsClientData (pWS, pCD);
#endif /* WSM */
i = 0; i = 0;
XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++; XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++;
@ -2329,7 +2158,6 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD)
} }
} }
#ifdef WSM
DeleteIconInfo (pWsc->pIconBox, pCD); DeleteIconInfo (pWsc->pIconBox, pCD);
pWsc->pIconBox->numberOfIcons--; pWsc->pIconBox->numberOfIcons--;
@ -2338,13 +2166,6 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD)
pWsc->pIconBox = NULL; pWsc->pIconBox = NULL;
pWsc->iconPlace = NO_ICON_PLACE; 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); XtUnmanageChild (theChild);
XtDestroyWidget (theChild); XtDestroyWidget (theChild);
@ -2865,10 +2686,8 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
int newWidth, newHeight; int newWidth, newHeight;
int i; int i;
Boolean rippling = False; Boolean rippling = False;
#ifdef WSM
WsClientData *pWsc; WsClientData *pWsc;
WmWorkspaceData *pWS; WmWorkspaceData *pWS;
#endif /* WSM */
i = 0; i = 0;
XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++; 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 * We need to start rippling the icons into new positions if
* their (x,y) position changed * their (x,y) position changed
*/ */
#ifdef WSM
pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID); pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID);
pWsc = GetWsClientData (pWS, pII_2->pCD); pWsc = GetWsClientData (pWS, pII_2->pCD);
CvtIconPlaceToPosition (&pIBD->IPD, pWsc->iconPlace, CvtIconPlaceToPosition (&pIBD->IPD, pWsc->iconPlace,
@ -2951,13 +2769,6 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
rippling = ((newX != pWsc->iconX) || rippling = ((newX != pWsc->iconX) ||
(newY != pWsc->iconY)); (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) 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); CvtIconPlaceToPosition (&pIBD->IPD, ix2, &newX, &newY);
#ifdef WSM
pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID); pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID);
pWsc = GetWsClientData (pWS, pII_2->pCD); pWsc = GetWsClientData (pWS, pII_2->pCD);
pWsc->iconX = newX; pWsc->iconX = newX;
pWsc->iconY = newY; pWsc->iconY = newY;
#else /* WSM */
pII_2->pCD->iconX = newX;
pII_2->pCD->iconY = newY;
#endif /* WSM */
if (hasActiveText && (pII_2->pCD == pCD_tmp)) if (hasActiveText && (pII_2->pCD == pCD_tmp))
{ {
@ -3478,9 +3284,7 @@ void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy, XKeyEvent *keyEvent)
if (!(XFindContext (DISPLAY, theIcon, if (!(XFindContext (DISPLAY, theIcon,
wmGD.windowContextType, (caddr_t *)&pCD))) wmGD.windowContextType, (caddr_t *)&pCD)))
{ {
#ifdef WSM
SetClientWsIndex (pCD); SetClientWsIndex (pCD);
#endif /* WSM */
keyEvent->window = ICON_FRAME_WIN(pCD); keyEvent->window = ICON_FRAME_WIN(pCD);
if (pCD->clientState == MINIMIZED_STATE) if (pCD->clientState == MINIMIZED_STATE)
@ -3570,32 +3374,16 @@ void GetIconBoxIconRootXY (ClientData *pCD, int *pX, int *pY)
{ {
Window child; Window child;
#ifdef WSM
WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD); WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD);
#endif /* WSM */
#ifdef WSM
if (pCD->pSD->useIconBox && pWsc->pIconBox) if (pCD->pSD->useIconBox && pWsc->pIconBox)
#else /* WSM */
if (pCD->pSD->useIconBox && P_ICON_BOX(pCD))
#endif /* WSM */
{ {
#ifdef WSM
XTranslateCoordinates(DISPLAY, XTranslateCoordinates(DISPLAY,
XtWindow(pWsc->pIconBox->bBoardWidget), XtWindow(pWsc->pIconBox->bBoardWidget),
ROOT_FOR_CLIENT(pCD), ROOT_FOR_CLIENT(pCD),
pWsc->iconX + IB_MARGIN_WIDTH, pWsc->iconX + IB_MARGIN_WIDTH,
pWsc->iconY + IB_MARGIN_HEIGHT, pWsc->iconY + IB_MARGIN_HEIGHT,
pX, pY, &child); 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 else
{ {
@ -3633,9 +3421,7 @@ Boolean IconVisible (ClientData *pCD)
*/ */
Boolean rval = True; Boolean rval = True;
#ifdef WSM
WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD); 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], XmNheight, (XtArgVal) &tmpHeight ); i++;
XtSetArg (getArgs[i], XmNx, (XtArgVal) &tmpX ); i++; XtSetArg (getArgs[i], XmNx, (XtArgVal) &tmpX ); i++;
XtSetArg (getArgs[i], XmNy, (XtArgVal) &tmpY ); i++; XtSetArg (getArgs[i], XmNy, (XtArgVal) &tmpY ); i++;
#ifdef WSM
XtGetValues (pWsc->pIconBox->clipWidget, getArgs, i); XtGetValues (pWsc->pIconBox->clipWidget, getArgs, i);
XtTranslateCoords(pWsc->pIconBox->scrolledWidget, XtTranslateCoords(pWsc->pIconBox->scrolledWidget,
tmpX, tmpY, tmpX, tmpY,
&clipX, &clipY); &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); GetIconBoxIconRootXY(pCD, &iconX, &iconY);

View file

@ -31,9 +31,7 @@
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
#ifdef WSM
extern void AddIconBoxForWorkspace (WmWorkspaceData *pWS); extern void AddIconBoxForWorkspace (WmWorkspaceData *pWS);
#endif /* WSM */
extern void AddNewBox (WmWorkspaceData *pWS, IconBoxData *pIBD); extern void AddNewBox (WmWorkspaceData *pWS, IconBoxData *pIBD);
extern void ChangeActiveIconboxIconText (Widget icon, caddr_t dummy, extern void ChangeActiveIconboxIconText (Widget icon, caddr_t dummy,
XFocusChangeEvent *event); XFocusChangeEvent *event);
@ -94,9 +92,7 @@ extern void SetGranularity (WmWorkspaceData *pWS, ClientData *pCD,
extern void SetIconBoxInfo (WmWorkspaceData *pWS, ClientData *pCD); extern void SetIconBoxInfo (WmWorkspaceData *pWS, ClientData *pCD);
extern void SetNewBounds (IconBoxData *pIBD); extern void SetNewBounds (IconBoxData *pIBD);
extern void ShowClientIconState (ClientData *pCD, int newState); extern void ShowClientIconState (ClientData *pCD, int newState);
#ifdef WSM
extern void UnmapIconBoxes (WmWorkspaceData *pWS); extern void UnmapIconBoxes (WmWorkspaceData *pWS);
#endif /* WSM */
extern void UpdateIncrements (Widget sWidget, IconBoxData *pIBD, extern void UpdateIncrements (Widget sWidget, IconBoxData *pIBD,
XConfigureEvent *event); XConfigureEvent *event);
extern String WmXmStringToString (XmString xmString); extern String WmXmStringToString (XmString xmString);

View file

@ -51,10 +51,8 @@ extern String _XmOSInitPath(
String env_pathname, String env_pathname,
Boolean *user_path) ; Boolean *user_path) ;
#endif #endif
#ifdef WSM
#include <Xm/IconFile.h> #include <Xm/IconFile.h>
#include <Dt/GetDispRes.h> #include <Dt/GetDispRes.h>
#endif
#define MATCH_XBM 'B' /* .xbm character: see XmGetPixmap */ #define MATCH_XBM 'B' /* .xbm character: see XmGetPixmap */
#define MATCH_PATH "XBMLANGPATH" #define MATCH_PATH "XBMLANGPATH"
@ -131,11 +129,7 @@ Pixmap MakeClientIconPixmap (
/* /*
* The bitmap was not made with usable parameters. * The bitmap was not made with usable parameters.
*/ */
#ifdef WSM
Warning (((char *)GETMESSAGE(38, 9, "Icon bitmap cannot be used on this screen"))); 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); return ((Pixmap)NULL);
} }
@ -185,28 +179,21 @@ Pixmap MakeClientIconPixmap (
Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName) Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName)
{ {
int bitmapIndex; int bitmapIndex;
#ifdef WSM
Pixmap pixmap, pixmap_r, mask; Pixmap pixmap, pixmap_r, mask;
Window root; Window root;
int x, y; int x, y;
unsigned int width, height, border_width, depth; unsigned int width, height, border_width, depth;
String sIconFileName; String sIconFileName;
int iconSizeDesired; int iconSizeDesired;
#endif /* WSM */
/* /*
* Get the bitmap cache entry (will read data from file if necessary). * Get the bitmap cache entry (will read data from file if necessary).
* If unable to find the iconName file return NULL. * If unable to find the iconName file return NULL.
*/ */
#ifdef WSM
if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName, if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName,
False)) < 0) 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) || if ((PSD_FOR_CLIENT(pCD)->displayResolutionType == LOW_RES_DISPLAY) ||
(PSD_FOR_CLIENT(pCD)->displayResolutionType == VGA_RES_DISPLAY)) (PSD_FOR_CLIENT(pCD)->displayResolutionType == VGA_RES_DISPLAY))
{ {
@ -286,7 +273,6 @@ Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName)
if (sIconFileName != NULL) if (sIconFileName != NULL)
XtFree (sIconFileName); XtFree (sIconFileName);
#endif /* WSM */
return ((Pixmap)NULL); return ((Pixmap)NULL);
} }
@ -421,10 +407,8 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
Pixmap iconPixmap; Pixmap iconPixmap;
GC imageGC, topGC, botGC; GC imageGC, topGC, botGC;
XGCValues gcv; XGCValues gcv;
#ifdef WSM
unsigned long gc_mask; unsigned long gc_mask;
XmPixelSet *pPS = NULL; XmPixelSet *pPS = NULL;
#endif /* WSM */
unsigned int imageWidth; unsigned int imageWidth;
unsigned int imageHeight; unsigned int imageHeight;
int dest_x, dest_y; int dest_x, dest_y;
@ -527,7 +511,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
} }
/* create a GC to use */ /* create a GC to use */
#ifdef WSM
gc_mask = GCForeground | GCBackground | GCGraphicsExposures; gc_mask = GCForeground | GCBackground | GCGraphicsExposures;
if (mask) if (mask)
{ {
@ -553,14 +536,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
gcv.graphics_exposures = False; gcv.graphics_exposures = False;
imageGC = XCreateGC (DISPLAY, iconPixmap, gc_mask, &gcv); 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. * Format the image.
@ -586,7 +561,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
dest_x = (imageWidth - width) / 2; dest_x = (imageWidth - width) / 2;
dest_y = (imageHeight - height) / 2; dest_y = (imageHeight - height) / 2;
#ifdef WSM
if (mask) if (mask)
{ {
if (pPS != NULL) if (pPS != NULL)
@ -617,10 +591,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
} }
XChangeGC (DISPLAY, imageGC, gc_mask, &gcv); XChangeGC (DISPLAY, imageGC, gc_mask, &gcv);
#else /* WSM */
/* set the foreground */
XSetForeground (DISPLAY, imageGC, fg);
#endif /* WSM */
/* copy the bitmap to the pixmap */ /* copy the bitmap to the pixmap */
#ifndef DISALLOW_DEEP_ICONS #ifndef DISALLOW_DEEP_ICONS
@ -654,7 +624,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
* Shadowing * Shadowing
*/ */
#ifdef WSM
if (mask && (pPS != NULL)) if (mask && (pPS != NULL))
{ {
topGC = GetHighlightGC (pSD, pPS->ts, pPS->bg, topGC = GetHighlightGC (pSD, pPS->ts, pPS->bg,
@ -665,7 +634,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
} }
else else
{ {
#endif /* WSM */
topGC = GetHighlightGC (pSD, pCD->iconImageTopShadowColor, topGC = GetHighlightGC (pSD, pCD->iconImageTopShadowColor,
pCD->iconImageBackground, pCD->iconImageBackground,
pCD->iconImageTopShadowPixmap); pCD->iconImageTopShadowPixmap);
@ -673,9 +641,7 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
botGC = GetHighlightGC (pSD, pCD->iconImageBottomShadowColor, botGC = GetHighlightGC (pSD, pCD->iconImageBottomShadowColor,
pCD->iconImageBackground, pCD->iconImageBackground,
pCD->iconImageBottomShadowPixmap); pCD->iconImageBottomShadowPixmap);
#ifdef WSM
} }
#endif /* WSM */
/* /*
* CR5208 - Better fix than from OSF! * CR5208 - Better fix than from OSF!
@ -871,11 +837,7 @@ Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex)
#define BITMAP_CACHE_INC 5 #define BITMAP_CACHE_INC 5
#ifdef WSM
int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError) int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError)
#else /* WSM */
int GetBitmapIndex (WmScreenData *pSD, char *name)
#endif /* WSM */
{ {
char *path; char *path;
BitmapCache *bitmapc; BitmapCache *bitmapc;
@ -950,9 +912,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name)
&bitmapc->bitmap, &x, &y) &bitmapc->bitmap, &x, &y)
!= BitmapSuccess) != BitmapSuccess)
{ {
#ifdef WSM
if (bReportError) if (bReportError)
#endif /* WSM */
MWarning (((char *)GETMESSAGE(38, 7, "Unable to read bitmap file %s\n")), path); MWarning (((char *)GETMESSAGE(38, 7, "Unable to read bitmap file %s\n")), path);
XtFree ((char *)bitmapc->path); XtFree ((char *)bitmapc->path);
return (-1); return (-1);
@ -960,9 +920,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name)
if (bitmapc->width == 0 || bitmapc->height == 0) if (bitmapc->width == 0 || bitmapc->height == 0)
{ {
#ifdef WSM
if (bReportError) if (bReportError)
#endif /* WSM */
MWarning (((char *)GETMESSAGE(38, 8, "Invalid bitmap file %s\n")), path); MWarning (((char *)GETMESSAGE(38, 8, "Invalid bitmap file %s\n")), path);
XtFree ((char *)bitmapc->path); XtFree ((char *)bitmapc->path);
return (-1); return (-1);
@ -1119,6 +1077,4 @@ char *BitmapPathName (string)
} /* END OF FUNCTION BitmapPathName */ } /* END OF FUNCTION BitmapPathName */
#ifdef WSM
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -31,13 +31,9 @@
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
extern char *BitmapPathName (char *string); extern char *BitmapPathName (char *string);
#ifdef WSM
extern int GetBitmapIndex (WmScreenData *pSD, extern int GetBitmapIndex (WmScreenData *pSD,
char *name, char *name,
Boolean bReportError); Boolean bReportError);
#else /* WSM */
extern int GetBitmapIndex (WmScreenData *pSD, char *name);
#endif /* WSM */
extern Pixmap MakeCachedIconPixmap (ClientData *pCD, int bitmapIndex, Pixmap mask); extern Pixmap MakeCachedIconPixmap (ClientData *pCD, int bitmapIndex, Pixmap mask);
extern Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex); extern Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex);
extern Pixmap MakeClientIconPixmap (ClientData *pCD, Pixmap iconBitmap, Pixmap iconMask); extern Pixmap MakeClientIconPixmap (ClientData *pCD, Pixmap iconBitmap, Pixmap iconMask);

View file

@ -40,9 +40,7 @@
#include "WmGlobal.h" #include "WmGlobal.h"
#include "WmResNames.h" #include "WmResNames.h"
#ifdef WSM
#include "WmHelp.h" #include "WmHelp.h"
#endif /* WSM */
#include "WmICCC.h" #include "WmICCC.h"
#define DTWM_NEED_FNTPL #define DTWM_NEED_FNTPL
#include "WmIBitmap.h" #include "WmIBitmap.h"
@ -59,9 +57,9 @@
#ifndef NO_HP_KEY_REMAP #ifndef NO_HP_KEY_REMAP
#include <Xm/VirtKeysP.h> #include <Xm/VirtKeysP.h>
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# include <Xm/DrawingA.h> # include <Xm/DrawingA.h>
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
typedef struct typedef struct
{ {
@ -69,7 +67,6 @@ typedef struct
String new_name ; String new_name ;
} str_xref_rec, *str_xref ; } str_xref_rec, *str_xref ;
#endif /* NO_HP_KEY_REMAP */ #endif /* NO_HP_KEY_REMAP */
#ifdef WSM
#include <Dt/GetDispRes.h> #include <Dt/GetDispRes.h>
#include <Dt/SessionP.h> #include <Dt/SessionP.h>
#include <Dt/SessionM.h> #include <Dt/SessionM.h>
@ -77,7 +74,6 @@ typedef struct
#include <Dt/Message.h> #include <Dt/Message.h>
#include <Dt/WsmM.h> #include <Dt/WsmM.h>
#include <Dt/EnvControlP.h> #include <Dt/EnvControlP.h>
#endif /* WSM */
/* Busy is also defined in the BMS -> bms.h. This conflicts with /* Busy is also defined in the BMS -> bms.h. This conflicts with
* /usr/include/X11/Xasync.h on ibm. * /usr/include/X11/Xasync.h on ibm.
@ -92,9 +88,7 @@ typedef struct
/* /*
* include extern functions * include extern functions
*/ */
#ifdef WSM
#include "WmBackdrop.h" #include "WmBackdrop.h"
#endif /* WSM */
#include "WmCDInfo.h" #include "WmCDInfo.h"
#include "WmColormap.h" #include "WmColormap.h"
#include "WmError.h" #include "WmError.h"
@ -102,18 +96,14 @@ typedef struct
#include "WmFeedback.h" #include "WmFeedback.h"
#include "WmFunction.h" #include "WmFunction.h"
#include "WmIDecor.h" #include "WmIDecor.h"
#ifdef WSM
#include "WmIPC.h" #include "WmIPC.h"
#endif /* WSM */
#include "WmIPlace.h" #include "WmIPlace.h"
#include "WmIconBox.h" #include "WmIconBox.h"
#include "WmKeyFocus.h" #include "WmKeyFocus.h"
#include "WmPanelP.h" /* for typedef in WmManage.h */ #include "WmPanelP.h" /* for typedef in WmManage.h */
#include "WmManage.h" #include "WmManage.h"
#include "WmMenu.h" #include "WmMenu.h"
#ifdef WSM
#include "WmPresence.h" #include "WmPresence.h"
#endif /* WSM */
#include "WmProperty.h" #include "WmProperty.h"
#include "WmResCvt.h" #include "WmResCvt.h"
#include "WmResource.h" #include "WmResource.h"
@ -122,9 +112,7 @@ typedef struct
#include "WmCDecor.h" #include "WmCDecor.h"
#include "stdio.h" #include "stdio.h"
#include "WmResParse.h" #include "WmResParse.h"
#ifdef WSM
#include <stdlib.h> #include <stdlib.h>
#endif /* WSM */
#include "WmXSMP.h" #include "WmXSMP.h"
/* /*
@ -133,14 +121,12 @@ typedef struct
#include "WmInitWs.h" #include "WmInitWs.h"
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# include "WmWsmLib/wsm_proto.h" # include "WmWsmLib/wsm_proto.h"
# include "WmWsmLib/utm_send.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); static void InsureDefaultBackdropDir(char **ppchBackdropDirs);
#endif /* WSM */
void InitWmDisplayEnv (void); void InitWmDisplayEnv (void);
#ifndef NO_MESSAGE_CATALOG #ifndef NO_MESSAGE_CATALOG
void InitNlsStrings (void); void InitNlsStrings (void);
@ -149,12 +135,10 @@ void InitNlsStrings (void);
Boolean VirtKeys4DIN(Display *dpy); Boolean VirtKeys4DIN(Display *dpy);
#endif /* NO_HP_KEY_REMAP */ #endif /* NO_HP_KEY_REMAP */
#ifdef WSM
/* limited to 3 chars max */ /* limited to 3 chars max */
#define UNSPECIFIED_SCREEN_NAME "fbk" #define UNSPECIFIED_SCREEN_NAME "fbk"
char **dpy2Argv; /* copy for second display */ char **dpy2Argv; /* copy for second display */
int dpy2Argc; int dpy2Argc;
#endif /* WSM */
/* /*
* Global Variables: * Global Variables:
*/ */
@ -427,10 +411,8 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
int savedArgc; int savedArgc;
wmGD.errorFlag = False; wmGD.errorFlag = False;
#ifdef WSM
wmGD.dtSD = NULL; wmGD.dtSD = NULL;
wmGD.iSlideUpsInProgress = 0; wmGD.iSlideUpsInProgress = 0;
#endif /* WSM */
SetupWmSignalHandlers (0); /* dummy paramater */ SetupWmSignalHandlers (0); /* dummy paramater */
@ -444,9 +426,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
#ifndef IBM_169380 #ifndef IBM_169380
wmGD.cmapWindowContextType = XUniqueContext (); wmGD.cmapWindowContextType = XUniqueContext ();
#endif #endif
#ifdef WSM
wmGD.mwmWindowContextType = XUniqueContext (); wmGD.mwmWindowContextType = XUniqueContext ();
#endif /* WSM */
/* copy argv (the XtInititalize changes the original) for use in restart */ /* copy argv (the XtInititalize changes the original) for use in restart */
savedArgc = argc; savedArgc = argc;
@ -454,9 +434,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
wmGD.environ = environ; wmGD.environ = environ;
#ifdef WSM
wmGD.pWmPB = _DtWmParseNewBuf(); wmGD.pWmPB = _DtWmParseNewBuf();
#endif /* WSM */
@ -469,7 +447,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
{ {
wmGD.mwmName = wmGD.argv[0]; wmGD.mwmName = wmGD.argv[0];
} }
#ifdef WSM
if (MwmBehavior) if (MwmBehavior)
{ {
res_class = WM_RESOURCE_CLASS; res_class = WM_RESOURCE_CLASS;
@ -480,10 +457,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
} }
wmGD.statusColorServer = CSERVE_NOT_AVAILABLE; wmGD.statusColorServer = CSERVE_NOT_AVAILABLE;
#else /* WSM */
res_class = WM_RESOURCE_CLASS;
#endif /* WSM */
wmGD.display = (Display *)NULL; wmGD.display = (Display *)NULL;
wmGD.topLevelW = (Widget)NULL; wmGD.topLevelW = (Widget)NULL;
@ -531,9 +504,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
*/ */
InitCursorInfo (); InitCursorInfo ();
#ifdef WSM
InitWmDisplayEnv (); InitWmDisplayEnv ();
#endif
ShowWaitState (TRUE); ShowWaitState (TRUE);
/* /*
@ -603,11 +574,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
XtSetArg (args[argnum], XtNheight, 10); argnum++; XtSetArg (args[argnum], XtNheight, 10); argnum++;
XtSetArg (args[argnum], XtNmappedWhenManaged, False); argnum++; XtSetArg (args[argnum], XtNmappedWhenManaged, False); argnum++;
XtSetArg (args[argnum], XtNjoinSession, True); argnum++; XtSetArg (args[argnum], XtNjoinSession, True); argnum++;
#ifdef WSM
XtSetArg (args[argnum], XtNrestartStyle, SmRestartNever); argnum++; XtSetArg (args[argnum], XtNrestartStyle, SmRestartNever); argnum++;
#else
XtSetArg (args[argnum], XtNrestartStyle, SmRestartIfRunning); argnum++;
#endif
XtSetArg (args[argnum], XtNargc, savedArgc); argnum++; XtSetArg (args[argnum], XtNargc, savedArgc); argnum++;
XtSetArg (args[argnum], XtNargv, wmGD.argv); argnum++; XtSetArg (args[argnum], XtNargv, wmGD.argv); argnum++;
@ -636,7 +603,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
ProcessGlobalScreenResources (); ProcessGlobalScreenResources ();
ProcessCommandLine (argc, argv); ProcessCommandLine (argc, argv);
#ifdef WSM
/* /*
* Make sure backdrops are in our icon search path. * Make sure backdrops are in our icon search path.
* This call MUST occur before ANY icons are looked up either * 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); XtFree(sBdPath);
} }
#endif /* WSM */
/* /*
* Allocate data and initialize for screens we manage: * Allocate data and initialize for screens we manage:
@ -714,7 +679,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
{ {
if (!processedGlobalResources) if (!processedGlobalResources)
{ {
#ifdef WSM
enum { enum {
XA_DT_SESSION_HINTS, XA_DT_SM_WM_PROTOCOL, XA_DT_SESSION_HINTS, XA_DT_SM_WM_PROTOCOL,
XA_DT_SM_START_ACK_WINDOWS, XA_DT_SM_STOP_ACK_WINDOWS, 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_EXIT_SESSION = atoms[XA_DT_WM_EXIT_SESSION];
wmGD.xa_DT_WM_LOCK_DISPLAY = atoms[XA_DT_WM_LOCK_DISPLAY]; wmGD.xa_DT_WM_LOCK_DISPLAY = atoms[XA_DT_WM_LOCK_DISPLAY];
wmGD.xa_DT_WM_READY = atoms[XA_DT_WM_READY]; wmGD.xa_DT_WM_READY = atoms[XA_DT_WM_READY];
#endif /* WSM */
#ifndef NO_OL_COMPAT #ifndef NO_OL_COMPAT
InitOLCompat(); InitOLCompat();
#endif /* NO_OL_COMPAT */ #endif /* NO_OL_COMPAT */
@ -780,7 +743,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
wmGD.pLockMaskSequence = NULL; wmGD.pLockMaskSequence = NULL;
SetupLockingModifierMask (); SetupLockingModifierMask ();
#ifdef WSM
wmGD.requestContextWin = (Window) 0L; wmGD.requestContextWin = (Window) 0L;
wmGD.cppCommand = NULL; wmGD.cppCommand = NULL;
wmGD.evLastButton.button = 0; wmGD.evLastButton.button = 0;
@ -840,7 +802,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
args, args,
argnum); argnum);
#endif /* WSM */
/* /*
@ -871,9 +832,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
InitWmScreen (&(wmGD.Screens[scr]), sNum); InitWmScreen (&(wmGD.Screens[scr]), sNum);
wmGD.Screens[scr].managed = True; wmGD.Screens[scr].managed = True;
managed++; managed++;
#ifdef WSM
GetDtSessionHints(&(wmGD.Screens[scr]), sNum); GetDtSessionHints(&(wmGD.Screens[scr]), sNum);
#endif /* WSM */
if (!activeSet) if (!activeSet)
{ {
@ -893,7 +852,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
ExitWM (WM_ERROR_EXIT_VALUE); ExitWM (WM_ERROR_EXIT_VALUE);
} }
} }
#ifdef WSM
/* /*
* Initialize the IPC mechanism * Initialize the IPC mechanism
*/ */
@ -917,8 +875,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
XtSetValues (wmGD.topLevelW, args, argnum); XtSetValues (wmGD.topLevelW, args, argnum);
XtSetValues (wmGD.topLevelW1, args, argnum); XtSetValues (wmGD.topLevelW1, args, argnum);
#endif /* WSM */
/* /*
* Prepare to have child processes (e.g., exec'ed commands). * 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); ExitWM (WM_ERROR_EXIT_VALUE);
} }
#ifdef WSM
{ {
enum { XA_DT_WORKSPACE_HINTS, XA_DT_WORKSPACE_PRESENCE, 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]; wmGD.xa_DT_WORKSPACE_CURRENT = atoms[XA_DT_WORKSPACE_CURRENT];
} }
#endif /* WSM */
/* Initialize properties used in session management. */ /* Initialize properties used in session management. */
wmGD.xa_SM_CLIENT_ID = wmGD.xa_SM_CLIENT_ID =
@ -994,13 +948,11 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
if (pSD->managed) if (pSD->managed)
{ {
#ifdef WSM
if (XDefaultScreen (wmGD.display) == pSD->screen) if (XDefaultScreen (wmGD.display) == pSD->screen)
{ {
wmGD.commandWindow = wmGD.Screens[scr].wmWorkspaceWin; wmGD.commandWindow = wmGD.Screens[scr].wmWorkspaceWin;
} }
#endif /* WSM */
/* /*
* Initialize workspace colormap data. * 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 * convert DT 2.0 syntax to DT 3.0
*/ */
DeleteTempConfigFileIfAny(); DeleteTempConfigFileIfAny();
#ifdef WSM
/* /*
* Point second display's resource data base * Point second display's resource data base
* to the first 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 * NEW LOCATION
*/ */
wmGD.display1->db = wmGD.display->db; wmGD.display1->db = wmGD.display->db;
#endif /* WSM */
/* /*
* Realize the top level widget, make the window override * Realize the top level widget, make the window override
@ -1062,7 +1012,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
*/ */
XtRealizeWidget (wmGD.topLevelW); XtRealizeWidget (wmGD.topLevelW);
#ifdef WSM
XtRealizeWidget (wmGD.topLevelW1); XtRealizeWidget (wmGD.topLevelW1);
/* /*
@ -1071,7 +1020,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
* is required for ICCCM-style messaging). * is required for ICCCM-style messaging).
*/ */
dtInitializeMessaging (wmGD.topLevelW); dtInitializeMessaging (wmGD.topLevelW);
#endif /* WSM */
sAttributes.override_redirect = True; sAttributes.override_redirect = True;
XChangeWindowAttributes (DISPLAY, XtWindow (wmGD.topLevelW), XChangeWindowAttributes (DISPLAY, XtWindow (wmGD.topLevelW),
@ -1085,9 +1033,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
* Use the WM_SAVE_YOURSELF protocol * Use the WM_SAVE_YOURSELF protocol
* for notification of when to save ourself * for notification of when to save ourself
*/ */
#ifdef WSM
SetMwmSaveSessionInfo(wmGD.commandWindow); SetMwmSaveSessionInfo(wmGD.commandWindow);
#endif
/* /*
* Initialize window manager event handling: * Initialize window manager event handling:
*/ */
@ -1133,15 +1079,12 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
for (scr = 0; scr < wmGD.numScreens; scr++) for (scr = 0; scr < wmGD.numScreens; scr++)
{ {
#ifdef WSM
int iws; int iws;
#endif /* WSM */
pSD = &(wmGD.Screens[scr]); pSD = &(wmGD.Screens[scr]);
if (pSD->managed) if (pSD->managed)
{ {
ACTIVE_PSD = &wmGD.Screens[scr]; ACTIVE_PSD = &wmGD.Screens[scr];
#ifdef WSM
MapIconBoxes (pSD->pActiveWS); MapIconBoxes (pSD->pActiveWS);
ChangeBackdrop (pSD->pActiveWS); ChangeBackdrop (pSD->pActiveWS);
@ -1217,9 +1160,6 @@ XFlush (DISPLAY);
} }
RestoreHelpDialogs(pSD); RestoreHelpDialogs(pSD);
#else /* WSM */
MapIconBoxes (pSD->pActiveWS);
#endif /* WSM */
} }
} }
firstTime = 0; firstTime = 0;
@ -1227,17 +1167,12 @@ XFlush (DISPLAY);
InitKeyboardFocus (); InitKeyboardFocus ();
#ifndef WSM
InitWmDisplayEnv ();
#endif
ShowWaitState (FALSE); ShowWaitState (FALSE);
#ifdef WSM
/* /*
* Tell the rest of DT that we're up * Tell the rest of DT that we're up
*/ */
dtReadyNotification(); dtReadyNotification();
#endif /* WSM */
#ifdef DEBUG_RESOURCE_DATABASE #ifdef DEBUG_RESOURCE_DATABASE
XrmPutFileDatabase(wmGD.display->db, "/tmp/dtwm.resDB"); XrmPutFileDatabase(wmGD.display->db, "/tmp/dtwm.resDB");
@ -1271,12 +1206,10 @@ InitWmScreen (WmScreenData *pSD, int sNum)
Arg args[12]; Arg args[12];
int argnum; int argnum;
#ifdef WSM
int wsnum; int wsnum;
WmWorkspaceData *pwsI; WmWorkspaceData *pwsI;
int buf_size; int buf_size;
int iwsx; int iwsx;
#endif /* WSM */
char *pDisplayName; char *pDisplayName;
#define LENCBUFFER 256 #define LENCBUFFER 256
@ -1330,11 +1263,10 @@ InitWmScreen (WmScreenData *pSD, int sNum)
pSD->bitmapCacheCount = 0; pSD->bitmapCacheCount = 0;
pSD->dataType = SCREEN_DATA_TYPE; pSD->dataType = SCREEN_DATA_TYPE;
pSD->managed = False; pSD->managed = False;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
pSD->cciTree = NULL; pSD->cciTree = NULL;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
#ifdef WSM
pSD->initialWorkspace=NULL; pSD->initialWorkspace=NULL;
pSD->presence.shellW = NULL; pSD->presence.shellW = NULL;
pSD->presence.onScreen = False; pSD->presence.onScreen = False;
@ -1363,14 +1295,12 @@ InitWmScreen (WmScreenData *pSD, int sNum)
pSD->woS = (Window) 0L; pSD->woS = (Window) 0L;
pSD->woE = (Window) 0L; pSD->woE = (Window) 0L;
pSD->woW = (Window) 0L; pSD->woW = (Window) 0L;
#endif /* WSM */
pSD->wPanelist = NULL; pSD->wPanelist = NULL;
pSD->pECD = NULL; pSD->pECD = NULL;
pSD->numPushRecallClients = 0; pSD->numPushRecallClients = 0;
pSD->numEmbeddedClients = 0; pSD->numEmbeddedClients = 0;
pSD->pPRCD = NULL; pSD->pPRCD = NULL;
pSD->iconBoxControl = False; pSD->iconBoxControl = False;
#ifdef WSM
pSD->displayResolutionType = _DtGetDisplayResolution(DISPLAY, sNum); pSD->displayResolutionType = _DtGetDisplayResolution(DISPLAY, sNum);
/* /*
@ -1398,7 +1328,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
} }
} /* if wmGD.screenNames[sNum] == UNSPECIFIED_SCREEN_NAME */ } /* if wmGD.screenNames[sNum] == UNSPECIFIED_SCREEN_NAME */
#endif /* WSM */
/* /*
* Save screen context * Save screen context
*/ */
@ -1429,7 +1358,7 @@ InitWmScreen (WmScreenData *pSD, int sNum)
args, args,
argnum); 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 /* Create a DrawingArea as a child of the popupShell. This will be used
* to handle UTM traffic relating to cci. We need this * to handle UTM traffic relating to cci. We need this
* particular widget to get the callbacks from conversion requests made * 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 /* Must realize to own WM_i if unmapped, causes mwm to
freeze when menu is displayed. */ freeze when menu is displayed. */
XtPopup(pSD->screenTopLevelW, XtGrabNone); XtPopup(pSD->screenTopLevelW, XtGrabNone);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
#ifdef WSM
argnum = 0; argnum = 0;
XtSetArg (args[argnum], XtNgeometry, NULL); argnum++; XtSetArg (args[argnum], XtNgeometry, NULL); argnum++;
XtSetArg (args[argnum], XtNx, 10000); argnum++; XtSetArg (args[argnum], XtNx, 10000); argnum++;
@ -1474,7 +1402,7 @@ InitWmScreen (WmScreenData *pSD, int sNum)
args, args,
argnum); argnum);
XtRealizeWidget (pSD->screenTopLevelW1); XtRealizeWidget (pSD->screenTopLevelW1);
#endif /* WSM */
/* /*
* Fetch screen based resources * Fetch screen based resources
*/ */
@ -1486,7 +1414,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
MakeXorGC (pSD); MakeXorGC (pSD);
InitIconSize(pSD); InitIconSize(pSD);
#ifdef WSM
/* /*
* Complete initialization of workspace structures * 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 */ /* make first workspace in list the active one to start with */
pSD->pActiveWS = pSD->pWS; 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); pDisplayName = DisplayString (DISPLAY);
@ -1627,14 +1536,10 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
Arg args[10]; Arg args[10];
int argnum; int argnum;
#ifndef WSM
#define DEFAULT_WS_NAME "workspace"
#endif /* not WSM */
pWS->pSD = pSD; pWS->pSD = pSD;
pWS->pIconBox = NULL; pWS->pIconBox = NULL;
pWS->dataType = WORKSPACE_DATA_TYPE; pWS->dataType = WORKSPACE_DATA_TYPE;
#ifdef WSM
pWS->backdrop.window = 0; pWS->backdrop.window = 0;
pWS->backdrop.nameAtom = 0; pWS->backdrop.nameAtom = 0;
pWS->backdrop.image = NULL; pWS->backdrop.image = NULL;
@ -1642,16 +1547,6 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
pWS->sizeClientList = 0; pWS->sizeClientList = 0;
pWS->ppClients = 0; pWS->ppClients = 0;
pWS->buttonW = NULL; 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 * Create widget for workspace resource hierarchy
@ -1672,10 +1567,8 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
args, args,
argnum); argnum);
#ifdef WSM
/* internalize the workspace name */ /* internalize the workspace name */
pWS->id = XInternAtom (DISPLAY, pWS->name, False); pWS->id = XInternAtom (DISPLAY, pWS->name, False);
#endif /* WSM */
/* /*
* Process workspace based resources * Process workspace based resources
@ -1690,8 +1583,7 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
} /* END OF FUNCTION InitWmWorkspace */ } /* END OF FUNCTION InitWmWorkspace */
#ifdef WSM
/******************************<->************************************* /******************************<->*************************************
* *
* InsureDefaultBackdropDir(char **ppchBackdropDirs) * InsureDefaultBackdropDir(char **ppchBackdropDirs)
@ -1815,7 +1707,6 @@ InsureDefaultBackdropDir(char **ppchBackdropDirs)
} }
} /* END OF FUNCTION InsureDefaultBackdropDirs */ } /* END OF FUNCTION InsureDefaultBackdropDirs */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
@ -1903,10 +1794,8 @@ void SetupWmWorkspaceWindows (void)
(long) ((wmGD.useStandardBehavior) ? (long) ((wmGD.useStandardBehavior) ?
MWM_INFO_STARTUP_STANDARD : MWM_INFO_STARTUP_CUSTOM), MWM_INFO_STARTUP_STANDARD : MWM_INFO_STARTUP_CUSTOM),
pSD->wmWorkspaceWin); pSD->wmWorkspaceWin);
#ifdef WSM
XSaveContext (DISPLAY, pSD->wmWorkspaceWin, XSaveContext (DISPLAY, pSD->wmWorkspaceWin,
wmGD.mwmWindowContextType, (caddr_t)pSD); 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"))); Warning (((char *)GETMESSAGE(40, 10, "Insufficient memory for window manager data")));
wmGD.argv = argv; wmGD.argv = argv;
#ifdef WSM
dpy2Argv = argv; dpy2Argv = argv;
#endif /* WSM */
} }
else else
{ {
@ -2192,7 +2079,6 @@ void CopyArgv (int argc, char *argv [])
wmGD.argv[i] = argv[i]; wmGD.argv[i] = argv[i];
} }
wmGD.argv[i] = NULL; wmGD.argv[i] = NULL;
#ifdef WSM
if ((dpy2Argv = (char **)XtMalloc((argc + 1) * sizeof(char *))) == NULL) if ((dpy2Argv = (char **)XtMalloc((argc + 1) * sizeof(char *))) == NULL)
{ {
Warning (((char *)GETMESSAGE(40, 11, "Insufficient memory for window manager data"))); Warning (((char *)GETMESSAGE(40, 11, "Insufficient memory for window manager data")));
@ -2207,7 +2093,6 @@ void CopyArgv (int argc, char *argv [])
dpy2Argc = argc; dpy2Argc = argc;
dpy2Argv[i] = NULL; dpy2Argv[i] = NULL;
} }
#endif /* WSM */
} }
} /* END OF FUNCTION CopyArgv */ } /* END OF FUNCTION CopyArgv */
@ -2257,11 +2142,7 @@ void InitScreenNames (void)
ExitWM (WM_ERROR_EXIT_VALUE); ExitWM (WM_ERROR_EXIT_VALUE);
} }
/* default name is left justified, 3-chars max, zero terminated */ /* default name is left justified, 3-chars max, zero terminated */
#ifdef WSM
sprintf((char *)wmGD.screenNames[num], UNSPECIFIED_SCREEN_NAME); sprintf((char *)wmGD.screenNames[num], UNSPECIFIED_SCREEN_NAME);
#else /* WSM */
sprintf((char *)wmGD.screenNames[num],"%d",num%1000);
#endif /* WSM */
} }
} }
#ifndef NO_MESSAGE_CATALOG #ifndef NO_MESSAGE_CATALOG
@ -2271,14 +2152,12 @@ void InitNlsStrings (void)
{ {
char * tmpString; char * tmpString;
#ifdef WSM
/* /*
* Initialize messages * Initialize messages
*/ */
wmGD.okLabel=XmStringCreateLocalized((String)_DtOkString); wmGD.okLabel=XmStringCreateLocalized((String)_DtOkString);
wmGD.cancelLabel=XmStringCreateLocalized((String)_DtCancelString); wmGD.cancelLabel=XmStringCreateLocalized((String)_DtCancelString);
wmGD.helpLabel=XmStringCreateLocalized((String)_DtHelpString); wmGD.helpLabel=XmStringCreateLocalized((String)_DtHelpString);
#endif /* WSM */
/* /*
* catgets returns a pointer to an area that is over written * 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); strcpy(wmNLS.default_icon_box_title, tmpString);
} }
#ifdef WSM
tmpString = ((char *)GETMESSAGE(40, 20, "%s: %s on line %d of configuration file %s\n")); tmpString = ((char *)GETMESSAGE(40, 20, "%s: %s on line %d of configuration file %s\n"));
if ((pWarningStringFile = if ((pWarningStringFile =
(char *)XtMalloc ((unsigned int) (strlen(tmpString) + 1))) == NULL) (char *)XtMalloc ((unsigned int) (strlen(tmpString) + 1))) == NULL)
@ -2358,7 +2236,6 @@ void InitNlsStrings (void)
{ {
strcpy(wmNLS.defaultHelpTitle, tmpString); strcpy(wmNLS.defaultHelpTitle, tmpString);
} }
#endif /* WSM */
} /* InitNlsStrings */ } /* InitNlsStrings */
#endif #endif
@ -2409,9 +2286,7 @@ InitWmDisplayEnv (void)
else else
{ {
strcpy(wmGD.displayString, buffer); strcpy(wmGD.displayString, buffer);
#ifdef WSM
putenv(wmGD.displayString); putenv(wmGD.displayString);
#endif /* WSM */
} }
} /* END OF FUNCTION InitWmDisplayEnv */ } /* END OF FUNCTION InitWmDisplayEnv */
@ -2654,6 +2529,4 @@ VirtKeys4DIN(
} }
#endif /* NO_HP_KEY_REMAP */ #endif /* NO_HP_KEY_REMAP */
#ifdef WSM
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -43,6 +43,4 @@ extern void InitScreenNames (void);
#ifndef NO_MESSAGE_CATALOG #ifndef NO_MESSAGE_CATALOG
extern void InitNlsStrings( void ) ; extern void InitNlsStrings( void ) ;
#endif #endif
#ifdef WSM
extern void InitWmDisplayEnv( void ) ; extern void InitWmDisplayEnv( void ) ;
#endif /* WSM */

View file

@ -358,14 +358,12 @@ void SetKeyboardFocus (ClientData *pCD, long focusFlags)
void ResetExplicitSelectHandling (ClientData *pCD) void ResetExplicitSelectHandling (ClientData *pCD)
{ {
#ifdef WSM
Boolean bUnseen; Boolean bUnseen;
bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False; bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False;
if (bUnseen) if (bUnseen)
pCD->clientState &= ~UNSEEN_STATE; pCD->clientState &= ~UNSEEN_STATE;
#endif /* WSM */
if ((pCD->clientState == NORMAL_STATE) || if ((pCD->clientState == NORMAL_STATE) ||
(pCD->clientState == MAXIMIZED_STATE)) (pCD->clientState == MAXIMIZED_STATE))
{ {
@ -383,11 +381,9 @@ void ResetExplicitSelectHandling (ClientData *pCD)
/* !!! grab reset if client icon window? !!! */ /* !!! grab reset if client icon window? !!! */
} }
#ifdef WSM
if (bUnseen) if (bUnseen)
pCD->clientState |= UNSEEN_STATE; pCD->clientState |= UNSEEN_STATE;
#endif /* WSM */
} /* END OF FUNCTION ResetExplicitSelectHandling */ } /* END OF FUNCTION ResetExplicitSelectHandling */
@ -500,9 +496,7 @@ void SetFocusIndication (ClientData *pCD)
void ClearFocusIndication (ClientData *pCD, Boolean refresh) void ClearFocusIndication (ClientData *pCD, Boolean refresh)
{ {
ClientData *saveCD; ClientData *saveCD;
#ifdef WSM
Boolean bUnseen; Boolean bUnseen;
#endif /* WSM */
/* /*
* Set the "focus" to NULL to insure correct display of the frame * 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; saveCD = wmGD.keyboardFocus;
wmGD.keyboardFocus = NULL; wmGD.keyboardFocus = NULL;
#ifdef WSM
bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False; bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False;
if (bUnseen) if (bUnseen)
pCD->clientState &= ~UNSEEN_STATE; pCD->clientState &= ~UNSEEN_STATE;
#endif /* WSM */
if ((pCD->clientState == NORMAL_STATE) || if ((pCD->clientState == NORMAL_STATE) ||
(pCD->clientState == MAXIMIZED_STATE)) (pCD->clientState == MAXIMIZED_STATE))
@ -536,10 +528,8 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh)
ShowInactiveIcon (pCD, refresh); ShowInactiveIcon (pCD, refresh);
} }
#ifdef WSM
if (bUnseen) if (bUnseen)
pCD->clientState |= UNSEEN_STATE; pCD->clientState |= UNSEEN_STATE;
#endif /* WSM */
/* restore old keyboard focus */ /* restore old keyboard focus */
wmGD.keyboardFocus = saveCD; wmGD.keyboardFocus = saveCD;
@ -1313,9 +1303,7 @@ Boolean CheckForKeyFocus (ClientListEntry *pNextEntry, unsigned long type, Boole
*/ */
if (((pNextEntry->type == NORMAL_STATE) && if (((pNextEntry->type == NORMAL_STATE) &&
#ifdef WSM
(!(pCD->clientState & UNSEEN_STATE)) && (!(pCD->clientState & UNSEEN_STATE)) &&
#endif /* WSM */
(pCD->clientState != MINIMIZED_STATE)) || (pCD->clientState != MINIMIZED_STATE)) ||
((pNextEntry->type == MINIMIZED_STATE) && ((pNextEntry->type == MINIMIZED_STATE) &&
(pCD->clientState == MINIMIZED_STATE))) (pCD->clientState == MINIMIZED_STATE)))
@ -1475,9 +1463,7 @@ void AutoResetKeyFocus (ClientData *pcdNoFocus, Time focusTime)
{ {
if ((pNextEntry->type != MINIMIZED_STATE) && if ((pNextEntry->type != MINIMIZED_STATE) &&
(pCD->clientState != MINIMIZED_STATE) && (pCD->clientState != MINIMIZED_STATE) &&
#ifdef WSM
(!(pCD->clientState & UNSEEN_STATE)) && (!(pCD->clientState & UNSEEN_STATE)) &&
#endif /* WSM */
(pCD != pcdNoFocus)) (pCD != pcdNoFocus))
{ {
if (pCD->transientChildren) if (pCD->transientChildren)

View file

@ -39,10 +39,8 @@
#ifndef NO_MULTIBYTE #ifndef NO_MULTIBYTE
#include <locale.h> #include <locale.h>
#endif #endif
#ifdef WSM
#include <Dt/Message.h> #include <Dt/Message.h>
#include <Dt/EnvControlP.h> #include <Dt/EnvControlP.h>
#endif /* WSM */
/* /*
* include extern functions * include extern functions
*/ */
@ -51,24 +49,17 @@
#include "WmEvent.h" #include "WmEvent.h"
#include "WmInitWs.h" #include "WmInitWs.h"
#include "WmError.h" #include "WmError.h"
#ifdef WSM
#include "WmIPC.h" #include "WmIPC.h"
#include "WmBackdrop.h" #include "WmBackdrop.h"
#endif /* WSM */
/* /*
* Function Declarations: * Function Declarations:
*/ */
#ifdef WSM
int WmReturnIdentity (int argc, char *argv[], char *environ[]); int WmReturnIdentity (int argc, char *argv[], char *environ[]);
#define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \ #define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \
(caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : \ (caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : \
(IsBackdropWindow (ACTIVE_PSD, (w)))) (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; WmScreenData *pSD;
@ -80,9 +71,7 @@ WmGlobalData wmGD;
#ifndef NO_MESSAGE_CATALOG #ifndef NO_MESSAGE_CATALOG
NlsStrings wmNLS; NlsStrings wmNLS;
#endif #endif
#ifdef WSM
int WmIdentity; int WmIdentity;
#endif /* WSM */
@ -116,7 +105,6 @@ main (int argc, char *argv [], char *environ [])
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
#ifndef NO_MULTIBYTE #ifndef NO_MULTIBYTE
#ifdef WSM
/* /*
* Set up environment variables for this HP DT client * 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, "")); char * foo = ((char *)GETMESSAGE(44, 1, ""));
} }
#endif /* WSM */
XtSetLanguageProc (NULL, (XtLanguageProc)NULL, NULL); XtSetLanguageProc (NULL, (XtLanguageProc)NULL, NULL);
#endif #endif
#ifdef WSM
/* /*
* Get Identity * Get Identity
*/ */
WmIdentity = WmReturnIdentity(argc, argv, environ); WmIdentity = WmReturnIdentity(argc, argv, environ);
#endif /* WSM */
/* /*
* Initialize the workspace: * Initialize the workspace:
*/ */
InitWmGlobal (argc, argv, environ); InitWmGlobal (argc, argv, environ);
#ifdef WSM
/* /*
* Set up PATH variable if it must run as standalone command * 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); _DtEnvControl(DT_ENV_SET_BIN);
} }
#endif /* WSM */
/* /*
* MAIN EVENT HANDLING LOOP: * MAIN EVENT HANDLING LOOP:
@ -175,7 +158,6 @@ main (int argc, char *argv [], char *environ [])
wmGD.attributesWindow = 0L; wmGD.attributesWindow = 0L;
#ifdef WSM
if ((event.type == ButtonPress) || if ((event.type == ButtonPress) ||
(event.type == ButtonRelease)) (event.type == ButtonRelease))
{ {
@ -192,7 +174,6 @@ main (int argc, char *argv [], char *environ [])
wmGD.bReplayedButton = False; wmGD.bReplayedButton = False;
} }
} }
#endif /* WSM */
dispatchEvent = True; dispatchEvent = True;
if (wmGD.menuActive) if (wmGD.menuActive)
{ {
@ -231,7 +212,6 @@ main (int argc, char *argv [], char *environ [])
} /* END OF FUNCTION main */ } /* END OF FUNCTION main */
#ifdef WSM
/******************************<->************************************* /******************************<->*************************************
* *
* WmReturnIdentity (argc, argv, environ) * WmReturnIdentity (argc, argv, environ)
@ -296,7 +276,5 @@ int WmReturnIdentity ( int argc, char *argv[], char *environ[])
return(retVal); return(retVal);
} /* END OF FUNCTION WmReturnIdentity */ } /* END OF FUNCTION WmReturnIdentity */
#endif /* WSM */
#ifdef WSM
/************************* eof ******************************/ /************************* eof ******************************/
#endif /* WSM */

View file

@ -61,10 +61,8 @@
#include "WmWinInfo.h" #include "WmWinInfo.h"
#include "WmWinList.h" #include "WmWinList.h"
#include "WmWinState.h" #include "WmWinState.h"
#ifdef WSM
#include "WmPresence.h" #include "WmPresence.h"
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
#include "WmXSMP.h" #include "WmXSMP.h"
@ -122,11 +120,9 @@ void AdoptInitialClients (WmScreenData *pSD)
Window root; Window root;
Window parent; Window parent;
Window *clients; Window *clients;
#ifdef WSM
int nAncillaries, iAnc; int nAncillaries, iAnc;
Window *pAncillaryWindows, *pWin1; Window *pAncillaryWindows, *pWin1;
WmWorkspaceData *pWS0; WmWorkspaceData *pWS0;
#endif /* WSM */
unsigned int nclients; unsigned int nclients;
ClientData *pcd = NULL; ClientData *pcd = NULL;
PropWMState *wmStateProp; PropWMState *wmStateProp;
@ -134,7 +130,6 @@ void AdoptInitialClients (WmScreenData *pSD)
int i,j; int i,j;
long manageFlags; long manageFlags;
#ifdef WSM
/* /*
* Generate list of ancillary windows (not to be managed) * Generate list of ancillary windows (not to be managed)
*/ */
@ -156,7 +151,6 @@ void AdoptInitialClients (WmScreenData *pSD)
*pWin1++ = XtWindow (pSD->screenTopLevelW); *pWin1++ = XtWindow (pSD->screenTopLevelW);
*pWin1 = pSD->activeIconTextWin; *pWin1 = pSD->activeIconTextWin;
#endif /* WSM */
/* /*
* Look for mapped top-level windows and start managing them: * Look for mapped top-level windows and start managing them:
@ -192,21 +186,11 @@ void AdoptInitialClients (WmScreenData *pSD)
for (i = 0; i < nclients; i++) for (i = 0; i < nclients; i++)
{ {
/* determine if the client window should be managed by wm */ /* determine if the client window should be managed by wm */
#ifdef WSM
if (InWindowList (clients[i], pAncillaryWindows, nAncillaries)) if (InWindowList (clients[i], pAncillaryWindows, nAncillaries))
{ {
/* don't manage ancillary window manager windows */ /* don't manage ancillary window manager windows */
continue; 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, if (!XFindContext (DISPLAY, clients[i], wmGD.windowContextType,
(caddr_t *)&pcd)) (caddr_t *)&pcd))
{ {
@ -271,12 +255,10 @@ void AdoptInitialClients (WmScreenData *pSD)
} }
} }
#ifdef WSM
if (pAncillaryWindows) if (pAncillaryWindows)
{ {
XtFree ((char *) pAncillaryWindows); XtFree ((char *) pAncillaryWindows);
} }
#endif /* WSM */
} /* END OF FUNCTION AdoptInitialClients */ } /* END OF FUNCTION AdoptInitialClients */
@ -317,9 +299,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
int initialState; int initialState;
int i; int i;
Boolean sendConfigNotify; Boolean sendConfigNotify;
#ifdef WSM
WmWorkspaceData *pwsi; WmWorkspaceData *pwsi;
#endif /* WSM */
WmFpEmbeddedClientData *pECD; WmFpEmbeddedClientData *pECD;
/* /*
@ -364,7 +344,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
* ...then we've embedded it in the front * ...then we've embedded it in the front
* panel--no further processing required. * panel--no further processing required.
*/ */
#ifdef WSM
if (smAckState == SM_START_ACK) if (smAckState == SM_START_ACK)
{ {
SendClientMsg( wmGD.dtSmWindow, SendClientMsg( wmGD.dtSmWindow,
@ -372,7 +351,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
(long) wmGD.xa_DT_WM_WINDOW_ACK, (long) wmGD.xa_DT_WM_WINDOW_ACK,
CurrentTime, NULL, 0); CurrentTime, NULL, 0);
} }
#endif /* WSM */
return; return;
} }
} }
@ -389,7 +367,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
} }
#endif #endif
#ifdef WSM
if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL) if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL)
{ {
/* /*
@ -401,7 +378,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
F_AddToAllWorkspaces(0, pCD, 0); F_AddToAllWorkspaces(0, pCD, 0);
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
} }
#endif /* WSM */
if (manageFlags & MANAGEW_WM_RESTART) if (manageFlags & MANAGEW_WM_RESTART)
{ {
if (manageFlags & MANAGEW_WM_RESTART_ICON) if (manageFlags & MANAGEW_WM_RESTART_ICON)
@ -469,7 +445,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
* window. * window.
*/ */
#ifdef WSM
if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) && if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
(pCD->transientLeader == NULL)) (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: * Register window contexts to facilitate event handling:
@ -584,13 +544,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
XSaveContext (DISPLAY, pCD->clientTitleWin, wmGD.windowContextType, XSaveContext (DISPLAY, pCD->clientTitleWin, wmGD.windowContextType,
(caddr_t)pCD); (caddr_t)pCD);
} }
#ifndef WSM
if (pCD->iconFrameWin)
{
XSaveContext (DISPLAY, pCD->iconFrameWin, wmGD.windowContextType,
(caddr_t)pCD);
}
#endif /* WSM */
if (pCD->clientCmapCount > 0) if (pCD->clientCmapCount > 0)
{ {
@ -621,15 +574,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
SetupCButtonBindings (pCD->clientBaseWin, BUTTON_SPECS(pCD)); 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. * Setup key binding handling for system menu accelerators.
*/ */
@ -639,7 +583,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
{ {
SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs, SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs,
pCD->clientFrameWin, GrabModeSync, F_CONTEXT_ALL); pCD->clientFrameWin, GrabModeSync, F_CONTEXT_ALL);
#ifdef WSM
for (i = 0; i < pCD->numInhabited; i++) for (i = 0; i < pCD->numInhabited; i++)
{ {
if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin) if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin)
@ -649,36 +592,20 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
F_CONTEXT_ALL); 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++) for (i = 0; i < pCD->numInhabited; i++)
{ {
if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin) if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin)
#else /* WSM */
if (!pCD->pIconBox && pCD->iconFrameWin)
#endif /* WSM */
{ {
static int iconKeySpec = 1; static int iconKeySpec = 1;
static int iconAccelSpec = 1; static int iconAccelSpec = 1;
if ((iconKeySpec != 0) && KEY_SPECS(pCD)) if ((iconKeySpec != 0) && KEY_SPECS(pCD))
{ {
#ifdef WSM
iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD), iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD),
pCD->pWsList[i].iconFrameWin, pCD->pWsList[i].iconFrameWin,
GrabModeSync, F_CONTEXT_ICON); 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)) if ((iconAccelSpec != 0) && ACCELERATOR_MENU_COUNT(pCD))
@ -688,23 +615,14 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
iconAccelSpec = 0; iconAccelSpec = 0;
for (n= 0; n < pSD->acceleratorMenuCount; n++) for (n= 0; n < pSD->acceleratorMenuCount; n++)
{ {
#ifdef WSM
iconAccelSpec += SetupKeyBindings ( iconAccelSpec += SetupKeyBindings (
ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs, ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs,
pCD->pWsList[i].iconFrameWin, GrabModeSync, pCD->pWsList[i].iconFrameWin, GrabModeSync,
F_CONTEXT_ICON); 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); DoExplicitSelectGrab (pCD->clientBaseWin);
} }
#ifdef WSM
UpdateWorkspacePresenceProperty(pCD); UpdateWorkspacePresenceProperty(pCD);
#endif /* WSM */
/* /*
@ -741,16 +657,13 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
*/ */
initialState = pCD->clientState; initialState = pCD->clientState;
#ifdef WSM
if (!ClientInWorkspace (pSD->pActiveWS, pCD)) if (!ClientInWorkspace (pSD->pActiveWS, pCD))
{ {
initialState |= UNSEEN_STATE; initialState |= UNSEEN_STATE;
} }
#endif /* WSM */
pCD->clientState = WITHDRAWN_STATE; pCD->clientState = WITHDRAWN_STATE;
pCD->clientFlags &= ~WM_INITIALIZATION; pCD->clientFlags &= ~WM_INITIALIZATION;
#ifdef WSM
/* /*
* Add to stacking list using the client's zero'th workspace * Add to stacking list using the client's zero'th workspace
* instead of the current one because it may not be in * 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), AddClientToList (GetWorkspaceData (pSD, pCD->pWsList[0].wsID),
pCD, True /*on top*/); pCD, True /*on top*/);
#else /* WSM */
AddClientToList (pSD->pActiveWS, pCD, True /*on top*/);
#endif /* WSM */
SetClientState (pCD, initialState, GetTimestamp()); SetClientState (pCD, initialState, GetTimestamp());
/* /*
@ -784,9 +694,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
!(manageFlags & !(manageFlags &
(MANAGEW_WM_STARTUP | MANAGEW_WM_RESTART | MANAGEW_WM_CLIENTS)) && (MANAGEW_WM_STARTUP | MANAGEW_WM_RESTART | MANAGEW_WM_CLIENTS)) &&
(pCD->clientState != MINIMIZED_STATE) && (pCD->clientState != MINIMIZED_STATE) &&
#ifdef WSM
!(pCD->clientState & UNSEEN_STATE) && !(pCD->clientState & UNSEEN_STATE) &&
#endif /* WSM */
(pCD->inputFocusModel || (pCD->inputFocusModel ||
(pCD->protocolFlags & PROTOCOL_WM_TAKE_FOCUS))))) (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); Do_Focus_Key ((ClientData *)NULL, GetTimestamp() , ALWAYS_SET_FOCUS);
} }
#ifdef WSM
if (smAckState == SM_START_ACK) if (smAckState == SM_START_ACK)
{ {
SendClientMsg( wmGD.dtSmWindow, (long) wmGD.xa_DT_SM_WM_PROTOCOL, SendClientMsg( wmGD.dtSmWindow, (long) wmGD.xa_DT_SM_WM_PROTOCOL,
@ -813,7 +720,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
*/ */
DiscardInitialPropertyList (pCD); DiscardInitialPropertyList (pCD);
#endif /* WSM */
CheckPushRecallClient (pCD); CheckPushRecallClient (pCD);
} /* END OF FUNCTION ManageWindow */ } /* END OF FUNCTION ManageWindow */
@ -991,9 +897,7 @@ void WithdrawWindow (ClientData *pCD)
* - make sure the input focus no longer is associted with the window * - make sure the input focus no longer is associted with the window
* - free the icon placement (if necessary) * - free the icon placement (if necessary)
*/ */
#ifdef WSM
SetClientWsIndex (pCD); SetClientWsIndex (pCD);
#endif /* WSM */
if (!(pCD->clientFlags & WM_INITIALIZATION)) if (!(pCD->clientFlags & WM_INITIALIZATION))
{ {
@ -1004,7 +908,6 @@ void WithdrawWindow (ClientData *pCD)
ResetWithdrawnFocii (pCD); ResetWithdrawnFocii (pCD);
if (pCD->clientState & MINIMIZED_STATE) if (pCD->clientState & MINIMIZED_STATE)
{ {
#ifdef WSM
if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD)))) if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD))))
{ {
WmWorkspaceData *pWsTmp; 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)) if (ICON_FRAME_WIN(pCD))
{ {
XUnmapWindow (DISPLAY, ICON_FRAME_WIN(pCD)); XUnmapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
@ -1052,7 +945,6 @@ void WithdrawWindow (ClientData *pCD)
XFlush (DISPLAY); XFlush (DISPLAY);
} }
} }
#ifdef WSM
/* /*
* Clean up the workspace presence dialog if it's * Clean up the workspace presence dialog if it's
* connected to this client. * connected to this client.
@ -1066,7 +958,6 @@ void WithdrawWindow (ClientData *pCD)
} }
pCD->pSD->presence.pCDforClient = NULL; pCD->pSD->presence.pCDforClient = NULL;
} }
#endif /* WSM */
/* /*
* Check to see if the window is being unmanaged because the window * 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) && if ((pCD->clientFlags & CLIENT_REPARENTED) &&
!(pCD->clientFlags & CLIENT_DESTROYED)) !(pCD->clientFlags & CLIENT_DESTROYED))
{ {
#ifdef WSM
SetWMState (pCD->client, WithdrawnSTATE, SetWMState (pCD->client, WithdrawnSTATE,
pCD->pWsList[0].iconFrameWin); pCD->pWsList[0].iconFrameWin);
#else /* WSM */
SetWMState (pCD->client, WithdrawnSTATE, ICON_FRAME_WIN(pCD));
#endif /* WSM */
if (pCD->maxConfig) if (pCD->maxConfig)
{ {
@ -1133,13 +1020,8 @@ void WithdrawWindow (ClientData *pCD)
if (pCD->iconWindow && (pCD->clientFlags & ICON_REPARENTED)) if (pCD->iconWindow && (pCD->clientFlags & ICON_REPARENTED))
{ {
XUnmapWindow (DISPLAY, pCD->iconWindow); XUnmapWindow (DISPLAY, pCD->iconWindow);
#ifdef WSM
XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD),
pCD->pWsList[0].iconX, pCD->pWsList[0].iconY); 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); XFreePixmap (DISPLAY, pCD->iconPixmap);
} }
#ifdef WSM
if ((pCD->numInhabited > 0) && ICON_FRAME_WIN(pCD)) if ((pCD->numInhabited > 0) && ICON_FRAME_WIN(pCD))
#else /* WSM */
if (ICON_FRAME_WIN(pCD))
#endif /* WSM */
{ {
FreeIcon (pCD); FreeIcon (pCD);
} }
@ -1222,8 +1100,6 @@ void WithdrawWindow (ClientData *pCD)
*/ */
DeleteClientContext (pCD); DeleteClientContext (pCD);
#ifdef WSM
/* /*
* Count backward for efficiency -- * Count backward for efficiency --
* removes from end of list. * removes from end of list.
@ -1234,7 +1110,6 @@ void WithdrawWindow (ClientData *pCD)
GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID), GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID),
pCD); pCD);
} }
#endif /* WSM */
/* /*
* Free up window manager resources: * Free up window manager resources:
@ -1283,7 +1158,6 @@ void WithdrawWindow (ClientData *pCD)
#endif #endif
} }
#ifdef WSM
/* /*
* Insure list of initial properties has been freed. * Insure list of initial properties has been freed.
*/ */
@ -1304,7 +1178,6 @@ void WithdrawWindow (ClientData *pCD)
{ {
XtFree ((char *)pCD->pWorkspaceHints); XtFree ((char *)pCD->pWorkspaceHints);
} }
#endif /* WSM */
if (pCD->smClientID) if (pCD->smClientID)
XFree (pCD->smClientID); XFree (pCD->smClientID);
@ -1383,7 +1256,6 @@ void DeleteClientContext (ClientData *pCD)
} }
if (ICON_FRAME_WIN(pCD)) if (ICON_FRAME_WIN(pCD))
{ {
#ifdef WSM
int k; int k;
for (k=0; k < pCD->numInhabited; k++) for (k=0; k < pCD->numInhabited; k++)
@ -1391,10 +1263,6 @@ void DeleteClientContext (ClientData *pCD)
XDeleteContext (DISPLAY, pCD->pWsList[k].iconFrameWin, XDeleteContext (DISPLAY, pCD->pWsList[k].iconFrameWin,
wmGD.windowContextType); wmGD.windowContextType);
} }
#else /* WSM */
XDeleteContext (DISPLAY, pCD->iconFrameWin,
wmGD.windowContextType);
#endif /* WSM */
} }
pCD->clientFlags &= ~CLIENT_CONTEXT_SAVED; pCD->clientFlags &= ~CLIENT_CONTEXT_SAVED;
} }
@ -1570,10 +1438,8 @@ void FreeClientFrame (ClientData *pCD)
void FreeIcon (ClientData *pCD) void FreeIcon (ClientData *pCD)
{ {
#ifdef WSM
WmWorkspaceData *pWsTmp; WmWorkspaceData *pWsTmp;
int i; int i;
#endif /* WSM */
if (pCD->piconTopShadows) { if (pCD->piconTopShadows) {
FreeRList (pCD->piconTopShadows); FreeRList (pCD->piconTopShadows);
@ -1588,7 +1454,6 @@ void FreeIcon (ClientData *pCD)
* destroy frame window & all children * destroy frame window & all children
*/ */
#ifdef WSM
if ((pCD->pSD->useIconBox) && pCD->pWsList[0].pIconBox) if ((pCD->pSD->useIconBox) && pCD->pWsList[0].pIconBox)
{ {
/* /*
@ -1613,16 +1478,6 @@ void FreeIcon (ClientData *pCD)
XDestroyWindow (DISPLAY, pCD->pWsList[0].iconFrameWin); 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 */ } /* END OF FUNCTION FreeIcon */
@ -1652,9 +1507,7 @@ void FreeIcon (ClientData *pCD)
void WithdrawDialog (Widget dialogboxW) void WithdrawDialog (Widget dialogboxW)
{ {
#ifdef WSM
int i; int i;
#endif /* WSM */
ClientData *pCD = NULL; ClientData *pCD = NULL;
/* /*
@ -1667,7 +1520,6 @@ void WithdrawDialog (Widget dialogboxW)
XtUnmanageChild (dialogboxW); XtUnmanageChild (dialogboxW);
DeleteClientFromList (ACTIVE_WS, pCD); DeleteClientFromList (ACTIVE_WS, pCD);
#ifdef WSM
/* TakeClientOutOfWorkspace (ACTIVE_WS, pCD); */ /* TakeClientOutOfWorkspace (ACTIVE_WS, pCD); */
/* /*
@ -1680,7 +1532,7 @@ void WithdrawDialog (Widget dialogboxW)
GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID), GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID),
pCD); pCD);
} }
#endif /* WSM */
ResetWithdrawnFocii (pCD); ResetWithdrawnFocii (pCD);
XUnmapWindow (DISPLAY, pCD->clientFrameWin); XUnmapWindow (DISPLAY, pCD->clientFrameWin);
@ -1727,7 +1579,6 @@ void ReManageDialog (WmScreenData *pSD, Widget dialogboxW)
* The order is important here: * The order is important here:
*/ */
#ifdef WSM
/* /*
* Put system modal windows in all workspaces to * Put system modal windows in all workspaces to
* avoid the race condition of the window coming up * 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; pCD->dtwmFunctions |= DtWM_FUNCTION_OCCUPY_WS;
F_AddToAllWorkspaces(0, pCD, 0); F_AddToAllWorkspaces(0, pCD, 0);
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
#endif /* WSM */
if (pSD->clientList) if (pSD->clientList)
{ {
@ -2276,9 +2126,7 @@ ManageEmbeddedClient (
pECD->pCD = pCD; pECD->pCD = pCD;
pCD->pECD = (void *) pECD; pCD->pECD = (void *) pECD;
#ifdef WSM
SetClientWsIndex(pCD); SetClientWsIndex(pCD);
#endif
SetClientWMState (pCD, NormalState, NORMAL_STATE); SetClientWMState (pCD, NormalState, NORMAL_STATE);
/* /*

View file

@ -42,9 +42,9 @@
#include "WmCEvent.h" #include "WmCEvent.h"
#include "WmResource.h" #include "WmResource.h"
#include "WmResParse.h" #include "WmResParse.h"
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# include "WmDebug.h" # include "WmDebug.h"
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
#include <stdio.h> #include <stdio.h>
#include <X11/Shell.h> #include <X11/Shell.h>
@ -83,16 +83,14 @@
#include "WmIconBox.h" #include "WmIconBox.h"
#include "WmImage.h" #include "WmImage.h"
#include "WmError.h" #include "WmError.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
static void UnmapCallback (Widget w, XtPointer client_data, static void UnmapCallback (Widget w, XtPointer client_data,
XtPointer call_data); XtPointer call_data);
static MenuItem *DuplicateMenuItems (MenuItem *menuItems); static MenuItem *DuplicateMenuItems (MenuItem *menuItems);
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
static MenuExclusion *DuplicateMenuExclusions(MenuExclusion *exclusions); static MenuExclusion *DuplicateMenuExclusions(MenuExclusion *exclusions);
static Boolean FindClientCommandMatch (MenuSpec *menuSpec, static Boolean FindClientCommandMatch (MenuSpec *menuSpec,
String clientCommand, String clientCommand,
@ -108,7 +106,7 @@ static void InsertTreeOnClient (WmScreenData *pSD, ClientData *pCD,
static MenuSpec *MakeMenuSpec (String menuName, CARD32 commandID); static MenuSpec *MakeMenuSpec (String menuName, CARD32 commandID);
static void UnmapPulldownCallback (Widget w, XtPointer client_data, static void UnmapPulldownCallback (Widget w, XtPointer client_data,
XtPointer call_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, MenuSpec *MakeMenu (WmScreenData *pSD,
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD, ClientData *pCD,
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, Context initialContext, String menuName, Context initialContext,
Context accelContext, MenuItem *moreMenuItems, Context accelContext, MenuItem *moreMenuItems,
Boolean fSystemMenu) Boolean fSystemMenu)
@ -215,7 +213,7 @@ MenuSpec *MakeMenu (WmScreenData *pSD,
if (moreMenuItems != NULL) if (moreMenuItems != NULL)
{ {
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
if ((newMenuSpec = DuplicateMenuSpec(menuSpec)) == (MenuSpec *)NULL) if ((newMenuSpec = DuplicateMenuSpec(menuSpec)) == (MenuSpec *)NULL)
return NULL; return NULL;
#else #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) * MakeMenuSpec (menuName, commandID)
@ -512,7 +510,6 @@ DuplicateMenuItems (MenuItem *menuItems)
newMenuItem->wmFunction = curMenuItem->wmFunction; newMenuItem->wmFunction = curMenuItem->wmFunction;
if ((curMenuItem->wmFunction == F_Send_Msg) if ((curMenuItem->wmFunction == F_Send_Msg)
#ifdef WSM
|| (curMenuItem->wmFunction == F_Set_Context) || (curMenuItem->wmFunction == F_Set_Context)
/* /*
* NOTE: For now, in dtwm this function is used only * NOTE: For now, in dtwm this function is used only
@ -524,7 +521,6 @@ DuplicateMenuItems (MenuItem *menuItems)
* the WmActionArg. 11/20/96 * the WmActionArg. 11/20/96
*/ */
|| (curMenuItem->wmFunction == F_Action) || (curMenuItem->wmFunction == F_Action)
#endif /* WSM */
) )
newMenuItem->wmFuncArgs = curMenuItem->wmFuncArgs; newMenuItem->wmFuncArgs = curMenuItem->wmFuncArgs;
else if (curMenuItem->wmFuncArgs != (String) NULL) else if (curMenuItem->wmFuncArgs != (String) NULL)
@ -534,7 +530,7 @@ DuplicateMenuItems (MenuItem *menuItems)
newMenuItem->greyedContext = curMenuItem->greyedContext; newMenuItem->greyedContext = curMenuItem->greyedContext;
newMenuItem->mgtMask = curMenuItem->mgtMask; newMenuItem->mgtMask = curMenuItem->mgtMask;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
newMenuItem->clientCommandName = newMenuItem->clientCommandName =
XtNewString(curMenuItem->clientCommandName); XtNewString(curMenuItem->clientCommandName);
newMenuItem->clientCommandID = curMenuItem->clientCommandID; 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) * DuplicateMenuExclusions (exclusions)
@ -665,7 +661,7 @@ DuplicateMenuSpec (MenuSpec *menuSpec)
newMenuSpec->menuButtonCount = 0; newMenuSpec->menuButtonCount = 0;
newMenuSpec->accelContext = menuSpec->accelContext; newMenuSpec->accelContext = menuSpec->accelContext;
newMenuSpec->accelKeySpecs = (KeySpec *) NULL; newMenuSpec->accelKeySpecs = (KeySpec *) NULL;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
newMenuSpec->exclusions = DuplicateMenuExclusions(menuSpec->exclusions); newMenuSpec->exclusions = DuplicateMenuExclusions(menuSpec->exclusions);
newMenuSpec->clientLocal = TRUE; newMenuSpec->clientLocal = TRUE;
newMenuSpec->commandID = menuSpec->commandID; 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) * MakeMenuItem (label, wmFunction, funcArgs, mnemonic, accelText)
@ -2867,7 +2863,7 @@ void ModifyClientCommandTree (WmScreenData *pSD,
modifier, context, newname); 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); XtSetSensitive (menuButton->buttonWidget, FALSE);
} }
} }
#ifdef WSM
if (menuItem->wmFunction == F_Remove) if (menuItem->wmFunction == F_Remove)
{ {
/* /*
@ -2993,17 +2989,12 @@ static Boolean AdjustPBs (MenuSpec *menuSpec, ClientData *pCD,
fSupported = (pCD && (pCD->numInhabited > 1)); fSupported = (pCD && (pCD->numInhabited > 1));
XtSetSensitive (menuButton->buttonWidget, fSupported); XtSetSensitive (menuButton->buttonWidget, fSupported);
} }
#endif /* WSM */
if ((menuItem->mgtMask) && pCD) if ((menuItem->mgtMask) && pCD)
/* PushButton might not apply */ /* PushButton might not apply */
{ {
#ifdef WSM
if ((pCD->clientFunctions & menuItem->mgtMask & MWM_MGT_MASK) || if ((pCD->clientFunctions & menuItem->mgtMask & MWM_MGT_MASK) ||
(pCD->dtwmFunctions & menuItem->mgtMask & DTWM_MGT_MASK)) (pCD->dtwmFunctions & menuItem->mgtMask & DTWM_MGT_MASK))
#else /* WSM */
if (pCD->clientFunctions & menuItem->mgtMask)
#endif /* WSM */
/* function applies -- manage it */ /* function applies -- manage it */
{ {
if (!menuButton->managed) 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) * AdjustTearOffControl (cascade, closure, cbackdata)
@ -3348,7 +3339,7 @@ static Boolean CreateClientCommandSeparator (MenuItem *menuItem,
/* Well, nothing failed so let's create it. */ /* Well, nothing failed so let's create it. */
return(TRUE); return(TRUE);
} }
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/*************************************<->************************************* /*************************************<->*************************************
* *
@ -3394,9 +3385,9 @@ typedef struct _StrList
} StrList; } StrList;
Widget CreateMenuWidget (WmScreenData *pSD, Widget CreateMenuWidget (WmScreenData *pSD,
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD, ClientData *pCD,
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, Widget parent, String menuName, Widget parent,
Boolean fTopLevelPane, MenuSpec *topMenuSpec, Boolean fTopLevelPane, MenuSpec *topMenuSpec,
MenuItem *moreMenuItems) MenuItem *moreMenuItems)
@ -3414,9 +3405,9 @@ Widget CreateMenuWidget (WmScreenData *pSD,
KeySpec *accelKeySpec; KeySpec *accelKeySpec;
Dimension menuHeight; Dimension menuHeight;
Boolean fUseTitleSep = False; Boolean fUseTitleSep = False;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
Boolean labelIsClientCommand = False; Boolean labelIsClientCommand = False;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
StrList *stringsToFree = NULL, *sPtr; StrList *stringsToFree = NULL, *sPtr;
XmString tmpstr; XmString tmpstr;
#ifndef IBM_151913 #ifndef IBM_151913
@ -3551,9 +3542,9 @@ Widget CreateMenuWidget (WmScreenData *pSD,
{ {
i = 0; i = 0;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
labelIsClientCommand = IsClientCommand(menuItem->label); labelIsClientCommand = IsClientCommand(menuItem->label);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
if (menuItem->wmFunction == F_Separator) if (menuItem->wmFunction == F_Separator)
/* /*
@ -3561,7 +3552,7 @@ Widget CreateMenuWidget (WmScreenData *pSD,
* An immediately following title will not have a top separator. * 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 /* If it is a client command, then we only want to create the
* separator under particular circumstances. Specifically, we * separator under particular circumstances. Specifically, we
* want to make sure that: * want to make sure that:
@ -3586,7 +3577,7 @@ Widget CreateMenuWidget (WmScreenData *pSD,
} }
} }
else else
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
{ {
children[n] = children[n] =
XmCreateSeparatorGadget (menuW, SEPARATOR_NAME, XmCreateSeparatorGadget (menuW, SEPARATOR_NAME,
@ -3596,9 +3587,9 @@ Widget CreateMenuWidget (WmScreenData *pSD,
} /* F_Separator */ } /* F_Separator */
else else
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
if (!labelIsClientCommand) if (!labelIsClientCommand)
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/* /*
* We will use one of: * We will use one of:
* *
@ -3713,11 +3704,11 @@ Widget CreateMenuWidget (WmScreenData *pSD,
i++; i++;
children[n] = XmCreateCascadeButtonGadget (menuW, children[n] = XmCreateCascadeButtonGadget (menuW,
CASCADE_BTN_NAME, (ArgList) args, i); CASCADE_BTN_NAME, (ArgList) args, i);
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
XtAddCallback(children[n], XmNcascadingCallback, XtAddCallback(children[n], XmNcascadingCallback,
(XtCallbackProc)AdjustTearOffControl, (XtCallbackProc)AdjustTearOffControl,
(XtPointer)subMenuW); (XtPointer)subMenuW);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
} }
else else
/* /*
@ -3835,9 +3826,9 @@ Widget CreateMenuWidget (WmScreenData *pSD,
* Increment the children array count if we actually * Increment the children array count if we actually
* created a new child. * created a new child.
*/ */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
if (!labelIsClientCommand) if (!labelIsClientCommand)
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
n++; n++;
/* /*
@ -3957,9 +3948,9 @@ void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y, unsigned int b
XButtonPressedEvent event; XButtonPressedEvent event;
Window saveWindow; Window saveWindow;
Display *saveDisplay; Display *saveDisplay;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
Boolean menuAdjusted; Boolean menuAdjusted;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
if ((menuSpec == NULL) || (menuSpec->menuWidget == NULL)) 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) * change, we may need to remeasure things. (CR 9316)
*/ */
#ifdef WSM
if(pCD && pCD->clientFlags & ICON_BOX) if(pCD && pCD->clientFlags & ICON_BOX)
{ {
newContext |= F_CONTEXT_ICONBOX; newContext |= F_CONTEXT_ICONBOX;
} }
#endif /* WSM */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
menuAdjusted = menuAdjusted =
AdjustTearOffControl(NULL, (XtPointer) (menuSpec->menuWidget), NULL); AdjustTearOffControl(NULL, (XtPointer) (menuSpec->menuWidget), NULL);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
if (AdjustPBs (menuSpec, pCD, newContext) if (AdjustPBs (menuSpec, pCD, newContext)
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
|| menuAdjusted || menuAdjusted
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
) )
{ {
i = 0; 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) * UnmapPulldownCallback (w, client_data, call_data)
@ -4319,7 +4308,7 @@ static void UnmapPulldownCallback (Widget w, XtPointer client_data,
{ {
wmGD.menuActive = (MenuSpec *) NULL; wmGD.menuActive = (MenuSpec *) NULL;
} /* END OF FUNCTION UnmapPulldownCallback */ } /* END OF FUNCTION UnmapPulldownCallback */
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/*************************************<->************************************* /*************************************<->*************************************

View file

@ -33,7 +33,7 @@
/* /*
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (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) \ # define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
MakeMenu(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) \ # define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
@ -43,23 +43,23 @@
MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu) MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu)
# define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \ # define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
CreateMenuWidget(pSD, 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, extern void ActivateCallback (Widget w, caddr_t client_data,
caddr_t call_data); caddr_t call_data);
extern Widget CreateMenuWidget (WmScreenData *pSD, extern Widget CreateMenuWidget (WmScreenData *pSD,
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD, ClientData *pCD,
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, Widget parent, String menuName, Widget parent,
Boolean fTopLevelPane, MenuSpec *topMenuSpec, Boolean fTopLevelPane, MenuSpec *topMenuSpec,
MenuItem *moreMenuItems); MenuItem *moreMenuItems);
extern void FreeCustomMenuSpec (MenuSpec *menuSpec); extern void FreeCustomMenuSpec (MenuSpec *menuSpec);
extern void MWarning (char *format, char *message); extern void MWarning (char *format, char *message);
extern MenuSpec *MakeMenu (WmScreenData *pSD, extern MenuSpec *MakeMenu (WmScreenData *pSD,
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD, ClientData *pCD,
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, String menuName,
Context initialContext, Context accelContext, Context initialContext, Context accelContext,
MenuItem *moreMenuItems, Boolean fSystemMenu); MenuItem *moreMenuItems, Boolean fSystemMenu);
@ -70,7 +70,7 @@ extern void TraversalOff (MenuSpec *menuSpec);
extern void TraversalOn (MenuSpec *menuSpec); extern void TraversalOn (MenuSpec *menuSpec);
extern void UnpostMenu (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, extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree,
Atom selection, Context active_context, Atom selection, Context active_context,
Boolean in_line); Boolean in_line);
@ -85,7 +85,7 @@ extern void ModifyClientCommandTree (WmScreenData *pSD, ClientData *pCD,
String newname); String newname);
extern void DestroyMenuSpecWidgets (MenuSpec *menuspec); extern void DestroyMenuSpecWidgets (MenuSpec *menuspec);
extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID); extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec); extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec);

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED * ALL RIGHTS RESERVED
@ -1760,6 +1759,4 @@ UpdatePresenceWorkspaces(
} /* END OF FUNCTION UpdatePresenceWorkspaces */ } /* END OF FUNCTION UpdatePresenceWorkspaces */
/* DO NOT ADD ANYTHING AFTER THIS ENDIF */
#endif /* WSM */
/**************************** eof ***************************/ /**************************** eof ***************************/

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED * ALL RIGHTS RESERVED
@ -41,4 +40,3 @@ extern MenuItem * GetPresenceBoxMenuItems(
extern void UpdatePresenceWorkspaces( WmScreenData *pSD ); extern void UpdatePresenceWorkspaces( WmScreenData *pSD );
/******** End Public Function Declarations ********/ /******** End Public Function Declarations ********/
#endif /* WSM */

View file

@ -37,11 +37,9 @@
#include "WmGlobal.h" #include "WmGlobal.h"
#include "WmICCC.h" #include "WmICCC.h"
#include <stdio.h> #include <stdio.h>
#ifdef WSM
#include <Dt/WsmP.h> #include <Dt/WsmP.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <Xm/AtomMgr.h> #include <Xm/AtomMgr.h>
#endif /* WSM */
/* /*
* include extern functions * include extern functions
@ -114,7 +112,6 @@ GetNormalHints(
* ICCC_CURRENT version: nitems = PROP_SIZE_HINTS_ELEMENTS * ICCC_CURRENT version: nitems = PROP_SIZE_HINTS_ELEMENTS
*/ */
#ifdef WSM
if ((!HasProperty (pCD, XA_WM_NORMAL_HINTS)) || if ((!HasProperty (pCD, XA_WM_NORMAL_HINTS)) ||
((Success != XGetWindowProperty (DISPLAY, pCD->client, ((Success != XGetWindowProperty (DISPLAY, pCD->client,
XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS, XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS,
@ -123,15 +120,6 @@ GetNormalHints(
(actualType != XA_WM_SIZE_HINTS) || (actualType != XA_WM_SIZE_HINTS) ||
(nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) || (nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) ||
(actualFormat != 32))) (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: * Indicate no property values were retrieved:
@ -259,11 +247,9 @@ void ProcessWmProtocols (ClientData *pCD)
*/ */
#ifndef ICCC_COMPLIANT #ifndef ICCC_COMPLIANT
#ifdef WSM
if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS)) if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS))
rValue = -1; rValue = -1;
else else
#endif /* WSM */
rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_WM_PROTOCOLS, 0L, rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_WM_PROTOCOLS, 0L,
(long)MAX_CLIENT_PROTOCOL_COUNT, False, AnyPropertyType, (long)MAX_CLIENT_PROTOCOL_COUNT, False, AnyPropertyType,
&actualType, &actualFormat, &nitems, &leftover, &actualType, &actualFormat, &nitems, &leftover,
@ -272,11 +258,9 @@ void ProcessWmProtocols (ClientData *pCD)
if ((rValue != Success) || (actualType == None) || (actualFormat != 32)) if ((rValue != Success) || (actualType == None) || (actualFormat != 32))
#else #else
#ifdef WSM
if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS)) if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS))
rValue = -1; rValue = -1;
else else
#endif /* WSM */
rValue = XGetWMProtocols (DISPLAY, pCD->client, rValue = XGetWMProtocols (DISPLAY, pCD->client,
(Atom **)&property, &nitems); (Atom **)&property, &nitems);
@ -384,11 +368,9 @@ void ProcessMwmMessages (ClientData *pCD)
* Read the _MWM_MESSAGES property. * Read the _MWM_MESSAGES property.
*/ */
#ifdef WSM
if (!HasProperty (pCD, wmGD.xa_MWM_MESSAGES)) if (!HasProperty (pCD, wmGD.xa_MWM_MESSAGES))
rValue = ~Success; rValue = ~Success;
else else
#endif /* WSM */
rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_MESSAGES, 0L, rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_MESSAGES, 0L,
(long)MAX_MWM_MESSAGES_COUNT, False, AnyPropertyType, (long)MAX_MWM_MESSAGES_COUNT, False, AnyPropertyType,
&actualType, &actualFormat, &nitems, &leftover, &actualType, &actualFormat, &nitems, &leftover,
@ -481,8 +463,7 @@ void SetMwmInfo (Window propWindow, long flags, Window wmWindow)
} /* END OF FUNCTION SetMwmInfo */ } /* END OF FUNCTION SetMwmInfo */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* SetMwmSaveSessionInfo (wmWindow) * SetMwmSaveSessionInfo (wmWindow)
@ -517,7 +498,7 @@ void SetMwmSaveSessionInfo (Window wmWindow)
SetWMState(wmWindow, NORMAL_STATE, 0); SetWMState(wmWindow, NORMAL_STATE, 0);
} /* END OF FUNCTION SetMwmSaveSessionInfo */ } /* END OF FUNCTION SetMwmSaveSessionInfo */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
@ -667,11 +648,9 @@ GetMwmHints(
unsigned long leftover; unsigned long leftover;
#ifdef WSM
if (!HasProperty(pCD, wmGD.xa_MWM_HINTS)) if (!HasProperty(pCD, wmGD.xa_MWM_HINTS))
ret_val = ~Success; ret_val = ~Success;
else else
#endif /* WSM */
ret_val = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_HINTS, ret_val = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_HINTS,
0L, PROP_MWM_HINTS_ELEMENTS, 0L, PROP_MWM_HINTS_ELEMENTS,
False, wmGD.xa_MWM_HINTS, False, wmGD.xa_MWM_HINTS,
@ -1103,7 +1082,6 @@ GetMwmMenuItems(
} /* END OF FUNCTION GetMwmMenuItems */ } /* END OF FUNCTION GetMwmMenuItems */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
@ -1955,7 +1933,7 @@ HasProperty (
return (bFound); return (bFound);
} /* END OF FUNCTION HasProperty */ } /* END OF FUNCTION HasProperty */
#endif /* WSM */

View file

@ -35,9 +35,7 @@ extern SizeHints * GetNormalHints (ClientData *pCD);
extern void ProcessWmProtocols (ClientData *pCD); extern void ProcessWmProtocols (ClientData *pCD);
extern void ProcessMwmMessages (ClientData *pCD); extern void ProcessMwmMessages (ClientData *pCD);
extern void SetMwmInfo (Window propWindow, long flags, Window wmWindow); extern void SetMwmInfo (Window propWindow, long flags, Window wmWindow);
#ifdef WSM
void SetMwmSaveSessionInfo (Window wmWindow); void SetMwmSaveSessionInfo (Window wmWindow);
#endif /* WSM */
extern void GetDtWmRequest (WmScreenData *pSD, char **pszReq, Boolean *pmore); extern void GetDtWmRequest (WmScreenData *pSD, char **pszReq, Boolean *pmore);
extern void GetDtSessionHints (WmScreenData *pSD, int sNum); extern void GetDtSessionHints (WmScreenData *pSD, int sNum);
@ -49,7 +47,6 @@ extern void ProcessWmColormapWindows (ClientData *pCD);
extern Colormap FindColormap (ClientData *pCD, Window window); extern Colormap FindColormap (ClientData *pCD, Window window);
extern MenuItem * GetMwmMenuItems (ClientData *pCD); extern MenuItem * GetMwmMenuItems (ClientData *pCD);
extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients); extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients);
#ifdef WSM
extern void GetInitialPropertyList (ClientData *pCD); extern void GetInitialPropertyList (ClientData *pCD);
extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll); extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll);
#ifdef HP_VUE #ifdef HP_VUE
@ -64,4 +61,4 @@ extern void SetCurrentWorkspaceProperty (WmScreenData *pSD);
extern void SetWorkspaceInfoProperty (WmWorkspaceData *pWS); extern void SetWorkspaceInfoProperty (WmWorkspaceData *pWS);
extern void DeleteWorkspaceInfoProperty (WmWorkspaceData *pWS); extern void DeleteWorkspaceInfoProperty (WmWorkspaceData *pWS);
extern char *WorkspacePropertyName (WmWorkspaceData *pWS); extern char *WorkspacePropertyName (WmWorkspaceData *pWS);
#endif /* WSM */

View file

@ -51,10 +51,10 @@
#endif /* NO_WMQUERY */ #endif /* NO_WMQUERY */
#include "WmPanelP.h" #include "WmPanelP.h"
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# include "WmCmd.h" # include "WmCmd.h"
# include "WmDebug.h" # include "WmDebug.h"
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/* /*
* Function Declarations: * Function Declarations:
@ -75,13 +75,13 @@ static void wmq_lose (Widget w, Atom *pSelection);
static void wmq_bump_xids(void); static void wmq_bump_xids(void);
#endif /* NO_WMQUERY */ #endif /* NO_WMQUERY */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
static void OwnWMSelections (Time timestamp); static void OwnWMSelections (Time timestamp);
static Boolean WMiConvert (Widget, Atom, Atom, static Boolean WMiConvert (Widget, Atom, Atom,
XtPointer, unsigned long, int, Atom *, XtPointer, unsigned long, int, Atom *,
XtPointer *, unsigned long *, int *); XtPointer *, unsigned long *, int *);
static void WMiConvertCB (Widget, XtPointer, XtPointer); static void WMiConvertCB (Widget, XtPointer, XtPointer);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
/* /*
* Global Variables: * Global Variables:
@ -118,18 +118,18 @@ int curXids = 0;
void SetupWmICCC (void) void SetupWmICCC (void)
{ {
enum { enum {
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
XA_TARGETS, XA_MULTIPLE, XA_TIMESTAMP, XA_TARGETS, XA_MULTIPLE, XA_TIMESTAMP,
#endif #endif
XA_WM_STATE, XA_WM_PROTOCOLS, XA_WM_CHANGE_STATE, XA_WM_STATE, XA_WM_PROTOCOLS, XA_WM_CHANGE_STATE,
XA_WM_SAVE_YOURSELF, XA_WM_DELETE_WINDOW, XA_WM_SAVE_YOURSELF, XA_WM_DELETE_WINDOW,
XA_WM_COLORMAP_WINDOWS, XA_WM_TAKE_FOCUS, XA_MWM_HINTS, XA_WM_COLORMAP_WINDOWS, XA_WM_TAKE_FOCUS, XA_MWM_HINTS,
XA_MWM_MENU, XA_MWM_MESSAGES, XA_MOTIF_WM_OFFSET, 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_CLIENT_WINDOW, XA_MOTIF_WM_POINTER_WINDOW,
XA_MOTIF_WM_ALL_CLIENTS, XA_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_DEFINE_COMMAND, XA_MOTIF_WM_INCLUDE_COMMAND,
XA_MOTIF_WM_REMOVE_COMMAND, XA_MOTIF_WM_ENABLE_COMMAND, XA_MOTIF_WM_REMOVE_COMMAND, XA_MOTIF_WM_ENABLE_COMMAND,
XA_MOTIF_WM_DISABLE_COMMAND, XA_MOTIF_WM_RENAME_COMMAND, XA_MOTIF_WM_DISABLE_COMMAND, XA_MOTIF_WM_RENAME_COMMAND,
@ -139,14 +139,14 @@ void SetupWmICCC (void)
XA_COMPOUND_TEXT, NUM_ATOMS }; XA_COMPOUND_TEXT, NUM_ATOMS };
static char *atom_names[] = { static char *atom_names[] = {
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
_XA_TARGETS, _XA_MULTIPLE, _XA_TIMESTAMP, _XA_TARGETS, _XA_MULTIPLE, _XA_TIMESTAMP,
#endif #endif
_XA_WM_STATE, _XA_WM_PROTOCOLS, _XA_WM_CHANGE_STATE, _XA_WM_STATE, _XA_WM_PROTOCOLS, _XA_WM_CHANGE_STATE,
_XA_WM_SAVE_YOURSELF, _XA_WM_DELETE_WINDOW, _XA_WM_SAVE_YOURSELF, _XA_WM_DELETE_WINDOW,
_XA_WM_COLORMAP_WINDOWS, _XA_WM_TAKE_FOCUS, _XA_MWM_HINTS, _XA_WM_COLORMAP_WINDOWS, _XA_WM_TAKE_FOCUS, _XA_MWM_HINTS,
_XA_MWM_MENU, _XA_MWM_MESSAGES, _XA_MOTIF_WM_OFFSET, _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 # ifdef _XA_MOTIF_WM_CLIENT_WINDOW
_XA_MOTIF_WM_CLIENT_WINDOW, _XA_MOTIF_WM_POINTER_WINDOW, _XA_MOTIF_WM_CLIENT_WINDOW, _XA_MOTIF_WM_POINTER_WINDOW,
_XA_MOTIF_WM_ALL_CLIENTS, _XA_MOTIF_WM_ALL_CLIENTS,
@ -155,7 +155,7 @@ void SetupWmICCC (void)
"_MOTIF_WM_ALL_CLIENTS" "_MOTIF_WM_ALL_CLIENTS"
# endif # endif
#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_DEFINE_COMMAND, _XA_MOTIF_WM_INCLUDE_COMMAND,
_XA_MOTIF_WM_REMOVE_COMMAND, _XA_MOTIF_WM_ENABLE_COMMAND, _XA_MOTIF_WM_REMOVE_COMMAND, _XA_MOTIF_WM_ENABLE_COMMAND,
_XA_MOTIF_WM_DISABLE_COMMAND, _XA_MOTIF_WM_RENAME_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); 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_TARGETS = atoms[XA_TARGETS];
wmGD.xa_MULTIPLE = atoms[XA_MULTIPLE]; wmGD.xa_MULTIPLE = atoms[XA_MULTIPLE];
wmGD.xa_TIMESTAMP = atoms[XA_TIMESTAMP]; 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_STATE = atoms[XA_WM_STATE];
wmGD.xa_WM_PROTOCOLS = atoms[XA_WM_PROTOCOLS]; 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_MESSAGES = atoms[XA_MWM_MESSAGES];
wmGD.xa_MWM_OFFSET = atoms[XA_MOTIF_WM_OFFSET]; wmGD.xa_MWM_OFFSET = atoms[XA_MOTIF_WM_OFFSET];
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/* wm query targets */ /* wm query targets */
wmGD._MOTIF_WM_CLIENT_WINDOW = atoms[XA_MOTIF_WM_CLIENT_WINDOW]; wmGD._MOTIF_WM_CLIENT_WINDOW = atoms[XA_MOTIF_WM_CLIENT_WINDOW];
wmGD._MOTIF_WM_POINTER_WINDOW = atoms[XA_MOTIF_WM_POINTER_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_WINDOW_FLAGS = atoms[XA_MOTIF_WM_WINDOW_FLAGS];
wmGD._MOTIF_WM_AUTOMATION = atoms[XA_MOTIF_WM_AUTOMATION]; 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 * Assert ownership of the WINDOW_MANAGER selection
* on each screen that the window manager controls. * on each screen that the window manager controls.
* these use the format WM_Si. * these use the format WM_Si.
*/ */
OwnWMSelections(GetTimestamp()); OwnWMSelections(GetTimestamp());
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
wmGD.xa_COMPOUND_TEXT = atoms[XA_COMPOUND_TEXT]; 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 () * static void OwnWMSelections ()
@ -1504,4 +1504,4 @@ WMiConvertCB (
&(cnv->type), &(cnv->value), &(cnv->length), &(cnv->format)); &(cnv->type), &(cnv->value), &(cnv->length), &(cnv->format));
} }
} }
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */

View file

@ -96,10 +96,8 @@ long DecStrToL ();
void AddWmResourceConverters (void) void AddWmResourceConverters (void)
{ {
#ifdef WSM
XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRAbsentMapBehavior, XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRAbsentMapBehavior,
(XtConverter)WmCvtStringToAMBehavior, NULL, 0); (XtConverter)WmCvtStringToAMBehavior, NULL, 0);
#endif /* WSM */
XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRCFocusPolicy, XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRCFocusPolicy,
(XtConverter)WmCvtStringToCFocus, NULL, 0); (XtConverter)WmCvtStringToCFocus, NULL, 0);
XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRClientDecor, XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRClientDecor,
@ -123,8 +121,6 @@ void AddWmResourceConverters (void)
} /* END OF FUNCTION AddWmResourceConverters */ } /* END OF FUNCTION AddWmResourceConverters */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* WmCvtStringToAMBehavior (args, numArgs, fromVal, toVal) * WmCvtStringToAMBehavior (args, numArgs, fromVal, toVal)
@ -210,7 +206,6 @@ void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs, XrmValue *fromVa
} /* END OF FUNCTION WmCvtStringToAMBehavior */ } /* END OF FUNCTION WmCvtStringToAMBehavior */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************

View file

@ -31,10 +31,8 @@
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
extern void AddWmResourceConverters (void); extern void AddWmResourceConverters (void);
#ifdef WSM
extern void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs, extern void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs,
XrmValue *fromVal, XrmValue *toVal); XrmValue *fromVal, XrmValue *toVal);
#endif /* WSM */
extern void WmCvtStringToCFocus (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal); extern void WmCvtStringToCFocus (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
extern void WmCvtStringToCDecor (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); extern void WmCvtStringToCFunc (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);

View file

@ -52,14 +52,10 @@
/* mwm specific appearance and behavior resources: */ /* mwm specific appearance and behavior resources: */
#ifdef WSM
#define WmNall "all" #define WmNall "all"
#endif /* WSM */
#define WmNautoKeyFocus "autoKeyFocus" #define WmNautoKeyFocus "autoKeyFocus"
#define WmNautoRaiseDelay "autoRaiseDelay" #define WmNautoRaiseDelay "autoRaiseDelay"
#ifdef WSM
#define WmNbackdropDirectories "backdropDirectories" #define WmNbackdropDirectories "backdropDirectories"
#endif /* WSM */
#define WmNbitmapDirectory "bitmapDirectory" #define WmNbitmapDirectory "bitmapDirectory"
#define WmNblinkOnExec "blinkOnExec" #define WmNblinkOnExec "blinkOnExec"
#define WmNbuttonBindings "buttonBindings" #define WmNbuttonBindings "buttonBindings"
@ -67,9 +63,7 @@
#define WmNclientAutoPlace "clientAutoPlace" #define WmNclientAutoPlace "clientAutoPlace"
#define WmNcolormapFocusPolicy "colormapFocusPolicy" #define WmNcolormapFocusPolicy "colormapFocusPolicy"
#define WmNconfigFile "configFile" #define WmNconfigFile "configFile"
#ifdef WSM
#define WmNcppCommand "cppCommand" #define WmNcppCommand "cppCommand"
#endif /* WSM */
#define WmNdeiconifyKeyFocus "deiconifyKeyFocus" #define WmNdeiconifyKeyFocus "deiconifyKeyFocus"
#define WmNdoubleClickTime "doubleClickTime" #define WmNdoubleClickTime "doubleClickTime"
#define WmNenableWarp "enableWarp" #define WmNenableWarp "enableWarp"
@ -77,13 +71,9 @@
#define WmNfadeNormalIcon "fadeNormalIcon" #define WmNfadeNormalIcon "fadeNormalIcon"
#define WmNfeedbackGeometry "feedbackGeometry" #define WmNfeedbackGeometry "feedbackGeometry"
#define WmNframeBorderWidth "frameBorderWidth" #define WmNframeBorderWidth "frameBorderWidth"
#ifdef WSM
#define WmNframeExternalShadowWidth "frameExternalShadowWidth" #define WmNframeExternalShadowWidth "frameExternalShadowWidth"
#endif /* WSM */
#define WmNfreezeOnConfig "freezeOnConfig" #define WmNfreezeOnConfig "freezeOnConfig"
#ifdef WSM
#define WmNgeometry "geometry" #define WmNgeometry "geometry"
#endif /* WSM */
#define WmNiconAutoPlace "iconAutoPlace" #define WmNiconAutoPlace "iconAutoPlace"
#define WmNiconBoxGeometry "iconBoxGeometry" #define WmNiconBoxGeometry "iconBoxGeometry"
#define WmNiconBoxLayout "iconBoxLayout" #define WmNiconBoxLayout "iconBoxLayout"
@ -93,26 +83,20 @@
#define WmNiconBoxTitle "iconBoxTitle" #define WmNiconBoxTitle "iconBoxTitle"
#define WmNiconClick "iconClick" #define WmNiconClick "iconClick"
#define WmNiconDecoration "iconDecoration" #define WmNiconDecoration "iconDecoration"
#ifdef WSM
#define WmNiconExternalShadowWidth "iconExternalShadowWidth" #define WmNiconExternalShadowWidth "iconExternalShadowWidth"
#endif /* WSM */
#define WmNiconImageMaximum "iconImageMaximum" #define WmNiconImageMaximum "iconImageMaximum"
#define WmNiconImageMinimum "iconImageMinimum" #define WmNiconImageMinimum "iconImageMinimum"
#define WmNiconPlacement "iconPlacement" #define WmNiconPlacement "iconPlacement"
#define WmNiconPlacementMargin "iconPlacementMargin" #define WmNiconPlacementMargin "iconPlacementMargin"
#ifdef WSM
#define WmNimage "image" #define WmNimage "image"
#define WmNimageBackground "imageBackground" #define WmNimageBackground "imageBackground"
#define WmNimageForeground "imageForeground" #define WmNimageForeground "imageForeground"
#endif /* WSM */
#define WmNinteractivePlacement "interactivePlacement" #define WmNinteractivePlacement "interactivePlacement"
#define WmNkeyBindings "keyBindings" #define WmNkeyBindings "keyBindings"
#define WmNkeyboardFocusPolicy "keyboardFocusPolicy" #define WmNkeyboardFocusPolicy "keyboardFocusPolicy"
#define WmNlimitResize "limitResize" #define WmNlimitResize "limitResize"
#define WmNlowerOnIconify "lowerOnIconify" #define WmNlowerOnIconify "lowerOnIconify"
#ifdef WSM
#define WmNmarqueeSelectGranularity "marqueeSelectGranularity" #define WmNmarqueeSelectGranularity "marqueeSelectGranularity"
#endif /* WSM */
#define WmNmaximumMaximumSize "maximumMaximumSize" #define WmNmaximumMaximumSize "maximumMaximumSize"
#define WmNmoveThreshold "moveThreshold" #define WmNmoveThreshold "moveThreshold"
#define WmNmultiScreen "multiScreen" #define WmNmultiScreen "multiScreen"
@ -122,26 +106,17 @@
#define WmNpositionOnScreen "positionOnScreen" #define WmNpositionOnScreen "positionOnScreen"
#define WmNquitTimeout "quitTimeout" #define WmNquitTimeout "quitTimeout"
#define WmNraiseKeyFocus "raiseKeyFocus" #define WmNraiseKeyFocus "raiseKeyFocus"
#ifdef WSM
#define WmNrefreshByClearing "refreshByClearing" #define WmNrefreshByClearing "refreshByClearing"
#endif
#define WmNresizeBorderWidth "resizeBorderWidth" #define WmNresizeBorderWidth "resizeBorderWidth"
#define WmNresizeCursors "resizeCursors" #define WmNresizeCursors "resizeCursors"
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# define WmNrootMenu "rootMenu" # define WmNrootMenu "rootMenu"
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
#ifdef WSM
#define WmNrootButtonClick "rootButtonClick" #define WmNrootButtonClick "rootButtonClick"
#define WmNsecondariesOnTop "secondariesOnTop" #define WmNsecondariesOnTop "secondariesOnTop"
#define WmNsessionVersion "sessionVersion" #define WmNsessionVersion "sessionVersion"
#endif /* WSM */
#ifndef WSM
#define WmNsessionClientDB "sessionClientDB"
#endif /* ! WSM */
#define WmNshowFeedback "showFeedback" #define WmNshowFeedback "showFeedback"
#ifdef WSM
#define WmNshowNames "showNames" #define WmNshowNames "showNames"
#endif /* WSM */
#define WmNstartupKeyFocus "startupKeyFocus" #define WmNstartupKeyFocus "startupKeyFocus"
#define WmNsubpanelDecoration "subpanelDecoration" #define WmNsubpanelDecoration "subpanelDecoration"
#define WmNsubpanelResources "subpanelResources" #define WmNsubpanelResources "subpanelResources"
@ -151,9 +126,7 @@
#define WmNtransientFunctions "transientFunctions" #define WmNtransientFunctions "transientFunctions"
#define WmNuseFrontPanel "useFrontPanel" #define WmNuseFrontPanel "useFrontPanel"
#define WmNuseIconBox "useIconBox" #define WmNuseIconBox "useIconBox"
#ifdef WSM
#define WmNuseWindowOutline "useWindowOutline" #define WmNuseWindowOutline "useWindowOutline"
#endif /* WSM */
#define WmNdtLite "useDtLite" #define WmNdtLite "useDtLite"
#define WmNmoveOpaque "moveOpaque" #define WmNmoveOpaque "moveOpaque"
#define WmNframeStyle "frameStyle" #define WmNframeStyle "frameStyle"
@ -179,15 +152,11 @@
/* mwm - client specific resources: */ /* mwm - client specific resources: */
#ifdef WSM
#define WmNabsentMapBehavior "absentMapBehavior" #define WmNabsentMapBehavior "absentMapBehavior"
#endif /* WSM */
#define WmNclientDecoration "clientDecoration" #define WmNclientDecoration "clientDecoration"
#define WmNclientFunctions "clientFunctions" #define WmNclientFunctions "clientFunctions"
#define WmNfocusAutoRaise "focusAutoRaise" #define WmNfocusAutoRaise "focusAutoRaise"
#ifdef WSM
#define WmNhelpResources "helpResources" #define WmNhelpResources "helpResources"
#endif /* WSM */
#define WmNiconImage "iconImage" #define WmNiconImage "iconImage"
#define WmNiconImageBackground "iconImageBackground" #define WmNiconImageBackground "iconImageBackground"
#define WmNiconImageBottomShadowColor "iconImageBottomShadowColor" #define WmNiconImageBottomShadowColor "iconImageBottomShadowColor"
@ -196,9 +165,7 @@
#define WmNiconImageTopShadowColor "iconImageTopShadowColor" #define WmNiconImageTopShadowColor "iconImageTopShadowColor"
#define WmNiconImageTopShadowPixmap "iconImageTopShadowPixmap" #define WmNiconImageTopShadowPixmap "iconImageTopShadowPixmap"
#define WmNignoreWMSaveHints "ignoreWMSaveHints" #define WmNignoreWMSaveHints "ignoreWMSaveHints"
#ifdef WSM
#define WmNinitialWorkspace "initialWorkspace" #define WmNinitialWorkspace "initialWorkspace"
#endif /* WSM */
#define WmNmatteBackground "matteBackground" #define WmNmatteBackground "matteBackground"
#define WmNmatteBottomShadowColor "matteBottomShadowColor" #define WmNmatteBottomShadowColor "matteBottomShadowColor"
#define WmNmatteBottomShadowPixmap "matteBottomShadowPixmap" #define WmNmatteBottomShadowPixmap "matteBottomShadowPixmap"
@ -212,10 +179,8 @@
#define WmNsystemMenu "windowMenu" #define WmNsystemMenu "windowMenu"
#define WmNuseClientIcon "useClientIcon" #define WmNuseClientIcon "useClientIcon"
#define WmNusePPosition "usePPosition" #define WmNusePPosition "usePPosition"
#ifdef WSM
#define WmNworkspaceList "workspaceList" #define WmNworkspaceList "workspaceList"
#define WmNworkspaceCount "workspaceCount" #define WmNworkspaceCount "workspaceCount"
#endif /* WSM */
/* window manager part resource names: */ /* window manager part resource names: */
@ -225,22 +190,18 @@
#define WmNmenu "menu" #define WmNmenu "menu"
#define WmNtitle "title" #define WmNtitle "title"
#define WmNdefaults "defaults" #define WmNdefaults "defaults"
#ifdef WSM
#define WmNbackdrop "backdrop" #define WmNbackdrop "backdrop"
#define WmNcolorSetId "colorSetId" #define WmNcolorSetId "colorSetId"
#define WmNfrontPanel "frontPanel" #define WmNfrontPanel "frontPanel"
#define WmNworkspaceController "workspaceController" #define WmNworkspaceController "workspaceController"
#define WmNworkspacePresence "workspacePresence" #define WmNworkspacePresence "workspacePresence"
#define WmNworkspaceSwitch "workspaceSwitch" #define WmNworkspaceSwitch "workspaceSwitch"
#endif /* WSM */
/* window manager client resource names: */ /* window manager client resource names: */
#define WmNiconBox "iconbox" #define WmNiconBox "iconbox"
#define WmNconfirmbox "confirmbox" #define WmNconfirmbox "confirmbox"
#ifdef WSM
#define WmNswitcher "switcher" #define WmNswitcher "switcher"
#endif /* WSM */
@ -258,9 +219,7 @@
#define WmCAutoKeyFocus "AutoKeyFocus" #define WmCAutoKeyFocus "AutoKeyFocus"
#define WmCAutoRaiseDelay "AutoRaiseDelay" #define WmCAutoRaiseDelay "AutoRaiseDelay"
#ifdef WSM
#define WmCBackdropDirectories "BackdropDirectories" #define WmCBackdropDirectories "BackdropDirectories"
#endif /* WSM */
#define WmCBitmapDirectory "BitmapDirectory" #define WmCBitmapDirectory "BitmapDirectory"
#define WmCBlinkOnExec "BlinkOnExec" #define WmCBlinkOnExec "BlinkOnExec"
#define WmCButtonBindings "ButtonBindings" #define WmCButtonBindings "ButtonBindings"
@ -268,9 +227,7 @@
#define WmCClientAutoPlace "ClientAutoPlace" #define WmCClientAutoPlace "ClientAutoPlace"
#define WmCColormapFocusPolicy "ColormapFocusPolicy" #define WmCColormapFocusPolicy "ColormapFocusPolicy"
#define WmCConfigFile "ConfigFile" #define WmCConfigFile "ConfigFile"
#ifdef WSM
#define WmCCppCommand "CppCommand" #define WmCCppCommand "CppCommand"
#endif /* WSM */
#define WmCDeiconifyKeyFocus "DeiconifyKeyFocus" #define WmCDeiconifyKeyFocus "DeiconifyKeyFocus"
#define WmCDoubleClickTime "DoubleClickTime" #define WmCDoubleClickTime "DoubleClickTime"
#define WmCEnableWarp "EnableWarp" #define WmCEnableWarp "EnableWarp"
@ -278,13 +235,9 @@
#define WmCFadeNormalIcon "FadeNormalIcon" #define WmCFadeNormalIcon "FadeNormalIcon"
#define WmCFeedbackGeometry "FeedbackGeometry" #define WmCFeedbackGeometry "FeedbackGeometry"
#define WmCFrameBorderWidth "FrameBorderWidth" #define WmCFrameBorderWidth "FrameBorderWidth"
#ifdef WSM
#define WmCFrameExternalShadowWidth "FrameExternalShadowWidth" #define WmCFrameExternalShadowWidth "FrameExternalShadowWidth"
#endif /* WSM */
#define WmCFreezeOnConfig "FreezeOnConfig" #define WmCFreezeOnConfig "FreezeOnConfig"
#ifdef WSM
#define WmCGeometry "Geometry" #define WmCGeometry "Geometry"
#endif /* WSM */
#define WmCIconAutoPlace "IconAutoPlace" #define WmCIconAutoPlace "IconAutoPlace"
#define WmCIconBoxGeometry "IconBoxGeometry" #define WmCIconBoxGeometry "IconBoxGeometry"
#define WmCIconBoxLayout "IconBoxLayout" #define WmCIconBoxLayout "IconBoxLayout"
@ -294,26 +247,20 @@
#define WmCIconBoxTitle "IconBoxTitle" #define WmCIconBoxTitle "IconBoxTitle"
#define WmCIconClick "IconClick" #define WmCIconClick "IconClick"
#define WmCIconDecoration "IconDecoration" #define WmCIconDecoration "IconDecoration"
#ifdef WSM
#define WmCIconExternalShadowWidth "IconExternalShadowWidth" #define WmCIconExternalShadowWidth "IconExternalShadowWidth"
#endif /* WSM */
#define WmCIconImageMaximum "IconImageMaximum" #define WmCIconImageMaximum "IconImageMaximum"
#define WmCIconImageMinimum "IconImageMinimum" #define WmCIconImageMinimum "IconImageMinimum"
#define WmCIconPlacement "IconPlacement" #define WmCIconPlacement "IconPlacement"
#define WmCIconPlacementMargin "IconPlacementMargin" #define WmCIconPlacementMargin "IconPlacementMargin"
#ifdef WSM
#define WmCImage "Image" #define WmCImage "Image"
#define WmCImageBackground "ImageBackground" #define WmCImageBackground "ImageBackground"
#define WmCImageForeground "ImageForeground" #define WmCImageForeground "ImageForeground"
#endif /* WSM */
#define WmCInteractivePlacement "InteractivePlacement" #define WmCInteractivePlacement "InteractivePlacement"
#define WmCKeyBindings "KeyBindings" #define WmCKeyBindings "KeyBindings"
#define WmCKeyboardFocusPolicy "KeyboardFocusPolicy" #define WmCKeyboardFocusPolicy "KeyboardFocusPolicy"
#define WmCLimitResize "LimitResize" #define WmCLimitResize "LimitResize"
#define WmCLowerOnIconify "LowerOnIconify" #define WmCLowerOnIconify "LowerOnIconify"
#ifdef WSM
#define WmCMarqueeSelectGranularity "MarqueeSelectGranularity" #define WmCMarqueeSelectGranularity "MarqueeSelectGranularity"
#endif /* WSM */
#define WmCMaximumMaximumSize "MaximumMaximumSize" #define WmCMaximumMaximumSize "MaximumMaximumSize"
#define WmCMoveThreshold "MoveThreshold" #define WmCMoveThreshold "MoveThreshold"
#define WmCMultiScreen "MultiScreen" #define WmCMultiScreen "MultiScreen"
@ -323,28 +270,19 @@
#define WmCPositionOnScreen "PositionOnScreen" #define WmCPositionOnScreen "PositionOnScreen"
#define WmCQuitTimeout "QuitTimeout" #define WmCQuitTimeout "QuitTimeout"
#define WmCRaiseKeyFocus "RaiseKeyFocus" #define WmCRaiseKeyFocus "RaiseKeyFocus"
#ifdef WSM
#define WmCRefreshByClearing "RefreshByClearing" #define WmCRefreshByClearing "RefreshByClearing"
#endif
#define WmCResizeBorderWidth "ResizeBorderWidth" #define WmCResizeBorderWidth "ResizeBorderWidth"
#define WmCResizeCursors "ResizeCursors" #define WmCResizeCursors "ResizeCursors"
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
# define WmCRootMenu "RootMenu" # define WmCRootMenu "RootMenu"
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
#ifdef WSM
#define WmCRootButtonClick "RootButtonClick" #define WmCRootButtonClick "RootButtonClick"
#define WmCSecondariesOnTop "SecondariesOnTop" #define WmCSecondariesOnTop "SecondariesOnTop"
#define WmCSessionVersion "SessionVersion" #define WmCSessionVersion "SessionVersion"
#endif /* WSM */
#ifndef WSM
#define WmCSessionClientDB "SessionClientDB"
#endif /* ! WSM */
#define WmCScreenList "ScreenList" #define WmCScreenList "ScreenList"
#define WmCScreens "Screens" #define WmCScreens "Screens"
#define WmCShowFeedback "ShowFeedback" #define WmCShowFeedback "ShowFeedback"
#ifdef WSM
#define WmCShowNames "ShowNames" #define WmCShowNames "ShowNames"
#endif /* WSM */
#define WmCStartupKeyFocus "StartupKeyFocus" #define WmCStartupKeyFocus "StartupKeyFocus"
#define WmCSubpanelDecoration "SubpanelDecoration" #define WmCSubpanelDecoration "SubpanelDecoration"
#define WmCSubpanelResources "SubpanelResources" #define WmCSubpanelResources "SubpanelResources"
@ -354,16 +292,12 @@
#define WmCTransientFunctions "TransientFunctions" #define WmCTransientFunctions "TransientFunctions"
#define WmCUseFrontPanel "UseFrontPanel" #define WmCUseFrontPanel "UseFrontPanel"
#define WmCUseIconBox "UseIconBox" #define WmCUseIconBox "UseIconBox"
#ifdef WSM
#define WmCUseWindowOutline "UseWindowOutline" #define WmCUseWindowOutline "UseWindowOutline"
#endif /* WSM */
#define WmCDtLite "UseDtLite" #define WmCDtLite "UseDtLite"
#define WmCMoveOpaque "MoveOpaque" #define WmCMoveOpaque "MoveOpaque"
#define WmCFrameStyle "FrameStyle" #define WmCFrameStyle "FrameStyle"
#ifdef WSM
#define WmCWorkspaceList "WorkspaceList" #define WmCWorkspaceList "WorkspaceList"
#define WmCWorkspaceCount "WorkspaceCount" #define WmCWorkspaceCount "WorkspaceCount"
#endif /* WSM */
/* component appearance resources: */ /* component appearance resources: */
@ -386,15 +320,11 @@
/* mwm - client specific resources: */ /* mwm - client specific resources: */
#ifdef WSM
#define WmCAbsentMapBehavior "AbsentMapBehavior" #define WmCAbsentMapBehavior "AbsentMapBehavior"
#endif /* WSM */
#define WmCClientDecoration "ClientDecoration" #define WmCClientDecoration "ClientDecoration"
#define WmCClientFunctions "ClientFunctions" #define WmCClientFunctions "ClientFunctions"
#define WmCFocusAutoRaise "FocusAutoRaise" #define WmCFocusAutoRaise "FocusAutoRaise"
#ifdef WSM
#define WmCHelpResources "HelpResources" #define WmCHelpResources "HelpResources"
#endif /* WSM */
#define WmCIconImage "IconImage" #define WmCIconImage "IconImage"
#define WmCIconImageBackground "IconImageBackground" #define WmCIconImageBackground "IconImageBackground"
#define WmCIconImageBottomShadowColor "IconImageBottomShadowColor" #define WmCIconImageBottomShadowColor "IconImageBottomShadowColor"
@ -403,9 +333,7 @@
#define WmCIconImageTopShadowColor "IconImageTopShadowColor" #define WmCIconImageTopShadowColor "IconImageTopShadowColor"
#define WmCIconImageTopShadowPixmap "IconImageTopShadowPixmap" #define WmCIconImageTopShadowPixmap "IconImageTopShadowPixmap"
#define WmCIgnoreWMSaveHints "IgnoreWMSaveHints" #define WmCIgnoreWMSaveHints "IgnoreWMSaveHints"
#ifdef WSM
#define WmCInitialWorkspace "InitialWorkspace" #define WmCInitialWorkspace "InitialWorkspace"
#endif /* WSM */
#define WmCMatteBackground "MatteBackground" #define WmCMatteBackground "MatteBackground"
#define WmCMatteBottomShadowColor "MatteBottomShadowColor" #define WmCMatteBottomShadowColor "MatteBottomShadowColor"
#define WmCMatteBottomShadowPixmap "MatteBottomShadowPixmap" #define WmCMatteBottomShadowPixmap "MatteBottomShadowPixmap"
@ -426,22 +354,18 @@
#define WmCMenu "Menu" #define WmCMenu "Menu"
#define WmCTitle "Title" #define WmCTitle "Title"
#define WmCDefaults "Defaults" #define WmCDefaults "Defaults"
#ifdef WSM
#define WmCBackdrop "Backdrop" #define WmCBackdrop "Backdrop"
#define WmCColorSetId "ColorSetId" #define WmCColorSetId "ColorSetId"
#define WmCFrontPanel "FrontPanel" #define WmCFrontPanel "FrontPanel"
#define WmCWorkspaceController "WorkspaceController" #define WmCWorkspaceController "WorkspaceController"
#define WmCWorkspacePresence "WorkspacePresence" #define WmCWorkspacePresence "WorkspacePresence"
#define WmCWorkspaceSwitch "WorkspaceSwitch" #define WmCWorkspaceSwitch "WorkspaceSwitch"
#endif /* WSM */
/* window manager client resource names: */ /* window manager client resource names: */
#define WmCIconBox "Iconbox" #define WmCIconBox "Iconbox"
#define WmCConfirmbox "Confirmbox" #define WmCConfirmbox "Confirmbox"
#ifdef WSM
#define WmCSwitcher "Switcher" #define WmCSwitcher "Switcher"
#endif /* WSM */
@ -455,9 +379,7 @@
* *
*************************************<->***********************************/ *************************************<->***********************************/
#ifdef WSM
#define WmRAbsentMapBehavior "WmAMBehavior" #define WmRAbsentMapBehavior "WmAMBehavior"
#endif /* WSM */
#define WmRCFocusPolicy "WmCFocus" #define WmRCFocusPolicy "WmCFocus"
#define WmRClientDecor "WmCDecor" #define WmRClientDecor "WmCDecor"
#define WmRClientFunction "WmCFunc" #define WmRClientFunction "WmCFunc"
@ -507,6 +429,5 @@
#define WmCHelpDirectory "HelpDirectory" #define WmCHelpDirectory "HelpDirectory"
#ifdef WSM
/************************** eof ************************/ /************************** eof ************************/
#endif /* WSM */

File diff suppressed because it is too large Load diff

View file

@ -36,7 +36,6 @@
extern void ProcessWmFile (WmScreenData *pSD, Boolean bNested); extern void ProcessWmFile (WmScreenData *pSD, Boolean bNested);
extern void ProcessCommandLine (int argc, char *argv[]); extern void ProcessCommandLine (int argc, char *argv[]);
extern void ProcessMotifBindings (void); extern void ProcessMotifBindings (void);
#ifdef WSM
extern Boolean FindDtSessionMatch(int commandArgc, extern Boolean FindDtSessionMatch(int commandArgc,
char **commandArgv, char **commandArgv,
ClientData *pCD, ClientData *pCD,
@ -53,18 +52,10 @@ extern void GetFunctionTableValues (int *execIndex, int *nopIndex,
extern void GetNopIndex (int tableSize, int *nopIndex); extern void GetNopIndex (int tableSize, int *nopIndex);
extern void GetExecIndex (int tableSize, int *execIndex); extern void GetExecIndex (int tableSize, int *execIndex);
extern Boolean GetSessionHintsInfo (WmScreenData *pSD, long numItems); extern Boolean GetSessionHintsInfo (WmScreenData *pSD, long numItems);
#endif /* WSM */
extern FILE * FopenConfigFile (void); extern FILE * FopenConfigFile (void);
extern void FreeMenuItem (MenuItem *menuItem); 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 unsigned char * GetStringC (unsigned char **linePP, Boolean SmBehavior);
extern void SystemCmd (char *pchCmd); extern void SystemCmd (char *pchCmd);
#else /* WSM */
extern unsigned char * GetString (unsigned char **linePP);
#endif /* WSM */
extern Boolean ParseBtnEvent (unsigned char **linePP, extern Boolean ParseBtnEvent (unsigned char **linePP,
unsigned int *eventType, unsigned int *eventType,
unsigned int *button, unsigned int *button,
@ -76,7 +67,6 @@ extern void ParseKeyStr (WmScreenData *pSD, unsigned char *keyStr);
extern Boolean ParseKeyEvent (unsigned char **linePP, unsigned int *eventType, extern Boolean ParseKeyEvent (unsigned char **linePP, unsigned int *eventType,
KeyCode *keyCode, unsigned int *state); KeyCode *keyCode, unsigned int *state);
extern MenuItem * ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr); extern MenuItem * ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr);
#ifdef WSM
extern void ParseSessionClientState (WmScreenData *pSD, int count, extern void ParseSessionClientState (WmScreenData *pSD, int count,
unsigned char *string); unsigned char *string);
extern void ParseSessionCommand (WmScreenData *pSD, int count, 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, extern void ParseSessionHost (WmScreenData *pSD, int count,
unsigned char *string); unsigned char *string);
extern void ParseDtSessionHints (WmScreenData *pSD, unsigned char *property); extern void ParseDtSessionHints (WmScreenData *pSD, unsigned char *property);
#endif /* WSM */
extern int ParseWmFunction (unsigned char **linePP, unsigned int res_spec, WmFunction *pWmFunction); extern int ParseWmFunction (unsigned char **linePP, unsigned int res_spec, WmFunction *pWmFunction);
extern void PWarning (char *message); extern void PWarning (char *message);
extern void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec); extern void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec);
extern void ScanAlphanumeric (unsigned char **linePP); 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 ToLower (unsigned char *string);
extern void SyncModifierStrings(void); extern void SyncModifierStrings(void);
extern void DeleteTempConfigFileIfAny (void); extern void DeleteTempConfigFileIfAny (void);
@ -113,17 +99,15 @@ extern Boolean ParseWmFuncStrArg (unsigned char **linePP,
WmFunction wmFunction, String *pArgs); WmFunction wmFunction, String *pArgs);
extern Boolean ParseWmFuncActionArg (unsigned char **linePP, extern Boolean ParseWmFuncActionArg (unsigned char **linePP,
WmFunction wmFunction, String *pArgs); WmFunction wmFunction, String *pArgs);
#ifdef WSM
#define ToLower(s) (_DtWmParseToLower (s)) #define ToLower(s) (_DtWmParseToLower (s))
#define GetNextLine() (_DtWmParseNextLine (wmGD.pWmPB)) #define GetNextLine() (_DtWmParseNextLine (wmGD.pWmPB))
#define GetSmartSMString(s) (_DtWmParseNextTokenC (s, True)) #define GetSmartSMString(s) (_DtWmParseNextTokenC (s, True))
#define GetSmartString(s) (_DtWmParseNextTokenC (s, False)) #define GetSmartString(s) (_DtWmParseNextTokenC (s, False))
#define GetString(s) (_DtWmParseNextTokenC (s, False)) #define GetString(s) (_DtWmParseNextTokenC (s, False))
#define ScanWhitespace(s) (_DtWmParseSkipWhitespaceC (s)) #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 IsClientCommand (String);
extern Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem, extern Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem,
WmFunction wmFunction); WmFunction wmFunction);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */

View file

@ -60,13 +60,11 @@
#include "WmGraphics.h" #include "WmGraphics.h"
#include "WmMenu.h" #include "WmMenu.h"
#include "WmResParse.h" #include "WmResParse.h"
#ifdef WSM
#include "WmBackdrop.h" #include "WmBackdrop.h"
#include "WmIconBox.h" #include "WmIconBox.h"
#include "WmWrkspace.h" #include "WmWrkspace.h"
#include <Dt/GetDispRes.h> #include <Dt/GetDispRes.h>
#define cfileP (wmGD.pWmPB->pFile) /* fopen'ed configuration file or NULL */ #define cfileP (wmGD.pWmPB->pFile) /* fopen'ed configuration file or NULL */
#endif /* WSM */
#include "WmXSMP.h" #include "WmXSMP.h"
/* /*
@ -113,10 +111,7 @@ void ProcessClientResources (ClientData *pCD);
void SetStdClientResourceValues (ClientData *pCD); void SetStdClientResourceValues (ClientData *pCD);
void SetStdScreenResourceValues (WmScreenData *pSD); void SetStdScreenResourceValues (WmScreenData *pSD);
GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap); GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap);
#ifdef WSM
static void WriteOutXrmColors (WmScreenData *pSD); static void WriteOutXrmColors (WmScreenData *pSD);
#endif /* WSM */
#ifdef WSM
void ProcessPresenceResources (WmScreenData *pSD); void ProcessPresenceResources (WmScreenData *pSD);
void ProcessDefaultBackdropImages (WmScreenData *pSD); void ProcessDefaultBackdropImages (WmScreenData *pSD);
void _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value); 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 _WmIconImageMaximumDefault (Widget widget, int offset, XrmValue *value);
void _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value); void _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value);
int DefaultWsColorSetId (WmWorkspaceData *pWS); int DefaultWsColorSetId (WmWorkspaceData *pWS);
#endif /* WSM */
void _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pixel newBackground, XrmValue *value); void _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pixel newBackground, XrmValue *value);
Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2); Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2);
@ -163,7 +157,7 @@ char builtinSystemMenuName[] = "_MwmWindowMenu_";
char builtinSystemMenu[] = BUILTINSYSTEMMENU; char builtinSystemMenu[] = BUILTINSYSTEMMENU;
#else /* !defined(NO_MESSAGE_CATALOG)*/ #else /* !defined(NO_MESSAGE_CATALOG)*/
char *builtinSystemMenu = BUILTINSYSTEMMENU; char *builtinSystemMenu = BUILTINSYSTEMMENU;
#ifdef WSM
#define DEFAULT_DTWM_SYSTEMMENU "_MwmWindowMenu_\n\ #define DEFAULT_DTWM_SYSTEMMENU "_MwmWindowMenu_\n\
{\n\ {\n\
Restore _R f.restore\n\ Restore _R f.restore\n\
@ -179,7 +173,6 @@ char *builtinSystemMenu = BUILTINSYSTEMMENU;
no-label f.separator\n\ no-label f.separator\n\
Close _C Alt<Key>F4 f.kill\n\ Close _C Alt<Key>F4 f.kill\n\
}" }"
#endif /* WSM */
void InitBuiltinSystemMenu(void) void InitBuiltinSystemMenu(void)
{ {
@ -190,11 +183,9 @@ void InitBuiltinSystemMenu(void)
char *MinString = NULL; char *MinString = NULL;
char *MaxString = NULL; char *MaxString = NULL;
char *LowString = NULL; char *LowString = NULL;
#ifdef WSM
char *OcpString = NULL; char *OcpString = NULL;
char *OcaString = NULL; char *OcaString = NULL;
char *RemString = NULL; char *RemString = NULL;
#endif /* WSM */
char *CloString = NULL; char *CloString = NULL;
char dsm[2048]; char dsm[2048];
char dsmtemp[sizeof(dsm)]; char dsmtemp[sizeof(dsm)];
@ -308,7 +299,7 @@ void InitBuiltinSystemMenu(void)
strcpy(LowString, tmpString); strcpy(LowString, tmpString);
} }
} }
#ifdef WSM
if (DtwmBehavior) if (DtwmBehavior)
{ {
if(gotItAll) if(gotItAll)
@ -357,7 +348,7 @@ void InitBuiltinSystemMenu(void)
} }
} }
} /* if DTWM */ } /* if DTWM */
#endif /* WSM */
if(gotItAll) if(gotItAll)
{ {
tmpString = ((char *)GETMESSAGE(62, 48, "Close _C Alt<Key>F4 f.kill")); tmpString = ((char *)GETMESSAGE(62, 48, "Close _C Alt<Key>F4 f.kill"));
@ -375,7 +366,6 @@ void InitBuiltinSystemMenu(void)
if (!gotItAll) if (!gotItAll)
{ {
#ifdef WSM
if (DtwmBehavior) if (DtwmBehavior)
{ {
builtinSystemMenu = (char *) builtinSystemMenu = (char *)
@ -386,10 +376,6 @@ void InitBuiltinSystemMenu(void)
builtinSystemMenu = (char *) builtinSystemMenu = (char *)
XtNewString((String)BUILTINSYSTEMMENU); XtNewString((String)BUILTINSYSTEMMENU);
} }
#else /* WSM */
builtinSystemMenu = (char *)
XtNewString((String)BUILTINSYSTEMMENU);
#endif /* WSM */
} }
else 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", 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, defaultSystemMenuName, ResString, MovString,
SizString, MinString, MaxString, LowString); SizString, MinString, MaxString, LowString);
#ifdef WSM
if (DtwmBehavior) if (DtwmBehavior)
{ {
snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n%s\n%s\n no-label f.separator\n", snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n%s\n%s\n no-label f.separator\n",
dsm, OcpString, OcaString, RemString); dsm, OcpString, OcaString, RemString);
strcpy(dsm, dsmtemp); strcpy(dsm, dsmtemp);
} }
#endif /* WSM */
snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n}", dsm, CloString); snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n}", dsm, CloString);
strcpy(dsm, dsmtemp); strcpy(dsm, dsmtemp);
@ -412,7 +396,6 @@ void InitBuiltinSystemMenu(void)
(char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL) (char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
{ {
Warning (((char *)GETMESSAGE(62, 21, "Insufficient memory for localized default system menu"))); Warning (((char *)GETMESSAGE(62, 21, "Insufficient memory for localized default system menu")));
#ifdef WSM
if (DtwmBehavior) if (DtwmBehavior)
{ {
builtinSystemMenu = (char *) builtinSystemMenu = (char *)
@ -423,10 +406,6 @@ void InitBuiltinSystemMenu(void)
builtinSystemMenu = (char *) builtinSystemMenu = (char *)
XtNewString((String)BUILTINSYSTEMMENU); XtNewString((String)BUILTINSYSTEMMENU);
} }
#else /* WSM */
builtinSystemMenu = (char *)
XtNewString((String)BUILTINSYSTEMMENU);
#endif /* WSM */
} }
else else
{ {
@ -446,14 +425,12 @@ void InitBuiltinSystemMenu(void)
XtFree(MaxString); XtFree(MaxString);
if (LowString != NULL) if (LowString != NULL)
XtFree(LowString); XtFree(LowString);
#ifdef WSM
if (OcpString != NULL) if (OcpString != NULL)
XtFree(OcpString); XtFree(OcpString);
if (OcaString != NULL) if (OcaString != NULL)
XtFree(OcaString); XtFree(OcaString);
if (RemString != NULL) if (RemString != NULL)
XtFree(RemString); XtFree(RemString);
#endif /* WSM */
if (CloString != NULL) if (CloString != NULL)
XtFree(CloString); XtFree(CloString);
@ -463,9 +440,7 @@ void InitBuiltinSystemMenu(void)
char builtinSystemMenu[]; char builtinSystemMenu[];
#endif /* MCCABE */ #endif /* MCCABE */
#ifdef WSM
#define HARD_CODED_PRIMARY 3 #define HARD_CODED_PRIMARY 3
#endif /* WSM */
char defaultRootMenuName[] = "DefaultRootMenu"; char defaultRootMenuName[] = "DefaultRootMenu";
char builtinRootMenuName[] = "_MwmRootMenu_"; char builtinRootMenuName[] = "_MwmRootMenu_";
#ifndef MCCABE #ifndef MCCABE
@ -537,7 +512,7 @@ char behaviorKeyBindings[];
char defaultButtonBindingsName[] = "DefaultButtonBindings"; char defaultButtonBindingsName[] = "DefaultButtonBindings";
char builtinButtonBindingsName[] = "_MwmButtonBindings_"; char builtinButtonBindingsName[] = "_MwmButtonBindings_";
#ifndef MCCABE #ifndef MCCABE
# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) # if (defined(MWM_QATS_PROTOCOL))
# define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\ # define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
{\n\ {\n\
<Btn1Down> icon|frame f.raise\n\ <Btn1Down> icon|frame f.raise\n\
@ -551,7 +526,7 @@ char builtinButtonBindingsName[] = "_MwmButtonBindings_";
<Btn3Down> icon|frame f.post_wmenu\n\ <Btn3Down> icon|frame f.post_wmenu\n\
<Btn3Down> root f.menu DefaultRootMenu\n\ <Btn3Down> root f.menu DefaultRootMenu\n\
}"; }";
# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ # endif /* defined(MWM_QATS_PROTOCOL) */
char builtinButtonBindings[] = BUILTINBUTTONBINDINGS char builtinButtonBindings[] = BUILTINBUTTONBINDINGS
#else #else
@ -563,10 +538,8 @@ static ClientData *_pCD;
static String _defaultBackground; static String _defaultBackground;
static String _defaultActiveBackground; static String _defaultActiveBackground;
static AppearanceData *_pAppearanceData; static AppearanceData *_pAppearanceData;
#ifdef WSM
static WmWorkspaceData *pResWS; static WmWorkspaceData *pResWS;
static WmScreenData *pResSD; static WmScreenData *pResSD;
#endif /* WSM */
static char _defaultColor1HEX[] = "#A8A8A8A8A8A8"; static char _defaultColor1HEX[] = "#A8A8A8A8A8A8";
static char _defaultColor2HEX[] = "#5F5F92929E9E"; static char _defaultColor2HEX[] = "#5F5F92929E9E";
@ -579,14 +552,12 @@ Const char _foreground[] = "foreground";
Const char _75_foreground[] = "75_foreground"; Const char _75_foreground[] = "75_foreground";
Const char _50_foreground[] = "50_foreground"; Const char _50_foreground[] = "50_foreground";
Const char _25_foreground[] = "25_foreground"; Const char _25_foreground[] = "25_foreground";
#ifdef WSM
Const char *_Dither = XmCO_DITHER; Const char *_Dither = XmCO_DITHER;
Const char *_NoDither = XmCO_NO_DITHER; Const char *_NoDither = XmCO_NO_DITHER;
Const char CLIENT_FRAME_PART[] = "client"; Const char CLIENT_FRAME_PART[] = "client";
Const char ICON_FRAME_PART[] = "icon"; Const char ICON_FRAME_PART[] = "icon";
Const char FEEDBACK_FRAME_PART[] = "feedback"; Const char FEEDBACK_FRAME_PART[] = "feedback";
Const char MENU_ITEM_PART[] = "menu"; Const char MENU_ITEM_PART[] = "menu";
#endif /* WSM */
#define WmBGC XmBACKGROUND #define WmBGC XmBACKGROUND
#define WmFGC XmFOREGROUND #define WmFGC XmFOREGROUND
@ -696,7 +667,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)NULL (XtPointer)NULL
}, },
#ifdef WSM
{ {
WmNcppCommand, WmNcppCommand,
@ -707,7 +677,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)NULL (XtPointer)NULL
}, },
#endif /* WSM */
{ {
WmNdeiconifyKeyFocus, WmNdeiconifyKeyFocus,
@ -748,7 +717,7 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)True (XtPointer)True
}, },
#ifdef WSM
{ {
WmNframeExternalShadowWidth, WmNframeExternalShadowWidth,
WmCFrameExternalShadowWidth, WmCFrameExternalShadowWidth,
@ -758,7 +727,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)2 (XtPointer)2
}, },
#endif /* WSM */
{ {
WmNfreezeOnConfig, WmNfreezeOnConfig,
@ -769,7 +737,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)True (XtPointer)True
}, },
#ifdef WSM
{ {
WmNuseWindowOutline, WmNuseWindowOutline,
@ -780,7 +747,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)False (XtPointer)False
}, },
#endif /* WSM */
{ {
WmNiconAutoPlace, WmNiconAutoPlace,
@ -791,7 +757,7 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)True (XtPointer)True
}, },
#ifdef WSM
{ {
WmNiconExternalShadowWidth, WmNiconExternalShadowWidth,
WmCIconExternalShadowWidth, WmCIconExternalShadowWidth,
@ -801,7 +767,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)2 (XtPointer)2
}, },
#endif /* WSM */
{ {
WmNiconClick, WmNiconClick,
@ -846,7 +811,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)True (XtPointer)True
}, },
#ifdef WSM
{ {
WmNmarqueeSelectGranularity, WmNmarqueeSelectGranularity,
@ -857,7 +821,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)0 (XtPointer)0
}, },
#endif /* WSM */
{ {
WmNmoveThreshold, WmNmoveThreshold,
@ -928,7 +891,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)False (XtPointer)False
}, },
#ifdef WSM
{ {
WmNrefreshByClearing, WmNrefreshByClearing,
@ -949,19 +911,6 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)True (XtPointer)True
}, },
#endif /* WSM */
#ifndef WSM
{
WmNsessionClientDB,
WmCSessionClientDB,
XtRString,
sizeof(String),
XtOffsetOf(WmGlobalData, sessionClientDB),
XtRImmediate,
(XtPointer)NULL
},
#endif /* ! WSM */
{ {
WmNshowFeedback, WmNshowFeedback,
@ -1011,7 +960,7 @@ XtResource wmGlobalResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)True (XtPointer)True
}, },
#ifdef WSM
{ {
WmNhelpDirectory, WmNhelpDirectory,
WmCHelpDirectory, WmCHelpDirectory,
@ -1022,7 +971,6 @@ XtResource wmGlobalResources[] =
(XtPointer)"DT/Dtwm/" (XtPointer)"DT/Dtwm/"
}, },
#endif /* WSM */
{ {
WmNdtLite, WmNdtLite,
WmCDtLite, WmCDtLite,
@ -1048,11 +996,7 @@ XtResource wmGlobalScreenResources[] =
sizeof (Boolean), sizeof (Boolean),
XtOffsetOf(WmGlobalData, multiScreen), XtOffsetOf(WmGlobalData, multiScreen),
XtRImmediate, XtRImmediate,
#ifdef WSM
(XtPointer)True (XtPointer)True
#else /* WSM */
(XtPointer)False
#endif /* WSM */
}, },
{ {
@ -1064,7 +1008,7 @@ XtResource wmGlobalScreenResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)NULL (XtPointer)NULL
}, },
#ifdef WSM
{ WmNbackdropDirectories, { WmNbackdropDirectories,
WmCBackdropDirectories, WmCBackdropDirectories,
XmRString, XmRString,
@ -1073,7 +1017,6 @@ XtResource wmGlobalScreenResources[] =
XmRString, XmRString,
DEFAULT_BACKDROP_DIR DEFAULT_BACKDROP_DIR
}, },
#endif /* WSM */
}; };
@ -1257,7 +1200,6 @@ XtResource wmScreenResources[] =
(XtPointer)USE_ICON_DEFAULT_APPEARANCE (XtPointer)USE_ICON_DEFAULT_APPEARANCE
}, },
#ifdef WSM
{ {
WmNiconImageMaximum, WmNiconImageMaximum,
WmCIconImageMaximum, WmCIconImageMaximum,
@ -1267,17 +1209,6 @@ XtResource wmScreenResources[] =
XtRCallProc, XtRCallProc,
(XtPointer) _WmIconImageMaximumDefault (XtPointer) _WmIconImageMaximumDefault
}, },
#else /* WSM */
{
WmNiconImageMaximum,
WmCIconImageMaximum,
WmRSize,
sizeof (WHSize),
XtOffsetOf (WmScreenData, iconImageMaximum),
XtRString,
"50x50"
},
#endif /* WSM */
{ {
WmNiconImageMinimum, WmNiconImageMinimum,
@ -1328,18 +1259,6 @@ XtResource wmScreenResources[] =
XtRImmediate, XtRImmediate,
(XtPointer) BIGSIZE (XtPointer) BIGSIZE
}, },
#ifndef WSM
{
WmNiconBoxGeometry,
WmCIconBoxGeometry,
XtRString,
sizeof (String),
XtOffsetOf (WmScreenData, iconBoxGeometry),
XtRString,
(XtPointer)NULL
},
#endif /* WSM */
{ {
WmNiconBoxName, WmNiconBoxName,
@ -1421,7 +1340,7 @@ XtResource wmScreenResources[] =
(XtPointer)True (XtPointer)True
}, },
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
{ {
WmNrootMenu, WmNrootMenu,
WmCRootMenu, WmCRootMenu,
@ -1431,7 +1350,7 @@ XtResource wmScreenResources[] =
XtRString, XtRString,
(XtPointer)builtinRootMenuName (XtPointer)builtinRootMenuName
}, },
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
{ {
WmNtransientDecoration, WmNtransientDecoration,
@ -1492,7 +1411,6 @@ XtResource wmScreenResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)False (XtPointer)False
#ifdef WSM
}, },
{ {
@ -1533,7 +1451,6 @@ XtResource wmScreenResources[] =
XtOffsetOf (WmScreenData, numWorkspaces), XtOffsetOf (WmScreenData, numWorkspaces),
XtRImmediate, XtRImmediate,
(XtPointer)0 (XtPointer)0
#endif /* WSM */
} }
}; };
@ -1567,7 +1484,6 @@ XtResource wmStdScreenResources[] =
(XtPointer) BIGSIZE (XtPointer) BIGSIZE
}, },
#ifdef WSM
{ {
WmNiconImageMaximum, WmNiconImageMaximum,
WmCIconImageMaximum, WmCIconImageMaximum,
@ -1577,17 +1493,6 @@ XtResource wmStdScreenResources[] =
XtRCallProc, XtRCallProc,
(XtPointer) _WmIconImageMaximumDefault (XtPointer) _WmIconImageMaximumDefault
}, },
#else /* WSM */
{
WmNiconImageMaximum,
WmCIconImageMaximum,
WmRSize,
sizeof (WHSize),
XtOffsetOf (WmScreenData, iconImageMaximum),
XtRString,
"50x50"
},
#endif /* WSM */
{ {
WmNiconImageMinimum, WmNiconImageMinimum,
@ -1646,7 +1551,6 @@ XtResource wmStdScreenResources[] =
* "Mwm*[screen<#>*]<workspace>*<resource_identifier>". * "Mwm*[screen<#>*]<workspace>*<resource_identifier>".
* *
******************************<->***********************************/ ******************************<->***********************************/
#ifdef WSM
XtResource wmWorkspaceResources[] = 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[] = XtResource wmStdWorkspaceResources[] =
{ {
{ {
@ -1705,12 +1605,8 @@ XtResource wmStdWorkspaceResources[] =
(XtPointer)NULL (XtPointer)NULL
} }
}; };
#else /* WSM */
XtResource *wmStdWorkspaceResources = NULL;
#endif /* WSM */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* wmBackdropResources * wmBackdropResources
@ -1803,9 +1699,7 @@ XtResource wmWsPresenceResources[] =
(XtPointer)NULL (XtPointer)NULL
} }
}; };
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
* *
* wmClientResources * wmClientResources
@ -1824,7 +1718,6 @@ XtResource wmWsPresenceResources[] =
XtResource wmClientResources[] = XtResource wmClientResources[] =
{ {
#ifdef WSM
{ {
WmNabsentMapBehavior, WmNabsentMapBehavior,
WmCAbsentMapBehavior, WmCAbsentMapBehavior,
@ -1834,7 +1727,7 @@ XtResource wmClientResources[] =
XtRImmediate, XtRImmediate,
(XtPointer)(AMAP_BEHAVIOR_ADD) (XtPointer)(AMAP_BEHAVIOR_ADD)
}, },
#endif /* WSM */
{ {
WmNclientDecoration, WmNclientDecoration,
WmCClientDecoration, WmCClientDecoration,
@ -1964,7 +1857,6 @@ XtResource wmClientResources[] =
XtRString, XtRString,
"0x0" "0x0"
}, },
#ifdef WSM
{ {
WmNsecondariesOnTop, WmNsecondariesOnTop,
@ -1975,7 +1867,6 @@ XtResource wmClientResources[] =
XtRCallProc, XtRCallProc,
(XtPointer)_WmSecondariesOnTopDefault (XtPointer)_WmSecondariesOnTopDefault
}, },
#endif /* WSM */
{ {
WmNsystemMenu, WmNsystemMenu,
@ -1994,11 +1885,7 @@ XtResource wmClientResources[] =
sizeof (Boolean), sizeof (Boolean),
XtOffsetOf (ClientData, useClientIcon), XtOffsetOf (ClientData, useClientIcon),
XtRImmediate, XtRImmediate,
#ifdef WSM
(XtPointer)True (XtPointer)True
#else
(XtPointer)False
#endif /* WSM */
}, },
{ {
@ -2123,7 +2010,7 @@ XtResource wmStdClientResources[] =
XtRString, XtRString,
"0x0" "0x0"
}, },
#ifdef WSM
{ {
WmNsecondariesOnTop, WmNsecondariesOnTop,
WmCSecondariesOnTop, WmCSecondariesOnTop,
@ -2133,7 +2020,6 @@ XtResource wmStdClientResources[] =
XtRCallProc, XtRCallProc,
(XtPointer)_WmSecondariesOnTopDefault (XtPointer)_WmSecondariesOnTopDefault
}, },
#endif /* WSM */
{ {
WmNuseClientIcon, WmNuseClientIcon,
@ -2781,7 +2667,6 @@ _WmATopShadowPixmapDefault (Widget widget, int offset, XrmValue *value)
} /* END OF FUNCTION _WmATopShadowPixmapDefault */ } /* END OF FUNCTION _WmATopShadowPixmapDefault */
#ifdef WSM
void void
_WmBackdropBgDefault (Widget widget, int offset, XrmValue *value) _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value)
{ {
@ -2975,7 +2860,6 @@ DefaultWsColorSetId (WmWorkspaceData *pWS)
} /* END OF FUNCTION DefaultWsColorSetId */ } /* END OF FUNCTION DefaultWsColorSetId */
#endif /* WSM */
@ -3060,8 +2944,7 @@ _WmMultiClickTimeDefault (Widget widget, int offset, XrmValue *value)
} /* END OF FUNCTION _WmMultiClickTimeDefault */ } /* END OF FUNCTION _WmMultiClickTimeDefault */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* _WmSecondariesOnTopDefault (widget, offset, value) * _WmSecondariesOnTopDefault (widget, offset, value)
@ -3105,7 +2988,6 @@ _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value)
value->size = sizeof (Boolean); value->size = sizeof (Boolean);
} /* END OF FUNCTION _WmSecondariesOnTopDefault */ } /* END OF FUNCTION _WmSecondariesOnTopDefault */
#endif /* WSM */
@ -3333,8 +3215,7 @@ ProcessScreenListResource (void)
} /* END OF FUNCTION ProcessScreenListResource */ } /* END OF FUNCTION ProcessScreenListResource */
#ifdef WSM
/******************************<->************************************* /******************************<->*************************************
* *
* ProcessWmColors () * ProcessWmColors ()
@ -4200,7 +4081,6 @@ CheckForNoDither (AppearanceData *pAD)
} /* END OF FUNCTION CheckForNoDither */ } /* END OF FUNCTION CheckForNoDither */
#endif /* WSM */
@ -4252,9 +4132,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
(XtPointer) &(pSD->clientAppearance), (XtPointer) &(pSD->clientAppearance),
WmNclient, WmCClient, wmAppearanceResources, WmNclient, WmCClient, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0); XtNumber (wmAppearanceResources), NULL, 0);
#ifdef WSM
CheckForNoDither (&(pSD->clientAppearance)); CheckForNoDither (&(pSD->clientAppearance));
#endif /* WSM */
/* /*
@ -4284,9 +4162,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
(void)XtGetSubresources (clientW, (XtPointer) &(pSD->clientTitleAppearance), (void)XtGetSubresources (clientW, (XtPointer) &(pSD->clientTitleAppearance),
WmNtitle, WmCTitle, wmAppearanceResources, WmNtitle, WmCTitle, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0); XtNumber (wmAppearanceResources), NULL, 0);
#ifdef WSM
CheckForNoDither (&(pSD->clientTitleAppearance)); CheckForNoDither (&(pSD->clientTitleAppearance));
#endif /* WSM */
/* /*
@ -4323,9 +4199,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
(XtPointer) &(pSD->iconAppearance), (XtPointer) &(pSD->iconAppearance),
WmNicon, WmCIcon, wmAppearanceResources, WmNicon, WmCIcon, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0); XtNumber (wmAppearanceResources), NULL, 0);
#ifdef WSM
CheckForNoDither (&(pSD->iconAppearance)); CheckForNoDither (&(pSD->iconAppearance));
#endif /* WSM */
/* /*
@ -4350,9 +4224,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
(XtPointer) &(pSD->feedbackAppearance), (XtPointer) &(pSD->feedbackAppearance),
WmNfeedback, WmCFeedback, wmAppearanceResources, WmNfeedback, WmCFeedback, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0); XtNumber (wmAppearanceResources), NULL, 0);
#ifdef WSM
CheckForNoDither (&(pSD->feedbackAppearance)); CheckForNoDither (&(pSD->feedbackAppearance));
#endif /* WSM */
/* /*
* Process the feedback resource values: * Process the feedback resource values:
@ -4806,7 +4678,6 @@ GetAppearanceGCs (WmScreenData *pSD, Pixel fg, Pixel bg, XFontStruct *font, Pixm
void void
ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
{ {
#ifdef WSM
pResSD = pSD; /* save current screen data for default processing */ pResSD = pSD; /* save current screen data for default processing */
/* /*
* Use the screen name (e.g., "0") as the default resource name. * Use the screen name (e.g., "0") as the default resource name.
@ -4839,35 +4710,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
#endif #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. * 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); pSD->resizeBorderWidth = (int) (avg_res * 2.2);
/* limit size because big borders look ugly */ /* limit size because big borders look ugly */
#ifndef WSM
if (wmGD.frameStyle == WmSLAB)
{
#endif /* WSM */
if (pSD->resizeBorderWidth > 6) pSD->resizeBorderWidth = 6; 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) */ /* 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; pSD->resizeBorderWidth = MAXIMUM_FRAME_BORDER_WIDTH;
} }
#ifdef WSM
/* /*
* Update the resource database. * Update the resource database.
*/ */
WriteOutXrmColors (pSD); WriteOutXrmColors (pSD);
#endif /* WSM */
/* /*
* Process the component appearance resources for client, * Process the component appearance resources for client,
* icon and feedback parts of mwm. * icon and feedback parts of mwm.
@ -5038,7 +4866,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
ProcessAppearanceResources (pSD); ProcessAppearanceResources (pSD);
#ifdef WSM
/* /*
* Process the workspace list and name the initial * Process the workspace list and name the initial
* workspaces * workspaces
@ -5052,7 +4879,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
*/ */
ProcessDefaultBackdropImages (pSD); ProcessDefaultBackdropImages (pSD);
#endif /* WSM */
/* /*
* Save the default icon pixmap in global data. We'll use it only * Save the default icon pixmap in global data. We'll use it only
* as a last resort. * as a last resort.
@ -5064,8 +4890,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
} /* END OF FUNCTION ProcessScreenResources */ } /* END OF FUNCTION ProcessScreenResources */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* ProcessDefaultBackdropImages (pSD) * ProcessDefaultBackdropImages (pSD)
@ -5242,7 +5066,6 @@ ProcessWorkspaceList (WmScreenData *pSD)
} /* END OF FUNCTION ProcessWorkspaceList */ } /* END OF FUNCTION ProcessWorkspaceList */
#endif /* WSM */
/******************************<->************************************* /******************************<->*************************************
@ -5281,9 +5104,7 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
/* /*
* Retrieve workspace specific resources. * Retrieve workspace specific resources.
*/ */
#ifdef WSM
pResWS = pWS; /* save current ws for default processing */ pResWS = pWS; /* save current ws for default processing */
#endif /* WSM */
if (wmGD.useStandardBehavior) if (wmGD.useStandardBehavior)
{ {
@ -5296,9 +5117,7 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
* *
* (no code for this right now) * (no code for this right now)
*/ */
#ifdef WSM
pWS->iconBoxGeometry = NULL; pWS->iconBoxGeometry = NULL;
#endif /* WSM */
} }
else else
{ {
@ -5306,17 +5125,14 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
pWS->name, pWS->name, wmWorkspaceResources, pWS->name, pWS->name, wmWorkspaceResources,
XtNumber (wmWorkspaceResources), NULL, 0); XtNumber (wmWorkspaceResources), NULL, 0);
#ifdef WSM
/* Dup iconbox geometry, it may be free'd later on. */ /* Dup iconbox geometry, it may be free'd later on. */
if (pWS->iconBoxGeometry) if (pWS->iconBoxGeometry)
{ {
pWS->iconBoxGeometry = XtNewString (pWS->iconBoxGeometry); pWS->iconBoxGeometry = XtNewString (pWS->iconBoxGeometry);
} }
#endif /* WSM */
} }
#ifdef WSM
if (pWS->title == NULL) if (pWS->title == NULL)
{ {
/* /*
@ -5352,12 +5168,9 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
XtNumber (wmBackdropResources), NULL, 0); XtNumber (wmBackdropResources), NULL, 0);
ProcessBackdropResources (pWS, 0); ProcessBackdropResources (pWS, 0);
#endif /* WSM */
} /* END OF FUNCTION ProcessWorkspaceResources */ } /* END OF FUNCTION ProcessWorkspaceResources */
#ifdef WSM
/******************************<->************************************* /******************************<->*************************************
* *
* ProcessPresenceResources (pSD) * ProcessPresenceResources (pSD)
@ -5454,7 +5267,6 @@ ProcessPresenceResources (WmScreenData *pSD)
} }
} /* END OF FUNCTION ProcessPresenceResources */ } /* END OF FUNCTION ProcessPresenceResources */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
@ -5624,13 +5436,12 @@ ProcessClientResources (ClientData *pCD)
/* make top and bottom shadow pixmaps */ /* make top and bottom shadow pixmaps */
#ifdef WSM
if (pCD->matteBottomShadowPStr && if (pCD->matteBottomShadowPStr &&
(!strcmp(pCD->matteBottomShadowPStr, _NoDither))) (!strcmp(pCD->matteBottomShadowPStr, _NoDither)))
{ {
pCD->matteBottomShadowPStr = NULL; pCD->matteBottomShadowPStr = NULL;
} }
#endif /* WSM */
if (pCD->matteBottomShadowPStr) if (pCD->matteBottomShadowPStr)
{ {
if ((pCD->matteBottomShadowPStr == if ((pCD->matteBottomShadowPStr ==
@ -5662,13 +5473,12 @@ ProcessClientResources (ClientData *pCD)
pCD->matteBottomShadowPixmap = (Pixmap)NULL; pCD->matteBottomShadowPixmap = (Pixmap)NULL;
} }
#ifdef WSM
if (pCD->matteTopShadowPStr && if (pCD->matteTopShadowPStr &&
(!strcmp(pCD->matteTopShadowPStr, _NoDither))) (!strcmp(pCD->matteTopShadowPStr, _NoDither)))
{ {
pCD->matteTopShadowPStr = NULL; pCD->matteTopShadowPStr = NULL;
} }
#endif /* WSM */
if (pCD->matteTopShadowPStr) if (pCD->matteTopShadowPStr)
{ {
if ((pCD->matteTopShadowPStr == if ((pCD->matteTopShadowPStr ==
@ -5779,9 +5589,9 @@ SetStdClientResourceValues (ClientData *pCD)
void void
SetStdScreenResourceValues (WmScreenData *pSD) SetStdScreenResourceValues (WmScreenData *pSD)
{ {
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
pSD->rootMenu = builtinRootMenuName; pSD->rootMenu = builtinRootMenuName;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
pSD->buttonBindings = builtinButtonBindingsName; pSD->buttonBindings = builtinButtonBindingsName;
pSD->cleanText = True; pSD->cleanText = True;
pSD->iconDecoration = pSD->iconDecoration =
@ -5919,7 +5729,6 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi
if (Monochrome (newScreen)) if (Monochrome (newScreen))
{ {
#ifdef WSM
Boolean ok = False; Boolean ok = False;
/* /*
* Check color server sets for this screen. * Check color server sets for this screen.
@ -5962,7 +5771,6 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi
} }
if (!ok) if (!ok)
{ {
#endif /* WSM */
switch (type) switch (type)
{ {
case WmFGC: newValue = BlackPixelOfScreen (newScreen); break; 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 WmTSC: newValue = WhitePixelOfScreen (newScreen); break;
case WmBSC: newValue = BlackPixelOfScreen (newScreen); break; case WmBSC: newValue = BlackPixelOfScreen (newScreen); break;
} }
#ifdef WSM
} }
#endif /* WSM */
return; return;
} }
@ -6355,7 +6161,7 @@ WmScreenData *pSD;
* set. * set.
*/ */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/* /*
* Before parsing the string, substitute the real name for * Before parsing the string, substitute the real name for
* the default rootmenu using the resource rootMenu * the default rootmenu using the resource rootMenu
@ -6371,7 +6177,7 @@ WmScreenData *pSD;
ParseKeyStr (pSD, (unsigned char *)buffer); ParseKeyStr (pSD, (unsigned char *)buffer);
#else #else
ParseKeyStr (pSD, (unsigned char *)builtinKeyBindings); ParseKeyStr (pSD, (unsigned char *)builtinKeyBindings);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
} }
else else
{ {
@ -6407,7 +6213,7 @@ WmScreenData *pSD;
* set. * set.
*/ */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/* /*
* Before parsing the string, substitute the real name for * Before parsing the string, substitute the real name for
* the default rootmenu using the resource rootMenu * the default rootmenu using the resource rootMenu
@ -6423,7 +6229,7 @@ WmScreenData *pSD;
ParseButtonStr (pSD, (unsigned char *)buffer); ParseButtonStr (pSD, (unsigned char *)buffer);
#else #else
ParseButtonStr (pSD, (unsigned char *)builtinButtonBindings); ParseButtonStr (pSD, (unsigned char *)builtinButtonBindings);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
} }
#ifdef NO_MESSAGE_CATALOG #ifdef NO_MESSAGE_CATALOG
@ -6535,8 +6341,6 @@ Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2)
} /* END OF FUNCTION SimilarAppearanceData */ } /* END OF FUNCTION SimilarAppearanceData */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* Monochrome (screen) * Monochrome (screen)
@ -6596,7 +6400,5 @@ Monochrome (Screen *screen)
return ((DefaultDepthOfScreen(screen) == 1)); return ((DefaultDepthOfScreen(screen) == 1));
} /* END OF FUNCTION Monochrome */ } /* END OF FUNCTION Monochrome */
#endif /* WSM */
#ifdef WSM
/**************************** eof ***************************/ /**************************** eof ***************************/
#endif /* WSM */

View file

@ -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 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 GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap);
extern void MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean makeActiveResources); extern void MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean makeActiveResources);
#ifdef WSM
extern Boolean Monochrome (Screen *screen); extern Boolean Monochrome (Screen *screen);
extern void ProcessWmColors (WmScreenData *pSD); extern void ProcessWmColors (WmScreenData *pSD);
#endif /* WSM */
extern void ProcessWmResources (void); extern void ProcessWmResources (void);
extern void SetStdGlobalResourceValues (void); extern void SetStdGlobalResourceValues (void);
extern void ProcessScreenListResource (void); extern void ProcessScreenListResource (void);
@ -47,9 +45,7 @@ extern void ProcessAppearanceResources (WmScreenData *pSD);
extern void ProcessGlobalScreenResources (void); extern void ProcessGlobalScreenResources (void);
extern void ProcessPresenceResources (WmScreenData *pSD); extern void ProcessPresenceResources (WmScreenData *pSD);
extern void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName); extern void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName);
#ifdef WSM
extern void ProcessWorkspaceList (WmScreenData *pSD); extern void ProcessWorkspaceList (WmScreenData *pSD);
#endif /* WSM */
extern void ProcessWorkspaceResources (WmWorkspaceData *pWS); extern void ProcessWorkspaceResources (WmWorkspaceData *pWS);
extern void ProcessClientResources (ClientData *pCD); extern void ProcessClientResources (ClientData *pCD);
extern void SetStdClientResourceValues (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 char *WmMalloc (char *ptr, unsigned size);
extern void SetupDefaultResources (WmScreenData *pSD); extern void SetupDefaultResources (WmScreenData *pSD);
extern Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2); extern Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2);
#ifdef WSM
extern String ResCat (String s1, String s2, String s3, String s4); extern String ResCat (String s1, String s2, String s3, String s4);
void CheckForNoDither (AppearanceData *pAD); void CheckForNoDither (AppearanceData *pAD);
#endif /* WSM */
#ifndef NO_MESSAGE_CATALOG #ifndef NO_MESSAGE_CATALOG
extern char *builtinSystemMenu; extern char *builtinSystemMenu;
@ -72,6 +66,3 @@ extern char builtinKeyBindings[];
extern char builtinRootMenu[]; extern char builtinRootMenu[];
extern char builtinSystemMenuName[]; extern char builtinSystemMenuName[];
#ifndef WSM
#define Monochrome(screen) ( DefaultDepthOfScreen(screen) == 1 )
#endif /* not WSM */

View file

@ -59,7 +59,6 @@
*/ */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
@ -146,7 +145,6 @@ RestoreDefaultSignalHandlers (void)
(void) sigaction (SIGSYS, &sa, (struct sigaction *) 0); (void) sigaction (SIGSYS, &sa, (struct sigaction *) 0);
#endif #endif
} }
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
@ -162,11 +160,6 @@ RestoreDefaultSignalHandlers (void)
void SetupWmSignalHandlers (int dummy) void SetupWmSignalHandlers (int dummy)
{ {
#ifndef WSM
void (*signalHandler) ();
#endif
#ifdef WSM
struct sigaction sa; struct sigaction sa;
struct sigaction osa; struct sigaction osa;
@ -220,26 +213,6 @@ void SetupWmSignalHandlers (int dummy)
(void) sigaction (SIGSYS, &sa, (struct sigaction *) 0); (void) sigaction (SIGSYS, &sa, (struct sigaction *) 0);
#endif #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 */ } /* END OF FUNCTION SetupWmSignalHandlers */

View file

@ -52,7 +52,6 @@
#define NotGrabbed 0 #define NotGrabbed 0
#define ResizeGrab 1 #define ResizeGrab 1
#define MoveGrab 2 #define MoveGrab 2
#ifdef WSM
/* Anchors */ /* Anchors */
#define ANCHOR_NONE 0 #define ANCHOR_NONE 0
@ -64,7 +63,6 @@
#ifndef ABS #ifndef ABS
#define ABS(x) ((x)>0?(x):(-(x))) #define ABS(x) ((x)>0?(x):(-(x)))
#endif /* ABS */ #endif /* ABS */
#endif /* WSM */
/* number of times to poll before blocking on a config event */ /* 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 int startX, startY;
static unsigned int startWidth, startHeight; static unsigned int startWidth, startHeight;
static unsigned int minWidth, minHeight, maxHeight, maxWidth; static unsigned int minWidth, minHeight, maxHeight, maxWidth;
#ifdef WSM
static int marqueeX, marqueeY; /* root coords of UL corner of are */ static int marqueeX, marqueeY; /* root coords of UL corner of are */
static long marqueeWidth, marqueeHeight; /* size of area */ static long marqueeWidth, marqueeHeight; /* size of area */
static unsigned int marqueeAnchor; /* id of anchor corner */ static unsigned int marqueeAnchor; /* id of anchor corner */
static long marqueeWidth0, marqueeHeight0; /* old size of area */ static long marqueeWidth0, marqueeHeight0; /* old size of area */
#endif /* WSM */
static int opaqueMoveX = 0; /* for cancel request on opaque moves */ static int opaqueMoveX = 0; /* for cancel request on opaque moves */
static int opaqueMoveY = 0; static int opaqueMoveY = 0;
@ -133,9 +129,9 @@ static int moveLastPointerY= 0;
static Boolean anyMotion = FALSE; static Boolean anyMotion = FALSE;
static Boolean configGrab = FALSE; static Boolean configGrab = FALSE;
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
static Boolean grabServer = TRUE; static Boolean grabServer = TRUE;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
Dimension clipWidth = 0; Dimension clipWidth = 0;
Dimension clipHeight = 0; Dimension clipHeight = 0;
@ -1307,7 +1303,6 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
FALSE); FALSE);
} }
} }
#ifdef WSM
else if (wmGD.configAction == MARQUEE_SELECT) else if (wmGD.configAction == MARQUEE_SELECT)
{ {
WmScreenData *pSD; WmScreenData *pSD;
@ -1319,7 +1314,6 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
dtSendMarqueeSelectionNotification(pSD, DT_MARQUEE_SELECT_END, dtSendMarqueeSelectionNotification(pSD, DT_MARQUEE_SELECT_END,
marqueeX, marqueeY, marqueeWidth, marqueeHeight); marqueeX, marqueeY, marqueeWidth, marqueeHeight);
} }
#endif /* WSM */
/* /*
* Clear configuration flags and data. * Clear configuration flags and data.
@ -1332,10 +1326,8 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
anyMotion = FALSE; anyMotion = FALSE;
wmGD.movingIcon = FALSE; wmGD.movingIcon = FALSE;
#ifdef WSM
if (pcd) if (pcd)
{ {
#endif /* WSM */
/* hide the move/resize config data */ /* hide the move/resize config data */
HideFeedbackWindow(pcd->pSD); HideFeedbackWindow(pcd->pSD);
@ -1343,9 +1335,7 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
* Set the focus back to something reasonable * Set the focus back to something reasonable
*/ */
RepairFocus (); RepairFocus ();
#ifdef WSM
} }
#endif /* WSM */
} /* END OF FUNCTION CompleteFrameConfig */ } /* END OF FUNCTION CompleteFrameConfig */
@ -1500,11 +1490,9 @@ void MoveOutline (int x, int y, unsigned int width, unsigned int height)
} }
else else
{ {
#ifdef WSM
if (wmGD.useWindowOutline) if (wmGD.useWindowOutline)
WindowOutline(x,y,width,height); WindowOutline(x,y,width,height);
else else
#endif
FlashOutline(x, y, width, height); FlashOutline(x, y, width, height);
} }
} /* END OF FUNCTION MoveOutline */ } /* END OF FUNCTION MoveOutline */
@ -1571,7 +1559,6 @@ void FlashOutline (int x, int y, unsigned int width, unsigned int height)
} }
} /* END OF FUNCTION FlashOutline */ } /* 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 */ } /* END OF FUNCTION WindowOutline */
#endif /* WSM */
/*************************************<->************************************* /*************************************<->*************************************
@ -2586,7 +2572,7 @@ Boolean StartClientMove (ClientData *pcd, XEvent *pev)
} /* END OF FUNCTION StartClientMove */ } /* END OF FUNCTION StartClientMove */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/*************************************<->************************************* /*************************************<->*************************************
* *
* SetGrabServer () * SetGrabServer ()
@ -2615,7 +2601,7 @@ void SetGrabServer (void)
{ {
grabServer = FALSE; 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) Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTime, ClientData *pCD, Boolean alwaysGrab)
{ {
#ifdef WSM
Window root; Window root;
if (pCD) if (pCD)
@ -2656,9 +2641,6 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi
root = RootWindow (DISPLAY, ACTIVE_PSD->screen); root = RootWindow (DISPLAY, ACTIVE_PSD->screen);
if (pCD && pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD)) 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 * 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, pmask,
GrabModeAsync, /* pointer_mode */ GrabModeAsync, /* pointer_mode */
GrabModeAsync, /* keyboard_mode */ GrabModeAsync, /* keyboard_mode */
#ifdef WSM
root, root,
#else
ROOT_FOR_CLIENT(pCD), /* confine_to window */
#endif
cursor, cursor,
grabTime) != GrabSuccess) 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 * If running automation version of mwm, do not grab the server, since
* this will confuse the automation input synthesis code. * this will confuse the automation input synthesis code.
*/ */
# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) # if (defined(MWM_QATS_PROTOCOL))
if (grabServer == TRUE) if (grabServer == TRUE)
# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ # endif /* defined(MWM_QATS_PROTOCOL) */
if (wmGD.freezeOnConfig) if (wmGD.freezeOnConfig)
{ {
#ifdef WSM
if (!pCD || ((pCD->pSD->moveOpaque && alwaysGrab) || if (!pCD || ((pCD->pSD->moveOpaque && alwaysGrab) ||
(!(pCD->pSD->moveOpaque)))) (!(pCD->pSD->moveOpaque))))
#else /* WSM */
if ((pCD->pSD->moveOpaque && alwaysGrab) ||
(!(pCD->pSD->moveOpaque)))
#endif /* WSM */
{ {
XGrabServer(DISPLAY); XGrabServer(DISPLAY);
} }
@ -2822,10 +2795,8 @@ void CancelFrameConfig (ClientData *pcd)
UndoGrabs(); UndoGrabs();
/* turn off feedback window */ /* turn off feedback window */
#ifdef WSM
if (pcd) if (pcd)
{ {
#endif /* WSM */
HideFeedbackWindow(pcd->pSD); HideFeedbackWindow(pcd->pSD);
/* make sure title bar is popped out */ /* make sure title bar is popped out */
@ -2859,19 +2830,15 @@ void CancelFrameConfig (ClientData *pcd)
opaqueMoveX, opaqueMoveY); opaqueMoveX, opaqueMoveY);
} }
} }
#ifdef WSM
} }
if (wmGD.configAction == MARQUEE_SELECT) if (wmGD.configAction == MARQUEE_SELECT)
{ {
dtSendMarqueeSelectionNotification(ACTIVE_PSD, DT_MARQUEE_SELECT_CANCEL, dtSendMarqueeSelectionNotification(ACTIVE_PSD, DT_MARQUEE_SELECT_CANCEL,
marqueeX, marqueeY, 0, 0); marqueeX, marqueeY, 0, 0);
} }
#endif /* WSM */
/* replace pointer if no motion events received */ /* replace pointer if no motion events received */
#ifdef WSM
if (pcd) if (pcd)
#endif /* WSM */
if (!anyMotion && wmGD.enableWarp) { if (!anyMotion && wmGD.enableWarp) {
XWarpPointer(DISPLAY, None, ROOT_FOR_CLIENT(pcd), XWarpPointer(DISPLAY, None, ROOT_FOR_CLIENT(pcd),
0, 0, 0, 0, wmGD.preMoveX, wmGD.preMoveY); 0, 0, 0, 0, wmGD.preMoveX, wmGD.preMoveY);
@ -2919,20 +2886,16 @@ void
CheckEatButtonRelease (ClientData *pcd, XEvent *pev) CheckEatButtonRelease (ClientData *pcd, XEvent *pev)
{ {
Window grab_win; Window grab_win;
#ifdef WSM
Window root; Window root;
if (pcd != (ClientData *)NULL) if (pcd != (ClientData *)NULL)
root = ROOT_FOR_CLIENT(pcd); root = ROOT_FOR_CLIENT(pcd);
else else
root = RootWindow (DISPLAY, ACTIVE_PSD->screen); root = RootWindow (DISPLAY, ACTIVE_PSD->screen);
#endif /* WSM */
#ifdef WSM
if (pcd == (ClientData *) NULL) if (pcd == (ClientData *) NULL)
grab_win = root; grab_win = root;
else else
#endif /* WSM */
grab_win = GrabWin(pcd, pev); grab_win = GrabWin(pcd, pev);
if ((pev->type == KeyPress || pev->type == KeyRelease) && if ((pev->type == KeyPress || pev->type == KeyRelease) &&
@ -2948,11 +2911,7 @@ CheckEatButtonRelease (ClientData *pcd, XEvent *pev)
ButtonReleaseMask, ButtonReleaseMask,
GrabModeAsync, /* pointer_mode */ GrabModeAsync, /* pointer_mode */
GrabModeAsync, /* keyboard_mode */ GrabModeAsync, /* keyboard_mode */
#ifdef WSM
root, /* confine_to window */ root, /* confine_to window */
#else /* WSM */
ROOT_FOR_CLIENT(pcd), /* confine_to window */
#endif /* WSM */
wmGD.configCursor, wmGD.configCursor,
pev->xbutton.time) == GrabSuccess) pev->xbutton.time) == GrabSuccess)
{ {
@ -2993,9 +2952,7 @@ EatButtonRelease (unsigned int releaseButtons)
while (releaseButtons) while (releaseButtons)
{ {
#ifdef WSM
PullExposureEvents (); PullExposureEvents ();
#endif /* WSM */
XMaskEvent (DISPLAY, ButtonReleaseMask, &event); XMaskEvent (DISPLAY, ButtonReleaseMask, &event);
if (event.type == ButtonRelease) if (event.type == ButtonRelease)
@ -4034,8 +3991,7 @@ Window GrabWin (ClientData *pcd, XEvent *pev)
return (grab_win); return (grab_win);
} /* END OF FUNCTION GrabWin */ } /* END OF FUNCTION GrabWin */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* HandleMarqueeSelect (pSD, event) * HandleMarqueeSelect (pSD, event)
@ -4447,4 +4403,3 @@ Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev)
} /* end switch(keysym) */ } /* end switch(keysym) */
} /* END OF FUNCTION HandleResizeKeyPress */ } /* END OF FUNCTION HandleResizeKeyPress */
#endif /* WSM */

View file

@ -71,9 +71,9 @@ extern void ProcessNewConfiguration (ClientData *pCD, int x, int y,
unsigned int width, unsigned int height, unsigned int width, unsigned int height,
Boolean clientRequest); Boolean clientRequest);
extern void ReGrabPointer (Window grab_win, Time grabTime); extern void ReGrabPointer (Window grab_win, Time grabTime);
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
extern void SetGrabServer (void); 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, extern void SetOutline (XSegment *pOutline, int x, int y, unsigned int width,
unsigned int height, int fatness); unsigned int height, int fatness);
extern void SetPointerPosition (int newX, int newY, int *actualX, 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 Boolean StartResizeConfig (ClientData *pcd, XEvent *pev);
extern int ResizeType (ClientData *pcd, XEvent *pev); extern int ResizeType (ClientData *pcd, XEvent *pev);
extern void UndoGrabs (void); extern void UndoGrabs (void);
#ifdef WSM
extern void HandleMarqueeSelect (WmScreenData *pSD, XEvent *pev); extern void HandleMarqueeSelect (WmScreenData *pSD, XEvent *pev);
extern void StartMarqueeSelect(WmScreenData *pSD, XEvent *pev); extern void StartMarqueeSelect(WmScreenData *pSD, XEvent *pev);
extern void UpdateMarqueeSelectData (WmScreenData *pSD); extern void UpdateMarqueeSelectData (WmScreenData *pSD);
extern Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev); extern Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev);
extern void WindowOutline (int x, int y, unsigned int width, extern void WindowOutline (int x, int y, unsigned int width,
unsigned int height); unsigned int height);
#endif /* WSM */

View file

@ -65,13 +65,9 @@
#include "WmOL.h" #include "WmOL.h"
#include "WmProperty.h" #include "WmProperty.h"
#include "WmResource.h" #include "WmResource.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
#include "WmWinList.h" #include "WmWinList.h"
#ifdef WSM
#include "WmPresence.h" #include "WmPresence.h"
#endif /* WSM */
#include "WmXSMP.h" #include "WmXSMP.h"
#include "WmMultiHead.h" #include "WmMultiHead.h"
@ -87,9 +83,7 @@ static void FixSubpanelEmbeddedClientGeometry (ClientData *pCD);
/* /*
* Global Variables: * Global Variables:
*/ */
#ifdef WSM
WmWorkspaceData *pIconBoxInitialWS; WmWorkspaceData *pIconBoxInitialWS;
#endif /* WSM */
@ -148,9 +142,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
pCD->clientID = ++(pSD->clientCounter); pCD->clientID = ++(pSD->clientCounter);
pCD->clientFlags = WM_INITIALIZATION; pCD->clientFlags = WM_INITIALIZATION;
pCD->iconFlags = 0; pCD->iconFlags = 0;
#ifndef WSM
pCD->pIconBox = NULL;
#endif /* WSM */
pCD->thisIconBox = NULL; pCD->thisIconBox = NULL;
pCD->pECD = NULL; pCD->pECD = NULL;
pCD->pPRCD = NULL; pCD->pPRCD = NULL;
@ -160,9 +151,7 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
pCD->transientLeader = NULL; pCD->transientLeader = NULL;
pCD->transientChildren = NULL; pCD->transientChildren = NULL;
pCD->transientSiblings = NULL; pCD->transientSiblings = NULL;
#ifdef WSM
pCD->primaryStackPosition = 0; pCD->primaryStackPosition = 0;
#endif /* WSM */
pCD->fullModalCount = 0; pCD->fullModalCount = 0;
pCD->primaryModalCount = 0; pCD->primaryModalCount = 0;
pCD->focusPriority = 0; pCD->focusPriority = 0;
@ -172,14 +161,8 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
pCD->clientClass = NULL; pCD->clientClass = NULL;
pCD->clientName = NULL; pCD->clientName = NULL;
pCD->clientFrameWin = (Window)0L; pCD->clientFrameWin = (Window)0L;
#ifndef WSM
pCD->iconFrameWin = (Window)0L;
#endif /* WSM */
pCD->iconWindow = (Window)0L; pCD->iconWindow = (Window)0L;
pCD->iconPixmap = (Pixmap)0L; pCD->iconPixmap = (Pixmap)0L;
#ifndef WSM
pCD->iconPlace = NO_ICON_PLACE;
#endif /* WSM */
pCD->clientProtocols = NULL; pCD->clientProtocols = NULL;
pCD->clientProtocolCount = 0; pCD->clientProtocolCount = 0;
pCD->mwmMessages = NULL; pCD->mwmMessages = NULL;
@ -188,7 +171,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
pCD->clientCmapIndex = 0; pCD->clientCmapIndex = 0;
pCD->clientCmapFlagsInitialized = FALSE; pCD->clientCmapFlagsInitialized = FALSE;
pCD->systemMenuSpec = NULL; pCD->systemMenuSpec = NULL;
#ifdef WSM
pCD->putInAll = False; pCD->putInAll = False;
pCD->pWorkspaceHints = NULL; pCD->pWorkspaceHints = NULL;
pCD->numInhabited = 0; pCD->numInhabited = 0;
@ -197,7 +179,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
pCD->dtwmBehaviors = 0L; pCD->dtwmBehaviors = 0L;
pCD->paInitialProperties = NULL; pCD->paInitialProperties = NULL;
pCD->numInitialProperties = 0; pCD->numInitialProperties = 0;
#endif /* WSM */
pCD->decorFlags = 0L; pCD->decorFlags = 0L;
pCD->pTitleGadgets = NULL; pCD->pTitleGadgets = NULL;
@ -238,7 +219,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
if (manageFlags & MANAGEW_WM_CLIENTS) if (manageFlags & MANAGEW_WM_CLIENTS)
{ {
#ifdef WSM
WmWorkspaceData *pWS; WmWorkspaceData *pWS;
if (manageFlags & MANAGEW_ICON_BOX) if (manageFlags & MANAGEW_ICON_BOX)
@ -250,9 +230,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
pWS = pSD->pActiveWS; pWS = pSD->pActiveWS;
} }
return (GetWmClientInfo (pWS, pCD, manageFlags)); 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; pCD->xBorderWidth = wmGD.windowAttributes.border_width;
#ifdef WSM
/* /*
* Get the initial list of properties on this window. * Get the initial list of properties on this window.
* Save it to optimize subsequent property fetching. * Save it to optimize subsequent property fetching.
*/ */
GetInitialPropertyList (pCD); GetInitialPropertyList (pCD);
#endif /* WSM */
/* /*
* Retrieve and process WM_CLASS hints client window property info: * Retrieve and process WM_CLASS hints client window property info:
@ -326,7 +301,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
ProcessSmClientID (pCD); ProcessSmClientID (pCD);
ProcessWmSaveHint (pCD); ProcessWmSaveHint (pCD);
#ifdef WSM
/* /*
* Set client's workspace information. NOTE: this also may * Set client's workspace information. NOTE: this also may
* set the geometry, initial state, etc. For Sm-aware clients, * 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) * (results are used in ProcessMwmHints)
*/ */
ProcessDtWmHints (pCD); 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: * Retrieve and process M_CLIENT_DECOR client window property info:
@ -486,9 +451,7 @@ GetWmClientInfo (WmWorkspaceData *pWS,
{ {
Pixmap iconBitmap; Pixmap iconBitmap;
#ifdef WSM
int i; int i;
#endif /* WSM */
/* /*
* Set up the client class and name for resource retrieval. * Set up the client class and name for resource retrieval.
@ -574,7 +537,6 @@ int i;
} }
} }
#ifdef WSM
/* /*
* Allocate initial workspace ID list * Allocate initial workspace ID list
* fill with NULL IDs * fill with NULL IDs
@ -601,11 +563,6 @@ int i;
* PutClientIntoWorkspace. * PutClientIntoWorkspace.
*/ */
pCD->numInhabited = 0; pCD->numInhabited = 0;
#else /* WSM */
pCD->iconPlace = NO_ICON_PLACE;
pCD->iconX = 0;
pCD->iconY = 0;
#endif /* WSM */
pCD->windowGroup = 0L; pCD->windowGroup = 0L;
#ifndef NO_OL_COMPAT #ifndef NO_OL_COMPAT
pCD->bPseudoTransient = False; pCD->bPseudoTransient = False;
@ -641,9 +598,7 @@ int i;
if (manageFlags & MANAGEW_ICON_BOX) if (manageFlags & MANAGEW_ICON_BOX)
{ {
pCD->clientFunctions &= ICON_BOX_FUNCTIONS; pCD->clientFunctions &= ICON_BOX_FUNCTIONS;
#ifdef WSM
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
#endif /* WSM */
if (wmGD.useFrontPanel && pCD->pSD->iconBoxControl) if (wmGD.useFrontPanel && pCD->pSD->iconBoxControl)
{ {
/* /*
@ -732,9 +687,7 @@ int i;
Warning (((char *)GETMESSAGE(70, 3, "Couldn't make icon box"))); Warning (((char *)GETMESSAGE(70, 3, "Couldn't make icon box")));
return (NULL); return (NULL);
} }
#ifdef WSM
PutClientIntoWorkspace (pWS, pCD); PutClientIntoWorkspace (pWS, pCD);
#endif /* WSM */
} }
else if (manageFlags & MANAGEW_CONFIRM_BOX) else if (manageFlags & MANAGEW_CONFIRM_BOX)
{ {
@ -756,9 +709,7 @@ int i;
pCD->widthInc = 1; pCD->widthInc = 1;
pCD->heightInc = 1; pCD->heightInc = 1;
pCD->clientFlags |= CONFIRM_BOX; pCD->clientFlags |= CONFIRM_BOX;
#ifdef WSM
PutClientIntoWorkspace (ACTIVE_WS, pCD); PutClientIntoWorkspace (ACTIVE_WS, pCD);
#endif /* WSM */
} }
/* /*
@ -789,7 +740,7 @@ int i;
if (manageFlags & MANAGEW_ICON_BOX) if (manageFlags & MANAGEW_ICON_BOX)
{ {
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/** BEGIN FIX CR 6941 **/ /** BEGIN FIX CR 6941 **/
MenuItem *iconBoxMenuItems, *lastItem; MenuItem *iconBoxMenuItems, *lastItem;
@ -827,7 +778,7 @@ int i;
F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON, F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON,
GetIconBoxMenuItems(PSD_FOR_CLIENT(pCD)), GetIconBoxMenuItems(PSD_FOR_CLIENT(pCD)),
TRUE); TRUE);
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
} }
@ -887,12 +838,8 @@ ProcessWmClass (ClientData *pCD)
classHint.res_name = ""; classHint.res_name = "";
XGetClassHint (DISPLAY, pCD->client, &classHint); XGetClassHint (DISPLAY, pCD->client, &classHint);
#else #else
#ifdef WSM
if ((HasProperty (pCD, XA_WM_CLASS)) && if ((HasProperty (pCD, XA_WM_CLASS)) &&
(XGetClassHint (DISPLAY, pCD->client, &classHint))) (XGetClassHint (DISPLAY, pCD->client, &classHint)))
#else /* WSM */
if (XGetClassHint (DISPLAY, pCD->client, &classHint))
#endif /* WSM */
#endif #endif
{ {
/* the WM_CLASS property exists for the client window */ /* the WM_CLASS property exists for the client window */
@ -1044,11 +991,9 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
register long flags; register long flags;
Pixmap iconPixmap; Pixmap iconPixmap;
Pixmap iconMask; Pixmap iconMask;
#ifdef WSM
WmWorkspaceData *pWsTmp; WmWorkspaceData *pWsTmp;
WsClientData *pWsc; WsClientData *pWsc;
int iws; int iws;
#endif /* WSM */
int tmpIconX, tmpIconY; int tmpIconX, tmpIconY;
@ -1058,11 +1003,9 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
* since they may be none. * since they may be none.
*/ */
#ifdef WSM
if (firstTime && !HasProperty (pCD, XA_WM_HINTS)) if (firstTime && !HasProperty (pCD, XA_WM_HINTS))
pXWMHints = NULL; pXWMHints = NULL;
else else
#endif /* WSM */
pXWMHints = XGetWMHints (DISPLAY, pCD->client); pXWMHints = XGetWMHints (DISPLAY, pCD->client);
if (pXWMHints) if (pXWMHints)
@ -1177,12 +1120,10 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
} }
#ifdef WSM
if (!ClientInWorkspace (PSD_FOR_CLIENT(pCD)->pActiveWS, pCD)) if (!ClientInWorkspace (PSD_FOR_CLIENT(pCD)->pActiveWS, pCD))
{ {
pCD->clientState |= UNSEEN_STATE; pCD->clientState |= UNSEEN_STATE;
} }
#endif /* WSM */
/* /*
@ -1286,7 +1227,6 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
{ {
pCD->iconFlags |= ICON_HINTS_POSITION; pCD->iconFlags |= ICON_HINTS_POSITION;
if (wmGD.iconAutoPlace) if (wmGD.iconAutoPlace)
#ifdef WSM
{ {
/* /*
* Initialize icon placement data in all inhabited * 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 else
{ {
if (wmGD.iconAutoPlace) if (wmGD.iconAutoPlace)
{ {
#ifdef WSM
/* /*
* Initialize icon placement data in all inhabited * Initialize icon placement data in all inhabited
* workspaces * workspaces
@ -1368,11 +1284,6 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
pWsc->iconX = 0; pWsc->iconX = 0;
pWsc->iconY = 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; XmString title_xms = NULL;
if ((pCD->clientDecoration & MWM_DECOR_TITLE) && if ((pCD->clientDecoration & MWM_DECOR_TITLE) &&
#ifdef WSM
(!firstTime || HasProperty (pCD, XA_WM_NAME)) && (!firstTime || HasProperty (pCD, XA_WM_NAME)) &&
#endif /* WSM */
XGetWMName(DISPLAY, pCD->client, &wmNameProp)) XGetWMName(DISPLAY, pCD->client, &wmNameProp))
{ {
title_xms = WmICCCMToXmString(&wmNameProp); title_xms = WmICCCMToXmString(&wmNameProp);
@ -2517,9 +2426,7 @@ ProcessWmIconTitle (ClientData *pCD, Boolean firstTime)
if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) && if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
(pCD->transientLeader == NULL) && (pCD->transientLeader == NULL) &&
#ifdef WSM
(!firstTime || HasProperty(pCD, XA_WM_ICON_NAME)) && (!firstTime || HasProperty(pCD, XA_WM_ICON_NAME)) &&
#endif /* WSM */
XGetWMIconName (DISPLAY, pCD->client, &wmIconNameProp)) XGetWMIconName (DISPLAY, pCD->client, &wmIconNameProp))
{ {
icon_xms = WmICCCMToXmString(&wmIconNameProp); icon_xms = WmICCCMToXmString(&wmIconNameProp);
@ -2594,12 +2501,8 @@ ProcessWmTransientFor (ClientData *pCD)
ClientData *leader; ClientData *leader;
#ifdef WSM
if ((HasProperty (pCD, XA_WM_TRANSIENT_FOR)) && if ((HasProperty (pCD, XA_WM_TRANSIENT_FOR)) &&
(XGetTransientForHint (DISPLAY, pCD->client, &window))) (XGetTransientForHint (DISPLAY, pCD->client, &window)))
#else /* WSM */
if (XGetTransientForHint (DISPLAY, pCD->client, &window))
#endif /* WSM */
{ {
pCD->clientFlags |= CLIENT_TRANSIENT; pCD->clientFlags |= CLIENT_TRANSIENT;
@ -2655,9 +2558,9 @@ ProcessWmTransientFor (ClientData *pCD)
void void
MakeSystemMenu (ClientData *pCD) MakeSystemMenu (ClientData *pCD)
{ {
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
MenuItem *lastItem; MenuItem *lastItem;
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
pCD->mwmMenuItems = GetMwmMenuItems(pCD); pCD->mwmMenuItems = GetMwmMenuItems(pCD);
pCD->systemMenuSpec = pCD->systemMenuSpec =
@ -2692,7 +2595,7 @@ MakeSystemMenu (ClientData *pCD)
* without any documentation. * without any documentation.
*/ */
#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL)) #if (defined(MWM_QATS_PROTOCOL))
/** BEGIN FIX CR 6941 **/ /** BEGIN FIX CR 6941 **/
/* if we still don't have a menu spec, then just abort. */ /* 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, PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE,
pCD->systemMenuSpec, NULL); pCD->systemMenuSpec, NULL);
/** END FIX CR 6941 **/ /** END FIX CR 6941 **/
#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
#endif /* defined(MWM_QATS_PROTOCOL) */ #endif /* defined(MWM_QATS_PROTOCOL) */
} /* END OF FUNCTION MakeSystemMenu */ } /* END OF FUNCTION MakeSystemMenu */
@ -2921,9 +2824,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
Boolean rval = False; Boolean rval = False;
int xoff, yoff; int xoff, yoff;
int origX, origY, origWidth, origHeight; int origX, origY, origWidth, origHeight;
#ifdef WSM
int iwsc; int iwsc;
#endif /* WSM */
/* /*
@ -2954,11 +2855,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
(manageFlags == MANAGEW_NORMAL) && (manageFlags == MANAGEW_NORMAL) &&
!(pCD->clientFlags & CLIENT_TRANSIENT) && !(pCD->clientFlags & CLIENT_TRANSIENT) &&
(pCD->inputMode != MWM_INPUT_SYSTEM_MODAL) && (pCD->inputMode != MWM_INPUT_SYSTEM_MODAL) &&
#ifdef WSM
(ClientInWorkspace(PSD_FOR_CLIENT(pCD)->pActiveWS, pCD))) (ClientInWorkspace(PSD_FOR_CLIENT(pCD)->pActiveWS, pCD)))
#else /* WSM */
(PSD_FOR_CLIENT(pCD) == ACTIVE_PSD))
#endif /* WSM */
{ {
/* /*
* Interactively place the window on the screen. * 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_SUBPANEL)
{ {
if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUB_RESTORED) if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUB_RESTORED)
@ -3043,9 +2939,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
AdjustSlideOutGeometry (pCD); AdjustSlideOutGeometry (pCD);
} }
} }
else else if (((wmGD.positionOnScreen) && !interactivelyPlaced) &&
#endif /* WSM */
if (((wmGD.positionOnScreen) && !interactivelyPlaced) &&
(!(pCD->clientFlags & (SM_X | SM_Y)))) (!(pCD->clientFlags & (SM_X | SM_Y))))
{ {
PlaceFrameOnScreen (pCD, &pCD->clientX, &pCD->clientY, PlaceFrameOnScreen (pCD, &pCD->clientX, &pCD->clientY,
@ -3065,7 +2959,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
if (!wmGD.iconAutoPlace) if (!wmGD.iconAutoPlace)
{ {
#ifdef WSM
if (!(pCD->iconFlags & ICON_HINTS_POSITION)) if (!(pCD->iconFlags & ICON_HINTS_POSITION))
{ {
for (iwsc=0; iwsc<pCD->numInhabited; iwsc++) for (iwsc=0; iwsc<pCD->numInhabited; iwsc++)
@ -3076,14 +2969,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
&pCD->pWsList[iwsc].iconY); &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 */ #endif /* NO_OL_COMPAT */
#ifdef WSM
/* /*
* If primary window can't move between workspaces, then * If primary window can't move between workspaces, then
* secondary window shouldn't either. * secondary window shouldn't either.
@ -4130,7 +4014,6 @@ ProcessMwmHints (ClientData *pCD)
{ {
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS; pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
} }
#endif /* WSM */
/* /*
* Fix up functions based on system modal settings. System modal * Fix up functions based on system modal settings. System modal

View file

@ -55,9 +55,7 @@
#include "WmMenu.h" #include "WmMenu.h"
#include "WmResource.h" #include "WmResource.h"
#include "WmWinInfo.h" #include "WmWinInfo.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
@ -104,9 +102,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
Boolean belowSystemModal = False; Boolean belowSystemModal = False;
XWindowChanges windowChanges; XWindowChanges windowChanges;
WmScreenData *pSD = pWS->pSD; WmScreenData *pSD = pWS->pSD;
#ifdef WSM
WsClientData *pWsc = GetWsClientData (pWS, pCD); WsClientData *pWsc = GetWsClientData (pWS, pCD);
#endif /* WSM */
if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL) 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) if (!pWsc->pIconBox && pWsc->iconFrameWin)
#else /* WSM */
if (!pCD->pIconBox && pCD->iconFrameWin)
#endif /* WSM */
{ {
/* /*
* Put the icon on the bottom of the stack. * 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) if (pSD->lastClient->type == MINIMIZED_STATE)
{ {
#ifdef WSM
WsClientData *pWsib; WsClientData *pWsib;
pWsib = &pSD->lastClient->pCD->pWsList[0]; pWsib = &pSD->lastClient->pCD->pWsList[0];
windowChanges.sibling = pWsib->iconFrameWin; windowChanges.sibling = pWsib->iconFrameWin;
#else /* WSM */
windowChanges.sibling = pSD->lastClient->pCD->iconFrameWin;
#endif /* WSM */
} }
else else
{ {
windowChanges.sibling = pSD->lastClient->pCD->clientFrameWin; windowChanges.sibling = pSD->lastClient->pCD->clientFrameWin;
} }
windowChanges.stack_mode = Below; windowChanges.stack_mode = Below;
#ifdef WSM
XConfigureWindow (DISPLAY, pWsc->iconFrameWin, XConfigureWindow (DISPLAY, pWsc->iconFrameWin,
CWSibling | CWStackMode, &windowChanges); CWSibling | CWStackMode, &windowChanges);
#else /* WSM */
XConfigureWindow (DISPLAY, pCD->iconFrameWin,
CWSibling | CWStackMode, &windowChanges);
#endif /* WSM */
pCD->iconEntry.type = MINIMIZED_STATE; pCD->iconEntry.type = MINIMIZED_STATE;
pCD->iconEntry.pCD = pCD; pCD->iconEntry.pCD = pCD;
@ -444,9 +427,7 @@ void DeleteEntryFromList (WmWorkspaceData *pWS, ClientListEntry *pListEntry)
void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD) void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
{ {
#ifdef WSM
WsClientData *pWsc = GetWsClientData (pWS, pCD); WsClientData *pWsc = GetWsClientData (pWS, pCD);
#endif /* WSM */
WmScreenData *pSD = pWS->pSD; WmScreenData *pSD = pWS->pSD;
if (pCD->transientLeader) if (pCD->transientLeader)
@ -469,11 +450,7 @@ void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
* Remove the client and icon entries from the window list. * Remove the client and icon entries from the window list.
*/ */
#ifdef WSM
if (!pWsc->pIconBox && pWsc->iconFrameWin) if (!pWsc->pIconBox && pWsc->iconFrameWin)
#else /* WSM */
if (!pCD->pIconBox && pCD->iconFrameWin)
#endif /* WSM */
{ {
if (pCD->iconEntry.prevSibling) if (pCD->iconEntry.prevSibling)
{ {
@ -1012,12 +989,10 @@ Boolean PutTransientOnTop (ClientData *pcd)
{ {
restack = True; restack = True;
} }
#ifdef WSM
if (BumpPrimaryToBottom (pcdLeader)) if (BumpPrimaryToBottom (pcdLeader))
{ {
restack = True; restack = True;
} }
#endif /* WSM */
} }
return (restack); return (restack);
@ -1116,9 +1091,6 @@ void RestackTransients (ClientData *pcd)
int count; int count;
static int size = 0; static int size = 0;
static Window *windows = NULL; static Window *windows = NULL;
#ifndef WSM
Window *nextWindow;
#endif /* WSM */
XWindowChanges windowChanges; XWindowChanges windowChanges;
int i; int i;
int leaderIndex; int leaderIndex;
@ -1150,12 +1122,7 @@ void RestackTransients (ClientData *pcd)
size = count + 5; size = count + 5;
} }
#ifdef WSM
MakeTransientFamilyStackingList (windows, pcdLeader); MakeTransientFamilyStackingList (windows, pcdLeader);
#else /* WSM */
nextWindow = MakeTransientWindowList (windows, pcdLeader);
*nextWindow = pcdLeader->clientFrameWin;
#endif /* WSM */
/* /*
* Changes for CDExc19397. * Changes for CDExc19397.
@ -1471,7 +1438,6 @@ ClientData * FindTransientOnTop (ClientData *pcd)
*/ */
pcd = FindTransientTreeLeader (pcd); pcd = FindTransientTreeLeader (pcd);
#ifdef WSM
if (!(pcd->secondariesOnTop) && if (!(pcd->secondariesOnTop) &&
(LeaderOnTop (pcd))) (LeaderOnTop (pcd)))
{ {
@ -1489,7 +1455,6 @@ ClientData * FindTransientOnTop (ClientData *pcd)
return (pcdSub); return (pcdSub);
} }
} }
#endif /* WSM */
/* /*
@ -1655,7 +1620,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
} }
else else
{ {
#ifdef WSM
/* /*
* Adjust stack entry window if we're stacking below a * Adjust stack entry window if we're stacking below a
* transient tree. * transient tree.
@ -1665,7 +1629,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
stackWindow = LowestWindowInTransientFamily (pStackEntry->pCD); stackWindow = LowestWindowInTransientFamily (pStackEntry->pCD);
} }
#endif /* WSM */
if (stackWindow == 0) if (stackWindow == 0)
{ {
if (pSD->lastClient->type == MINIMIZED_STATE) if (pSD->lastClient->type == MINIMIZED_STATE)
@ -1674,14 +1637,12 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
} }
else else
{ {
#ifdef WSM
if (pSD->lastClient->pCD->transientChildren) if (pSD->lastClient->pCD->transientChildren)
{ {
stackWindow = stackWindow =
LowestWindowInTransientFamily (pSD->lastClient->pCD); LowestWindowInTransientFamily (pSD->lastClient->pCD);
} }
else else
#endif /* WSM */
stackWindow = pSD->lastClient->pCD->clientFrameWin; stackWindow = pSD->lastClient->pCD->clientFrameWin;
} }
} }
@ -1882,7 +1843,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB)
int bY1; int bY1;
int bY2; int bY2;
#ifdef WSM
/* /*
* For workspace stuff: if either is unseen, then neither * For workspace stuff: if either is unseen, then neither
* is obscured. * is obscured.
@ -1892,7 +1852,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB)
{ {
return (False); return (False);
} }
#endif /* WSM */
if (pcdA->clientState == NORMAL_STATE) if (pcdA->clientState == NORMAL_STATE)
{ {
@ -2423,8 +2382,7 @@ ClientListEntry * FindClientNameMatch (ClientListEntry *pEntry,
return (pEntry); return (pEntry);
} /* END OF FUNCTION FindClientNameMatch */ } /* END OF FUNCTION FindClientNameMatch */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* BumpPrimaryToTop (pcdLeader) * BumpPrimaryToTop (pcdLeader)
@ -2821,4 +2779,3 @@ LeaderOnTop (
return (bOnTop); return (bOnTop);
} }
#endif /* WSM */

View file

@ -36,10 +36,8 @@ extern void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD,
extern void AddEntryToList (WmWorkspaceData *pWS, ClientListEntry *pEntry, extern void AddEntryToList (WmWorkspaceData *pWS, ClientListEntry *pEntry,
Boolean onTop, ClientListEntry *pStackEntry); Boolean onTop, ClientListEntry *pStackEntry);
extern void AddTransient (WmWorkspaceData *pWS, ClientData *pCD); extern void AddTransient (WmWorkspaceData *pWS, ClientData *pCD);
#ifdef WSM
extern Boolean BumpPrimaryToBottom (ClientData *pcdLeader); extern Boolean BumpPrimaryToBottom (ClientData *pcdLeader);
extern Boolean BumpPrimaryToTop (ClientData *pcdLeader); extern Boolean BumpPrimaryToTop (ClientData *pcdLeader);
#endif /* WSM */
extern Boolean CheckIfClientObscuredByAny (ClientData *pcd); extern Boolean CheckIfClientObscuredByAny (ClientData *pcd);
extern Boolean CheckIfClientObscuring (ClientData *pcdTop, ClientData *pcd); extern Boolean CheckIfClientObscuring (ClientData *pcdTop, ClientData *pcd);
extern Boolean CheckIfClientObscuringAny (ClientData *pcd); extern Boolean CheckIfClientObscuringAny (ClientData *pcd);
@ -55,28 +53,22 @@ extern ClientListEntry *FindClientNameMatch (ClientListEntry *pEntry,
Boolean toNext, Boolean toNext,
String clientName, String clientName,
unsigned long types); unsigned long types);
#ifdef WSM
extern ClientData *FindSubLeaderToTop (ClientData *pcd); extern ClientData *FindSubLeaderToTop (ClientData *pcd);
#endif /* WSM */
extern ClientData *FindTransientFocus (ClientData *pcd); extern ClientData *FindTransientFocus (ClientData *pcd);
extern ClientData *FindTransientOnTop (ClientData *pcd); extern ClientData *FindTransientOnTop (ClientData *pcd);
extern ClientData *FindTransientTreeLeader (ClientData *pcd); extern ClientData *FindTransientTreeLeader (ClientData *pcd);
extern void FixupFullAppModalCounts (ClientData *pcdLeader, extern void FixupFullAppModalCounts (ClientData *pcdLeader,
ClientData *pcdDelete); ClientData *pcdDelete);
#ifdef WSM
extern Boolean LeaderOnTop (ClientData *pcdLeader); extern Boolean LeaderOnTop (ClientData *pcdLeader);
extern Window LowestWindowInTransientFamily (ClientData *pcdLeader); extern Window LowestWindowInTransientFamily (ClientData *pcdLeader);
extern void MakeTransientFamilyStackingList (Window *windows, extern void MakeTransientFamilyStackingList (Window *windows,
ClientData *pcdLeader); ClientData *pcdLeader);
#endif /* WSM */
extern Window *MakeTransientWindowList (Window *windows, ClientData *pcd); extern Window *MakeTransientWindowList (Window *windows, ClientData *pcd);
extern void MarkModalSubtree (ClientData *pcdTree, ClientData *pcdAvoid); extern void MarkModalSubtree (ClientData *pcdTree, ClientData *pcdAvoid);
extern void MarkModalTransient (ClientData *pcdLeader, ClientData *pCD); extern void MarkModalTransient (ClientData *pcdLeader, ClientData *pCD);
extern void MoveEntryInList (WmWorkspaceData *pWS, ClientListEntry *pEntry, extern void MoveEntryInList (WmWorkspaceData *pWS, ClientListEntry *pEntry,
Boolean onTop, ClientListEntry *pStackEntry); Boolean onTop, ClientListEntry *pStackEntry);
#ifdef WSM
extern Boolean NormalizeTransientTreeStacking (ClientData *pcdLeader); extern Boolean NormalizeTransientTreeStacking (ClientData *pcdLeader);
#endif /* WSM */
extern Boolean PutTransientBelowSiblings (ClientData *pcd); extern Boolean PutTransientBelowSiblings (ClientData *pcd);
extern Boolean PutTransientOnTop (ClientData *pcd); extern Boolean PutTransientOnTop (ClientData *pcd);
extern void RestackTransients (ClientData *pcd); extern void RestackTransients (ClientData *pcd);

View file

@ -56,9 +56,7 @@
#include "WmProperty.h" #include "WmProperty.h"
#include "WmWinInfo.h" #include "WmWinInfo.h"
#include "WmWinList.h" #include "WmWinList.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#endif /* WSM */
/* /*
@ -117,9 +115,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
ClientData *pcdLeader; ClientData *pcdLeader;
int currentState; int currentState;
WmScreenData *pSD = PSD_FOR_CLIENT(pCD); WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
#ifdef WSM
Boolean notShowing = (newState & UNSEEN_STATE); Boolean notShowing = (newState & UNSEEN_STATE);
#endif /* WSM */
currentState = pCD->clientState; currentState = pCD->clientState;
if (currentState == newState) if (currentState == newState)
@ -136,9 +132,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
*/ */
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD; pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
#ifdef WSM
SetClientWsIndex (pCD); SetClientWsIndex (pCD);
#endif /* WSM */
if (pCD->transientLeader) if (pCD->transientLeader)
{ {
@ -146,12 +140,10 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
(newState != WITHDRAWN_STATE)) (newState != WITHDRAWN_STATE))
{ {
newState = MINIMIZED_STATE; newState = MINIMIZED_STATE;
#ifdef WSM
if (notShowing) if (notShowing)
{ {
newState |= UNSEEN_STATE; newState |= UNSEEN_STATE;
} }
#endif /* WSM */
} }
else if ((newState == MINIMIZED_STATE) && else if ((newState == MINIMIZED_STATE) &&
(pcdLeader->clientState != MINIMIZED_STATE)) (pcdLeader->clientState != MINIMIZED_STATE))
@ -159,22 +151,18 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
if (currentState == WITHDRAWN_STATE) if (currentState == WITHDRAWN_STATE)
{ {
newState = NORMAL_STATE; newState = NORMAL_STATE;
#ifdef WSM
if (notShowing) if (notShowing)
{ {
newState |= UNSEEN_STATE; newState |= UNSEEN_STATE;
} }
#endif /* WSM */
} }
else else
{ {
newState = currentState; newState = currentState;
#ifdef WSM
if (notShowing) if (notShowing)
{ {
newState |= UNSEEN_STATE; newState |= UNSEEN_STATE;
} }
#endif /* WSM */
} }
} }
if (newState == currentState) if (newState == currentState)
@ -186,11 +174,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
switch (newState) switch (newState)
{ {
#ifdef WSM
case UNSEEN_STATE | WITHDRAWN_STATE: case UNSEEN_STATE | WITHDRAWN_STATE:
#else
case WITHDRAWN_STATE:
#endif /* WSM */
{ {
/* /*
* Free window manager resources (frame and icon). The * Free window manager resources (frame and icon). The
@ -205,11 +189,9 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
case MAXIMIZED_STATE: case MAXIMIZED_STATE:
{ {
SetupWindowStateWithEventMask (pCD, newState, setTime, event_mask); SetupWindowStateWithEventMask (pCD, newState, setTime, event_mask);
#ifdef WSM
XMapWindow (DISPLAY, pCD->client); XMapWindow (DISPLAY, pCD->client);
XMapWindow (DISPLAY, pCD->clientFrameWin); XMapWindow (DISPLAY, pCD->clientFrameWin);
WmStopWaiting(); /* in WmIPC.c */ WmStopWaiting(); /* in WmIPC.c */
#endif /* WSM */
break; break;
} }
@ -275,7 +257,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
if (ICON_FRAME_WIN(pCD)) if (ICON_FRAME_WIN(pCD))
{ {
#ifdef WSM
if (pCD->clientState & UNSEEN_STATE) if (pCD->clientState & UNSEEN_STATE)
{ {
if (pCD->iconWindow) if (pCD->iconWindow)
@ -286,9 +267,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
} }
ShowAllIconsForMinimizedClient (pCD); ShowAllIconsForMinimizedClient (pCD);
#else /* WSM */
ShowIconForMinimizedClient (pSD->pActiveWS, pCD);
#endif /* WSM */
} }
SetClientWMState (pCD, IconicState, MINIMIZED_STATE); SetClientWMState (pCD, IconicState, MINIMIZED_STATE);
@ -317,7 +295,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
break; break;
} }
#ifdef WSM
case UNSEEN_STATE | NORMAL_STATE: case UNSEEN_STATE | NORMAL_STATE:
case UNSEEN_STATE | MAXIMIZED_STATE: case UNSEEN_STATE | MAXIMIZED_STATE:
@ -369,7 +346,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
} }
} }
break; break;
#endif /* WSM */
} }
} /* END OF FUNCTION SetClientStateWithEventMask */ } /* END OF FUNCTION SetClientStateWithEventMask */
@ -408,12 +384,8 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
Time setTime, unsigned int event_mask) Time setTime, unsigned int event_mask)
{ {
int currentState; int currentState;
#ifdef WSM
int wsI, iplace; int wsI, iplace;
WmWorkspaceData *pWS_i; WmWorkspaceData *pWS_i;
#else /* WSM */
WmWorkspaceData *pWS = PSD_FOR_CLIENT(pCD)->pActiveWS;
#endif /* WSM */
WmScreenData *pSD = PSD_FOR_CLIENT(pCD); WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
currentState = pCD->clientState; currentState = pCD->clientState;
@ -500,7 +472,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
XMaskEvent(DISPLAY, event_mask, &event); XMaskEvent(DISPLAY, event_mask, &event);
XUngrabPointer(DISPLAY,CurrentTime); XUngrabPointer(DISPLAY,CurrentTime);
} }
#ifdef WSM
if (wmGD.iconAutoPlace) if (wmGD.iconAutoPlace)
{ {
for (wsI = 0; wsI < pCD->numInhabited; wsI++) 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) if (clearIconFocus)
@ -546,13 +510,9 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
*/ */
pCD->clientState = newState; pCD->clientState = newState;
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True; wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Raise (NULL, pCD, NULL); F_Raise (NULL, pCD, NULL);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False; wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
} }
if ( (!(pCD->clientFlags & ICON_BOX)) || 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) void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
{ {
ClientData *pNext; ClientData *pNext;
#ifdef WSM
Boolean bToUnseen; Boolean bToUnseen;
bToUnseen = (mwmState & UNSEEN_STATE) != 0; bToUnseen = (mwmState & UNSEEN_STATE) != 0;
mwmState &= ~UNSEEN_STATE; mwmState &= ~UNSEEN_STATE;
#endif /* WSM */
#ifdef WSM
SetClientWsIndex (pCD); SetClientWsIndex (pCD);
#endif /* WSM */
pNext = pCD->transientChildren; pNext = pCD->transientChildren;
while (pNext) while (pNext)
{ {
@ -792,37 +748,29 @@ void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
SetClientWMState (pNext, wmState, mwmState); SetClientWMState (pNext, wmState, mwmState);
} }
#ifdef WSM
SetClientWsIndex (pNext); SetClientWsIndex (pNext);
#endif /* WSM */
SetWMState (pNext->client, wmState, ICON_FRAME_WIN(pNext)); SetWMState (pNext->client, wmState, ICON_FRAME_WIN(pNext));
if (pNext->maxConfig && mwmState == NORMAL_STATE) if (pNext->maxConfig && mwmState == NORMAL_STATE)
{ {
pNext->clientState = MAXIMIZED_STATE; pNext->clientState = MAXIMIZED_STATE;
} }
#ifdef WSM
else if (!pNext->maxConfig && mwmState == MAXIMIZED_STATE) else if (!pNext->maxConfig && mwmState == MAXIMIZED_STATE)
{ {
pNext->clientState = NORMAL_STATE; pNext->clientState = NORMAL_STATE;
} }
#endif /* WSM */
else else
{ {
pNext->clientState = mwmState; pNext->clientState = mwmState;
} }
#ifdef WSM
if (bToUnseen) if (bToUnseen)
pNext->clientState |= UNSEEN_STATE; pNext->clientState |= UNSEEN_STATE;
#endif /* WSM */
pNext = pNext->transientSiblings; pNext = pNext->transientSiblings;
} }
SetWMState (pCD->client, wmState, ICON_FRAME_WIN(pCD)); SetWMState (pCD->client, wmState, ICON_FRAME_WIN(pCD));
pCD->clientState = mwmState; pCD->clientState = mwmState;
#ifdef WSM
if (bToUnseen) if (bToUnseen)
pCD->clientState |= UNSEEN_STATE; pCD->clientState |= UNSEEN_STATE;
#endif /* WSM */
} /* END OF FUNCTION SetClientWMState */ } /* END OF FUNCTION SetClientWMState */
@ -1389,17 +1337,11 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
CvtIconPlaceToPosition (&pWS->IPData, ICON_PLACE(pCD), CvtIconPlaceToPosition (&pWS->IPData, ICON_PLACE(pCD),
&ICON_X(pCD), &ICON_Y(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; pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = pCD;
} }
#ifdef WSM
/* /*
* If icon on root window and this workspace is active, the * If icon on root window and this workspace is active, the
* make sure it's in the right place. * make sure it's in the right place.
@ -1409,7 +1351,7 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD),
ICON_X(pCD), ICON_Y(pCD)); ICON_X(pCD), ICON_Y(pCD));
} }
#endif /* WSM */
if (pCD->iconWindow) if (pCD->iconWindow)
{ {
XMapWindow (DISPLAY, pCD->iconWindow); XMapWindow (DISPLAY, pCD->iconWindow);
@ -1460,20 +1402,14 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
&pCD->clientEntry); &pCD->clientEntry);
} }
#ifdef WSM
if (pWS == pSD->pActiveWS) if (pWS == pSD->pActiveWS)
{ {
XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD)); XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
} }
#else /* WSM */
XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
#endif /* WSM */
} }
} /* END OF FUNCTION ShowIconForMinimizedClient */ } /* END OF FUNCTION ShowIconForMinimizedClient */
#ifdef WSM
/*************************************<->************************************* /*************************************<->*************************************
* *
* ShowAllIconsForMinimizedClient (pCD) * ShowAllIconsForMinimizedClient (pCD)
@ -1516,5 +1452,3 @@ void ShowAllIconsForMinimizedClient (ClientData *pCD)
pCD->currentWsc = saveWsc; pCD->currentWsc = saveWsc;
} /* END OF FUNCTION ShowAllIconsForMinimizedClient */ } /* END OF FUNCTION ShowAllIconsForMinimizedClient */
#endif /* WSM */

View file

@ -36,7 +36,5 @@ extern void ConfigureNewState (ClientData *pcd);
extern void SetClientWMState (ClientData *pCD, int wmState, int mwmState); extern void SetClientWMState (ClientData *pCD, int wmState, int mwmState);
extern void MapClientWindows (ClientData *pCD); extern void MapClientWindows (ClientData *pCD);
extern void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD); extern void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD);
#ifdef WSM
extern void ShowAllIconsForMinimizedClient (ClientData *pCD); extern void ShowAllIconsForMinimizedClient (ClientData *pCD);
#endif /* WSM */
extern void SlideSubpanelBackIn (ClientData *pCD, Widget wSubpanel); extern void SlideSubpanelBackIn (ClientData *pCD, Widget wSubpanel);

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp. * (c) Copyright 1993, 1994 International Business Machines Corp.
@ -47,9 +46,7 @@
#include <stdio.h> #include <stdio.h>
#include "WmPanelP.h" #include "WmPanelP.h"
#include "WmIPC.h" /* must be after DtP.h */ #include "WmIPC.h" /* must be after DtP.h */
#ifdef WSM
#include "WmPresence.h" #include "WmPresence.h"
#endif /* WSM */
/* local macros */ /* local macros */
#ifndef MIN #ifndef MIN
@ -3979,5 +3976,3 @@ int PrintWorkspaceList (pSD)
} /* END OF FUNCTION PrintWorkspaceList */ } /* END OF FUNCTION PrintWorkspaceList */
#endif /* DEBUG */ #endif /* DEBUG */
/* DO NOT ADD ANYTHING AFTER THE FOLLOWING #ENDIF !!! */
#endif /* WSM */

View file

@ -20,7 +20,6 @@
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
#ifdef WSM
/* /*
* (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp. * (c) Copyright 1993, 1994 International Business Machines Corp.
@ -186,6 +185,4 @@ extern void SetFrontPanelTitle(
WmScreenData *pSD); WmScreenData *pSD);
/******** End Public Function Declarations ********/ /******** End Public Function Declarations ********/
#endif /* WSM */

View file

@ -41,10 +41,8 @@
#include <Xm/XmP.h> #include <Xm/XmP.h>
#include "WmGlobal.h" #include "WmGlobal.h"
#include "WmXSMP.h" #include "WmXSMP.h"
#ifdef WSM
#include "WmWrkspace.h" #include "WmWrkspace.h"
#include <Dt/Session.h> #include <Dt/Session.h>
#endif
typedef struct _ProxyClientInfo typedef struct _ProxyClientInfo
{ {
@ -60,12 +58,7 @@ typedef struct _ProxyClientInfo
#define MAX_RESOURCE_LEN 1024 #define MAX_RESOURCE_LEN 1024
#ifdef WSM
static char *dtwmFileName = "dtwm.db"; static char *dtwmFileName = "dtwm.db";
#else
static char *dtwmFileName = ".mwmclientdb";
# define EXTRA_FN_CHARS 20
#endif
/* Fully-qualified resource names/classes. */ /* Fully-qualified resource names/classes. */
static char *xPositionStr = "%s.position.x"; static char *xPositionStr = "%s.position.x";
@ -76,14 +69,9 @@ static char *initialStateStr = "%s.initialState";
static char *wmCommandStr = "%s.wmCommand"; static char *wmCommandStr = "%s.wmCommand";
static char *wmClientMachineStr = "%s.wmClientMachine"; static char *wmClientMachineStr = "%s.wmClientMachine";
static char *screenStr = "%s.screen"; static char *screenStr = "%s.screen";
#ifdef WSM
static char *workspacesStr = "%s.workspaces"; static char *workspacesStr = "%s.workspaces";
static char *iconXPosStr = "%s.iconPos.x.%s"; static char *iconXPosStr = "%s.iconPos.x.%s";
static char *iconYPosStr = "%s.iconPos.y.%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. */ /* Header for private database. */
static char *dbHeader = "\ static char *dbHeader = "\
@ -105,10 +93,6 @@ static char *iconicStateStr = "IconicState";
static char *XSMPClientStr = "Client"; static char *XSMPClientStr = "Client";
static char *proxyClientStr = "ProxyClient"; static char *proxyClientStr = "ProxyClient";
#ifndef WSM
static char *dbFileArgStr = "-session";
#endif
/* Flag to tell us how to treat ProxyClient info. */ /* Flag to tell us how to treat ProxyClient info. */
static Boolean smClientDBCheckpointed = False; static Boolean smClientDBCheckpointed = False;
@ -121,20 +105,9 @@ static void smDieCallback(Widget, XtPointer, XtPointer);
/* Build client database file name. */ /* Build client database file name. */
static void buildDBFileName(char [MAXPATHLEN], Boolean); 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. */ /* Get string of client's workspaces. */
static char *getClientWorkspaces(ClientData *); static char *getClientWorkspaces(ClientData *);
#endif
/* List-of-clients utilities. */ /* List-of-clients utilities. */
static Boolean addClientToList(ClientData ***, int *, ClientData *); static Boolean addClientToList(ClientData ***, int *, ClientData *);
@ -193,7 +166,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData)
return; return;
} }
#ifdef WSM
/* Second phase: all other clients saved; now I can save myself. */ /* Second phase: all other clients saved; now I can save myself. */
/* Copied from WmEvent.c. */ /* Copied from WmEvent.c. */
for (scr = 0; scr < wmGD.numScreens; scr++) for (scr = 0; scr < wmGD.numScreens; scr++)
@ -207,7 +179,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData)
SaveResources(&wmGD.Screens[scr]); SaveResources(&wmGD.Screens[scr]);
} }
} }
#endif
/* /*
* NEW FOR SESSION MANAGEMENT: Write private client resource database. * NEW FOR SESSION MANAGEMENT: Write private client resource database.
@ -221,30 +192,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData)
wmGD.clientResourceDB = newClientDB; wmGD.clientResourceDB = newClientDB;
smClientDBCheckpointed = True; 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 static void
buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave) buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave)
{ {
#ifdef WSM
char *savePath = (char *)NULL; char *savePath = (char *)NULL;
fileNameBuf[0] = '\0'; fileNameBuf[0] = '\0';
@ -295,183 +240,8 @@ buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave)
if (fileNameBuf[0] == '\0') if (fileNameBuf[0] == '\0')
strcpy(fileNameBuf, dtwmFileName); 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 ".<number>" to ".<number+1>" */
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 * static char *
getClientWorkspaces(ClientData *pCD) getClientWorkspaces(ClientData *pCD)
{ {
@ -522,8 +292,6 @@ getClientWorkspaces(ClientData *pCD)
return cwsP; return cwsP;
} }
#endif /* WSM */
static Boolean static Boolean
addClientToList(ClientData ***cdList, int *nClients, ClientData *pCD) 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) if ((screenDiff = pCD1->pSD->screen - pCD2->pSD->screen) != 0)
return screenDiff; return screenDiff;
#ifdef WSM
/* If same screen, sort by workspace id. */ /* If same screen, sort by workspace id. */
/* How do we handle clients that live in more than one workspace? */ /* How do we handle clients that live in more than one workspace? */
/* For now, pick the "current" one - if not in active workspace, */ /* For now, pick the "current" one - if not in active workspace, */
/* this will simply be the first one in the client's list. */ /* this will simply be the first one in the client's list. */
return (int)(pCD1->pWsList[pCD1->currentWsc].wsID - return (int)(pCD1->pWsList[pCD1->currentWsc].wsID -
pCD2->pWsList[pCD2->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; 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, if ((resourcePtr = getXSMPResource(pCD, WMSAVE_WIDTH,
widthSizeStr)) widthSizeStr))
!= (char *)NULL) != (char *)NULL)
@ -673,7 +414,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
pCD->clientFlags |= SM_CLIENT_STATE; pCD->clientFlags |= SM_CLIENT_STATE;
} }
#ifdef WSM
if ((workSpaceNamesP != (char **)NULL) && if ((workSpaceNamesP != (char **)NULL) &&
((resourcePtr = getXSMPResource(pCD, WMSAVE_WORKSPACES, ((resourcePtr = getXSMPResource(pCD, WMSAVE_WORKSPACES,
workspacesStr)) workspacesStr))
@ -681,7 +421,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
{ {
*workSpaceNamesP = XtNewString(resourcePtr); *workSpaceNamesP = XtNewString(resourcePtr);
} }
#endif
} }
/* Always return True for XSMP clients. */ /* Always return True for XSMP clients. */
@ -838,24 +577,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
pCD->clientFlags |= SM_Y; 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 = if ((resourcePtr =
getClientResource(proxyClientID, widthSizeStr)) getClientResource(proxyClientID, widthSizeStr))
!= (char *)NULL) != (char *)NULL)
@ -882,7 +603,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
pCD->clientFlags |= SM_CLIENT_STATE; pCD->clientFlags |= SM_CLIENT_STATE;
} }
#ifdef WSM
if ((workSpaceNamesP != (char **)NULL) && if ((workSpaceNamesP != (char **)NULL) &&
((resourcePtr = ((resourcePtr =
getClientResource(proxyClientID, workspacesStr)) getClientResource(proxyClientID, workspacesStr))
@ -890,12 +610,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
{ {
*workSpaceNamesP = XtNewString(resourcePtr); *workSpaceNamesP = XtNewString(resourcePtr);
} }
#endif
#ifndef WSM
/* This is done in LoadClientIconPositions() if WSM defined. */
dbRemoveProxyClientEntry(proxyClientID);
#endif
return True; return True;
} }
@ -949,7 +663,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
if (!pCD->pSD->useIconBox) if (!pCD->pSD->useIconBox)
{ {
#ifdef WSM
WmScreenData *pSD = pCD->pSD; WmScreenData *pSD = pCD->pSD;
WmWorkspaceData *pWS; WmWorkspaceData *pWS;
int i; 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)) if (SAVE_RESOURCE(pCD, WMSAVE_WIDTH))
@ -1003,18 +703,13 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
{ {
int clientState; int clientState;
#ifdef WSM
clientState = pCD->clientState & ~UNSEEN_STATE; clientState = pCD->clientState & ~UNSEEN_STATE;
#else
clientState = pCD->clientState;
#endif
fprintf(fp, initialStateStr, clientID); fprintf(fp, initialStateStr, clientID);
fprintf(fp, strArg, (clientState == NORMAL_STATE) ? fprintf(fp, strArg, (clientState == NORMAL_STATE) ?
normalStateStr : iconicStateStr); normalStateStr : iconicStateStr);
} }
#ifdef WSM
if (SAVE_RESOURCE(pCD, WMSAVE_WORKSPACES)) if (SAVE_RESOURCE(pCD, WMSAVE_WORKSPACES))
{ {
char *clientWorkspaces = getClientWorkspaces(pCD); char *clientWorkspaces = getClientWorkspaces(pCD);
@ -1026,7 +721,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
XtFree(clientWorkspaces); XtFree(clientWorkspaces);
} }
} }
#endif
return True; return True;
} }
@ -1042,9 +736,7 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
ProxyClientInfo proxyClientInfo; ProxyClientInfo proxyClientInfo;
int clientX, clientY; int clientX, clientY;
unsigned int clientWd, clientHt; unsigned int clientWd, clientHt;
#ifdef WSM
char *clientWorkspaces; char *clientWorkspaces;
#endif
if (!getProxyClientInfo(pCD, &proxyClientInfo)) if (!getProxyClientInfo(pCD, &proxyClientInfo))
return False; return False;
@ -1076,7 +768,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
if (!pCD->pSD->useIconBox) if (!pCD->pSD->useIconBox)
{ {
#ifdef WSM
WmScreenData *pSD = pCD->pSD; WmScreenData *pSD = pCD->pSD;
WmWorkspaceData *pWS; WmWorkspaceData *pWS;
int i; int i;
@ -1093,13 +784,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
fprintf(fp, intArg, pCD->pWsList[i].iconY); 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); fprintf(fp, widthSizeStr, clientID);
@ -1108,17 +792,12 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
fprintf(fp, heightSizeStr, clientID); fprintf(fp, heightSizeStr, clientID);
fprintf(fp, intArg, clientHt); fprintf(fp, intArg, clientHt);
#ifdef WSM
clientState = pCD->clientState & ~UNSEEN_STATE; clientState = pCD->clientState & ~UNSEEN_STATE;
#else
clientState = pCD->clientState;
#endif
fprintf(fp, initialStateStr, clientID); fprintf(fp, initialStateStr, clientID);
fprintf(fp, strArg, (clientState == NORMAL_STATE) ? fprintf(fp, strArg, (clientState == NORMAL_STATE) ?
normalStateStr : iconicStateStr); normalStateStr : iconicStateStr);
#ifdef WSM
clientWorkspaces = getClientWorkspaces(pCD); clientWorkspaces = getClientWorkspaces(pCD);
if (clientWorkspaces != (char *)NULL) if (clientWorkspaces != (char *)NULL)
{ {
@ -1126,7 +805,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
fprintf(fp, strArg, clientWorkspaces); fprintf(fp, strArg, clientWorkspaces);
XtFree(clientWorkspaces); XtFree(clientWorkspaces);
} }
#endif
return True; return True;
} }
@ -1187,9 +865,6 @@ LoadClientResourceDB(void)
{ {
char dbFileName[MAXPATHLEN]; char dbFileName[MAXPATHLEN];
#ifndef WSM
getClientDBName();
#endif
buildDBFileName(dbFileName, False); buildDBFileName(dbFileName, False);
return XrmGetFileDatabase(dbFileName); return XrmGetFileDatabase(dbFileName);
@ -1212,9 +887,6 @@ SaveClientResourceDB(void)
/* Iterate through client list, saving */ /* Iterate through client list, saving */
/* appropriate resources for each. */ /* appropriate resources for each. */
#ifndef WSM
setClientDBName();
#endif
buildDBFileName(dbFileName, True); buildDBFileName(dbFileName, True);
if ((fp = fopen(dbFileName, "w")) == (FILE *)NULL) if ((fp = fopen(dbFileName, "w")) == (FILE *)NULL)
return (XrmDatabase)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 void
LoadClientIconPositions(ClientData *pCD) LoadClientIconPositions(ClientData *pCD)
{ {
@ -1394,4 +1063,3 @@ LoadClientIconPositions(ClientData *pCD)
} }
} }
} }
#endif /* WSM */

View file

@ -46,9 +46,7 @@
#define WMSAVE_WIDTH (1L << 2) #define WMSAVE_WIDTH (1L << 2)
#define WMSAVE_HEIGHT (1L << 3) #define WMSAVE_HEIGHT (1L << 3)
#define WMSAVE_STATE (1L << 4) #define WMSAVE_STATE (1L << 4)
#ifdef WSM
#define WMSAVE_WORKSPACES (1L << 5) #define WMSAVE_WORKSPACES (1L << 5)
#endif
#define WMSAVE_ICON_X (1L << 6) #define WMSAVE_ICON_X (1L << 6)
#define WMSAVE_ICON_Y (1L << 7) #define WMSAVE_ICON_Y (1L << 7)
@ -60,8 +58,6 @@ extern XrmDatabase SaveClientResourceDB(void);
extern Boolean FindClientDBMatch(ClientData *, char **); extern Boolean FindClientDBMatch(ClientData *, char **);
extern Boolean GetSmClientIdClientList(ClientData ***, int *); extern Boolean GetSmClientIdClientList(ClientData ***, int *);
extern void SortClientListByWorkspace(ClientData **, int); extern void SortClientListByWorkspace(ClientData **, int);
#ifdef WSM
extern void LoadClientIconPositions(ClientData *); extern void LoadClientIconPositions(ClientData *);
#endif
#endif /* _WmXSMP_h */ #endif /* _WmXSMP_h */