-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
-DTWMDEFINES = -DWSM
+DTWMDEFINES =
DEPEND_DEFINES = $(DEPENDDEFINES)
DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE
UNMAP_ON_RESTART
All windows are unmapped on restart.
- WSM
- Workspace manager code.
-
_BMS
Formerly used to denote code that interfaced to the HP Broadcast
message server. This code has been switched over to ICCC
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp.
return (rval);
}
-#endif /* WSM */
/********************* eof ***************************/
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
/******** End Public Function Declarations ********/
-#endif /* WSM */
/**************************** eof ***************************/
rval = TRUE;
}
break;
-#ifdef WSM
case FRAME_TITLEBAR:
if (decor & MWM_DECOR_TITLE) {
rval = TRUE;
}
break;
-#endif /* WSM */
case FRAME_MINIMIZE:
if (decor & MWM_DECOR_MINIMIZE) {
/* produce default border with no resizing functions */
-#ifdef WSM
BevelRectangle (pcd->pclientTopShadows, /* outside */
pcd->pclientBottomShadows,
0, 0,
FRAME_EXTERNAL_SHADOW_WIDTH,
FRAME_EXTERNAL_SHADOW_WIDTH,
FRAME_EXTERNAL_SHADOW_WIDTH);
-#else /* WSM */
- BevelRectangle (pcd->pclientTopShadows, /* outside */
- pcd->pclientBottomShadows,
- 0, 0,
- pcd->frameInfo.width, pcd->frameInfo.height,
- 2, 2, 2, 2);
-#endif /* WSM */
if ((pcd->internalBevel > 1) &&
!matte_width &&
{
int x,y;
unsigned int width,height;
-#if defined(WSM) && defined(DT_LEFT_JUSTIFIED_TITLE)
+#if defined(DT_LEFT_JUSTIFIED_TITLE)
Dimension textWidth;
Dimension offset;
XmFontList fontList;
-#endif /* WSM */
+#endif
/* get size of title area */
textBox.x, textBox.y, textBox.width, &textBox,
((wmGD.frameStyle == WmSLAB) ? False : True));
#else /* DT_LEFT_JUSTIFIED_TITLE */
-#ifdef WSM
WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC,
textBox.x, textBox.y, textBox.width, &textBox,
True);
-#else
- WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC,
- textBox.x, textBox.y, textBox.width, &textBox);
-#endif
#endif /* DT_LEFT_JUSTIFIED_TITLE */
#include "WmWinInfo.h"
#include "WmWinList.h"
#include "WmWinState.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
/*
{
SetActiveScreen (PSD_FOR_CLIENT(pCD));
}
-#ifdef WSM
/* Get workspace specific client data */
SetClientWsIndex (pCD);
-#endif /* WSM */
/*
* Handle events on top-level client windows.
* This is a request to change the state of the client window from
* iconic (minimized) to normal.
*/
-#ifdef WSM
if (!ClientInWorkspace (ACTIVE_WS, pCD))
{
if (pCD->absentMapBehavior == AMAP_BEHAVIOR_IGNORE)
{
SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
}
-#else /* WSM */
- SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
-#endif /* WSM */
break;
}
Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
{
Boolean dispatchEvent = True;
-#ifdef WSM
WmScreenData *pSD;
-#endif /* WSM */
/*
}
dispatchEvent = False; /* don't have the toolkit dispatch the event */
}
-#ifdef WSM
else if (!XFindContext (DISPLAY, pEvent->xany.window,
wmGD.mwmWindowContextType, (caddr_t *)&pSD))
{
HandleDtWmClientMessage ((XClientMessageEvent *)pEvent);
}
}
-#endif /* WSM */
else
{
/*
{
ProcessWmProtocols (pCD);
}
-#ifdef WSM
else if (propertyEvent->atom == wmGD.xa_DT_WORKSPACE_HINTS)
{
(void) ProcessWorkspaceHints (pCD);
}
-#endif /* WSM */
else if (propertyEvent->atom == wmGD.xa_MWM_MESSAGES)
{
if (pCD->protocolFlags & PROTOCOL_MWM_MESSAGES)
{
newState = NORMAL_STATE;
}
-#ifdef WSM
if (!ClientInWorkspace (ACTIVE_WS, pCD))
{
newState |= UNSEEN_STATE;
}
-#endif /* WSM */
SetClientState (pCD, newState, GetTimestamp ());
#include "WmGlobal.h"
#include <stdio.h>
-#ifdef WSM
#include <Dt/UserMsg.h>
-#endif /* WSM */
#include "WmXSMP.h"
/*
void
Warning (char *message)
{
-#ifdef WSM
char pch[MAXWMPATH+1];
sprintf (pch, "%s: %s\n",
GETMESSAGE(20, 1, "Workspace Manager"), message);
_DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL);
-#else /* WSM */
- fprintf (stderr, "%s: %s\n", wmGD.mwmName, message);
- fflush (stderr);
-#endif /* WSM */
} /* END OF FUNCTION Warning */
-#ifdef WSM
#ifdef DEBUGGER
\f
/******************************<->*************************************
/************************ eof **************************/
#endif /* DEBUGGER */
-#endif /* WSM */
/*
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
-#ifdef WSM
#ifdef DEBUGGER
extern void PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char *s4, char *s5, char *s6, char *s7, char *s8, char *s9);
#endif /* DEBUGGER */
-#endif /* WSM */
extern void WmInitErrorHandler (Display *display);
extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent);
extern int WmXIOErrorHandler (Display *display);
#ifndef NO_MESSAGE_CATALOG
extern char * GetMessage(int set, int n, char * s);
#endif
-#ifdef WSM
/**************************** eof ***************************/
-#endif /* WSM */
*/
#include "WmEvent.h"
#include "WmError.h"
-#ifdef WSM
#include "WmBackdrop.h"
#include "WmWrkspace.h"
-#endif /* WSM */
#include "WmCDInfo.h"
#include "WmCDecor.h"
#include "WmCEvent.h"
#include "WmPanelP.h" /* for typedef in WmManage.h */
#include "WmManage.h"
#include "WmMenu.h"
-#ifdef WSM
#include "WmICCC.h"
#include "WmProperty.h"
-#endif /* WSM */
#include "WmWinInfo.h"
#include "WmWinState.h"
#include "WmResNames.h"
#include <Xm/RowColumnP.h> /* for MS_LastManagedMenuTime */
extern XmMenuState _XmGetMenuState();
-#ifdef WSM
/*
* FUNCTION PARSER TABLE
*/
Boolean (*parseProc)();
} FunctionTableEntry;
-#endif /* WSM */
/*
*/
extern unsigned int buttonModifierMasks[];
-#ifdef WSM
int smAckState = SM_UNITIALIZED;
extern FunctionTableEntry functionTable[];
extern int F_NOP_INDEX;
-#endif /* WSM */
#ifndef MOTIF_ONE_DOT_ONE
#include <Xm/MenuShellP.h>
(short) wmGD.hotspotRectangle.width)) &&
(event->y_root < (wmGD.hotspotRectangle.y +
(short) wmGD.hotspotRectangle.height))&&
-#ifdef WSM
(pCD ||
(wmGD.rootButtonClick && wmGD.clickData.clickPending)))
-#else /* WSM */
- pCD)
-#endif /* WSM */
{
/* ^^^
* Added check for NULL pCD in the above condition.
if (event->type == ButtonRelease)
{
-#ifdef WSM
if (pCD)
{
-#endif /* WSM */
/*
* The system menu is posted from a system menu button or an
* icon. By doing a button release over the system menu button
->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time;
doXtDispatchEvent = True;
#endif
-#ifdef WSM
}
else if ((!wmGD.clickData.pCD) &&
(((XButtonEvent *)event)->button == wmGD.clickData.button) &&
}
wmGD.clickData.clickPending = False;
}
-#endif /* WSM */
}
else
{
}
if ((keySpecs->wmFunction == F_Menu) ||
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
(keySpecs->wmFunction == F_Post_RMenu) ||
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
(keySpecs->wmFunction == F_Post_SMenu))
{
wmGD.menuUnpostKeySpec = keySpecs; /* menu unpost key spec */
wmGD.clickData.time = buttonEvent->time;
wmGD.clickData.clickPending = True;
wmGD.clickData.doubleClickPending = True;
-#ifdef WSM
wmGD.clickData.bReplayed = wmGD.bReplayedButton;
-#endif /* WSM */
}
} /* END OF FUNCTION ProcessClickBRelease */
-
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* HandleDtWmClientMessage (clientEvent)
} /* END OF FUNCTION HandleDtWmRequest */
-#endif /* WSM */
-
-\f
/*************************************<->*************************************
*
* HandleWsEnterNotify (enterEvent)
} /* END OF FUNCTION GetTimestamp */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* LastTime ()
return (evTime);
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
* Force the exposure events into the queue
*/
XSync (DISPLAY, False);
-#ifdef WSM
XSync (DISPLAY1, False);
-#endif /* WSM */
/*
* Selectively extract the exposure events
*/
-#ifdef WSM
while (XCheckMaskEvent (DISPLAY,
ExposureMask|VisibilityChangeMask, &event) ||
XCheckMaskEvent (DISPLAY1,
ExposureMask|VisibilityChangeMask, &event))
-#else /* WSM */
- while (XCheckMaskEvent (DISPLAY, ExposureMask, &event))
-#endif /* WSM */
{
/*
* Check for, and process non-widget events. The events may be
* to an icon window, or to a "special" window management window.
*/
-#ifdef WSM
switch (event.type)
{
case Expose:
-#endif /* WSM */
if (event.xany.window == ACTIVE_ROOT)
{
dispatchEvent = WmDispatchWsEvent (&event);
{
dispatchEvent = WmDispatchClientEvent (&event);
}
-#ifdef WSM
default:
dispatchEvent = True;
}
-#endif /* WSM */
if (dispatchEvent)
{
} /* END OF FUNCTION PullExposureEvents */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* ReplayedButtonEvent ()
return (rval);
}
-#endif /* WSM */
/*
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
-#ifdef WSM
/* Shared Variables */
extern int smAckState;
-#endif /* WSM */
extern Boolean CheckForButtonAction (XButtonEvent *buttonEvent,
Context context, Context subContext,
ClientData *pCD);
extern Time GetTimestamp (void);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
extern Time LastTime (void);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
extern Boolean HandleKeyPress (XKeyEvent *keyEvent, KeySpec *keySpecs,
Boolean checkContext, Context context,
Boolean onlyFirst, ClientData *pCD);
int keyboard_mode);
extern void WmUngrabButton (Display *display, unsigned int button,
unsigned int modifiers, Window grab_window);
-#ifdef WSM
extern void HandleDtWmClientMessage (XClientMessageEvent *clientEvent);
extern void HandleDtWmRequest (WmScreenData *pSD, XEvent *pev);
extern Boolean ReplayedButtonEvent (XButtonEvent *pevB1, XButtonEvent *pevB2);
-#endif /* WSM */
*/
#include "WmGlobal.h"
-#ifndef WSM
-#include <signal.h>
-#endif
#include <stdio.h>
#include <X11/Xos.h>
#include "WmICCC.h"
-#ifdef WSM
#include "WmWrkspace.h" /* for ClientInWorkspace() test */
#include <Dt/EnvControlP.h> /* for restoring **environ before an exec() */
#include "WmResNames.h"
#include <Dt/Message.h>
#include <Dt/Help.h>
-#endif /* WSM */
#include <Dt/DtStrDefs.h>
#include "WmPanelP.h"
#include "WmSignal.h"
*/
#include "WmFunction.h"
#include "WmCEvent.h"
-#ifdef WSM
#include "WmHelp.h"
-#endif /* WSM */
#include "WmCDInfo.h"
#include "WmColormap.h"
#include "WmError.h"
#include "WmEvent.h"
#include "WmFeedback.h"
-#ifdef WSM
#include "WmIPC.h"
-#endif /* WSM */
#include "WmIPlace.h"
#include "WmIconBox.h"
#include "WmKeyFocus.h"
#include "WmMenu.h"
-#ifdef WSM
#include "WmPresence.h"
-#endif /* WSM */
#include "WmProperty.h"
#include "WmProtocol.h"
#include "WmResParse.h"
static unsigned int GetEventInverseMask(XEvent *event);
-#ifdef WSM
-
#if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE)
#define _NFILE FOPEN_MAX
#endif
#define CLOSE_FILES_ON_EXEC() \
{int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, 1);}
-#endif /* WSM */
/*
* Global Variables:
*/
static ClientData *dirtyStackEntry = NULL;
static ClientData *dirtyLeader = NULL;
-#ifdef WSM
-\f
/***********************<->*************************************
*
* F_Action (args, pCD, event)
return (True);
} /* END OF FUNCTION F_Action */
-#endif /* WSM */
-\f
/******************************<->*************************************
*
* F_Beep (args, pCD, event)
#endif
XWindowChanges changes;
Boolean restack = False;
-#ifdef WSM
Window stackWindow;
WmScreenData *pSD = (ACTIVE_WS)->pSD;
unsigned int mask;
pCLE = pCLE->prevSibling;
}
}
-#endif /* WSM */
#if 0
if (pSD->lastClient->type == MINIMIZED_STATE)
{
#endif
changes.stack_mode = Below;
-#ifdef WSM
if (mask)
{
XConfigureWindow (DISPLAY, pcd->clientFrameWin, mask, &changes);
}
-#else /* WSM */
- XConfigureWindow (DISPLAY, pcd->clientFrameWin, CWStackMode,
- &changes);
-#endif /* WSM */
return (restack);
}
ClientListEntry *pStackEntry;
String string = args;
int flags = STACK_NORMAL;
-#ifdef WSM
WmWorkspaceData *pWS = ACTIVE_WS;
-#endif /* WSM */
if (string)
{
string, F_GROUP_ALL)))
{
pNextEntry = pEntry->prevSibling;
-#ifdef WSM
if (ClientInWorkspace (pWS, pEntry->pCD))
{
-#endif /* WSM */
Do_Lower (pEntry->pCD, pStackEntry, STACK_NORMAL);
pStackEntry = pEntry;
-#ifdef WSM
}
-#endif /* WSM */
}
}
/* process family stacking stuff */
}
index += len;
}
-#ifdef WSM
if (ClientInWorkspace (pWS, pCD))
{
-#endif /* WSM */
Do_Lower (pCD, (ClientListEntry *) NULL, flags);
-#ifdef WSM
}
-#endif /* WSM */
}
}
else if (pCD)
{
-#ifdef WSM
if (ClientInWorkspace (pWS, pCD))
{
-#endif /* WSM */
Do_Lower (pCD, (ClientListEntry *) NULL, STACK_NORMAL);
-#ifdef WSM
}
-#endif /* WSM */
}
/*
Boolean restackTransients;
ClientData *pcdLeader;
WmWorkspaceData *pWS = ACTIVE_WS;
-#ifdef WSM
Boolean bLeaderRestacked;
-#endif /* WSM */
if (pCD->pECD)
{
return;
}
else
-#ifdef WSM
if (ClientInWorkspace(pWS, pCD) &&
(!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD)))
{
*/
return;
}
-#endif /* WSM */
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
}
else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */
{
-#ifdef WSM
/*
* Handle restacking of primary/secondary windows
* within the transient window tree.
}
}
-#endif /* WSM */
+
/*
* If this is a transient window then put it below its
* sibling transient windows.
MoveEntryInList (pWS, &pcdLeader->clientEntry, True /*above*/,
pStackEntry);
}
-#ifdef WSM
else if ((restackTransients) || (bLeaderRestacked))
-#else /* WSM */
- else if (restackTransients)
-#endif /* WSM */
{
RestackTransients (pCD);
}
MoveEntryInList (pWS, &pcdLeader->clientEntry,
False /*on bottom*/, (ClientListEntry *) NULL);
}
-#ifdef WSM
else if ((restackTransients) || (bLeaderRestacked))
-#else /* WSM */
- else if (restackTransients)
-#endif /* WSM */
{
RestackTransients (pCD);
}
* on the screen. Lower the window.
*/
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
F_Lower (NULL, pcdNext, (XEvent *) NULL);
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
break;
}
}
* window on the screen. Raise the window.
*/
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
F_Raise (NULL, pcdNext, (XEvent *) NULL);
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
break;
}
}
Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
{
int pid;
-#ifndef WSM
- int status;
- int w;
- void (*intStat) ();
- void (*quitStat) ();
-#endif /* WSM */
char *shell;
char *shellname;
#endif /* SYSV */
#endif /* SVR4 */
#endif /* NO_SETPGRP */
-#ifdef WSM
+
/*
* Clean up window manager resources.
* The X file descriptor should be automatically closed.
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
CLOSE_FILES_ON_EXEC();
-#endif /* WSM */
/*
* Exec the command using $MWMSHELL if set or
* Have the window manager wait for the shell to complete.
*/
-#ifndef WSM
- intStat = (void (*)())signal (SIGINT, SIG_IGN);
- quitStat = (void (*)())signal (SIGQUIT, SIG_IGN);
-#endif /* WSM */
-
-#ifdef WSM
/*
* Don't need to wait because WSM sets SIGCLD handler
*/
-#else /* WSM */
- while ((w = wait (&status)) != pid && (w != -1));
-
- if (w == -1)
- {
- status = -1;
- }
-#endif /* WSM */
-#ifndef WSM
- signal (SIGINT, intStat);
- signal (SIGQUIT, quitStat);
-#endif /* WSM */
/*
* Restore original DISPLAY environment variable value
{
if (wmGD.Screens[scr].managed)
{
-#ifdef WSM
SaveResources(&wmGD.Screens[scr]);
-#endif /* WSM */
pNextEntry = wmGD.Screens[scr].lastClient;
while (pNextEntry)
{
}
UnParentControls (&wmGD.Screens[scr], False);
-#ifndef WSM
- XDeleteProperty(DISPLAY, wmGD.Screens[scr].rootWindow,
- wmGD.xa_MWM_INFO);
-#endif /* WSM */
}
}
-#ifdef WSM
/* shut down the messaging connection */
dtCloseIPC();
-#endif /* WSM */
ResignFromSM();
XSync (DISPLAY, False);
XCloseDisplay (DISPLAY);
(!(reMapClient)))
{
XUnmapWindow (DISPLAY, pCD->iconWindow);
-#ifdef WSM
XReparentWindow (DISPLAY, pCD->iconWindow,
ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX,
pCD->pWsList->iconY);
-#else /* WSM */
- XReparentWindow (DISPLAY, pCD->iconWindow,
- ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY);
-#endif /* WSM */
}
if (!(reMapClient))
{
if ((pNextEntry->type != MINIMIZED_STATE) &&
(pCD->clientState != MINIMIZED_STATE) &&
-#ifdef WSM
(ClientInWorkspace (ACTIVE_WS, pCD)) &&
-#endif /* WSM */
(pCD != pcdNoFocus))
{
if (pCD->transientChildren)
* Set the focus window if one is found
*/
-#ifdef WSM
if (pcdLastFocus &&
ClientInWorkspace (ACTIVE_WS, pcdLastFocus))
-#else /* WSM */
- if (pcdLastFocus)
-#endif /* WSM */
focusWindow = pcdLastFocus->client;
/*
{
pCD = pNextEntry->pCD;
-#ifdef WSM
if (ClientInWorkspace (ACTIVE_WS, pCD))
{
-#endif /* WSM */
if ((pNextEntry->type == MINIMIZED_STATE) ||
(pCD->clientState == MINIMIZED_STATE))
{
focusWindow = ICON_FRAME_WIN(pCD);
break;
}
-#ifdef WSM
}
-#endif /* WSM */
pNextEntry = pNextEntry->nextSibling;
}
}
wmGD.replayEnterEvent = False;
pcdFocus = pCD;
-#ifdef WSM
/*
* Make sure the client is in the current workspace
*/
if ((pCD) &&
(ClientInWorkspace (ACTIVE_WS, pCD)))
-#else /* WSM */
- if (pCD)
-#endif /* WSM */
{
if (pCD->clientState == MINIMIZED_STATE)
{
} /* END OF FUNCTION Do_Focus_Key */
-#ifdef WSM
-\f
/***********************<->*************************************
*
* F_Goto_Workspace (args, pCD, event)
return (False);
} /* END OF FUNCTION F_Goto_Workspace */
-#endif /* WSM */
-#ifdef WSM
-\f
/******************************<->*************************************
*
* Boolean F_Help (String args, ClientData *pCD, XEvent *event)
return (False);
} /* END OF FUNCTION F_Help_Mode */
-#endif /* WSM */
-\f
+
/******************************<->*************************************
*
* F_Next_Key (args, pCD, event)
}
/* Make this client visible */
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
F_Normalize_And_Raise (NULL, pPRCD->pCD, event);
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
}
else
{
{
flags |= POST_TRAVERSAL_ON;
}
-#ifdef WSM
/*
* Root menu, if posted with button press, then
* set up to handle root menu click to make the menu
wmGD.hotspotRectangle.width = wmGD.moveThreshold;
wmGD.hotspotRectangle.height = wmGD.moveThreshold;
}
-#endif /* WSM */
}
else if (event &&
((event->type == KeyPress) || (event->type == KeyRelease)))
GetEventInverseMask(event));
/* Raise the window and set the keyboard focus to the window */
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
F_Raise (NULL, pCD, (XEvent *)NULL);
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
if (wmGD.raiseKeyFocus)
{
F_Focus_Key (NULL, pCD,
F_Restore (NULL, pCD, event);
/* Raise the window and set the keyboard focus to the window */
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
F_Raise (NULL, pCD, (XEvent *)NULL);
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
if (wmGD.raiseKeyFocus)
{
F_Focus_Key (NULL, pCD,
} /* END OF FUNCTION F_Pack_Icons */
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* F_Post_RMenu (args, pCD, event)
return (False);
} /* END OF FUNCTION F_Post_RMenu */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
}
else if (event->type == ButtonPress)
{
-#ifdef WSM
/*
* Root menu, if posted with button press, then
* set up to handle root menu click to make the menu
wmGD.hotspotRectangle.width = wmGD.moveThreshold;
wmGD.hotspotRectangle.height = wmGD.moveThreshold;
}
-#endif /* WSM */
PostMenu (pCD->systemMenuSpec, pCD,
event->xbutton.x_root, event->xbutton.y_root,
event->xbutton.button, menuContext, POST_AT_XY, event);
SendClientMsg (pCD->client, (long) wmGD.xa_WM_PROTOCOLS,
(long) wmGD.xa_WM_DELETE_WINDOW, CurrentTime, NULL, 0);
}
-#ifdef WSM
/*
* HP does not want to send a client message for both
* delete_window AND save_yourself. The current OSF
* to the behavior of dt 2.01
*/
else if (do_save_yourself)
-#else /* WSM */
- if (do_save_yourself)
-#endif /* WSM */
{
/*
* Send a WM_SAVE_YOURSELF message and wait for a change to
} /* END OF FUNCTION F_Kill */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* F_Marquee_Selection (args, pCD, event)
XFree((char *)winChildren);
}
}
-#endif /* WSM */
\f
/*************************************<->*************************************
{
Window win;
-#ifdef WSM
if (wmGD.refreshByClearing)
{
RefreshByClearing (ACTIVE_ROOT);
}
else
{
-#endif /* WSM */
/* default background_pixmap is None */
win = XCreateWindow (DISPLAY,
ACTIVE_ROOT, 0, 0,
XMapWindow (DISPLAY, win);
XDestroyWindow (DISPLAY, win);
-#ifdef WSM
}
-#endif /* WSM */
XFlush (DISPLAY);
return (True);
Boolean F_Restart (String args, ClientData *pCD, XEvent *event)
{
-#ifdef WSM
if (args && *args && !strcmp (args, DTWM_REQP_NO_CONFIRM))
{
RestartWm (MWM_INFO_STARTUP_CUSTOM);
}
- else
-#endif /* WSM */
- if (wmGD.showFeedback & WM_SHOW_FB_RESTART)
+ else if (wmGD.showFeedback & WM_SHOW_FB_RESTART)
{
ConfirmAction (ACTIVE_PSD, RESTART_ACTION);
}
*/
SetMwmInfo (wmGD.Screens[scr].rootWindow, startupFlags, 0);
-#ifdef WSM
SaveResources(&wmGD.Screens[scr]);
-#endif /* WSM */
/*
* Unmap client windows and reparent them to the root window.
*/
}
-#ifdef WSM
/* shut down the messaging connection */
dtCloseIPC();
-#endif /* WSM */
ResignFromSM();
/*
XSetInputFocus (DISPLAY, PointerRoot, RevertToPointerRoot, CurrentTime);
XSync (DISPLAY, False);
-#ifdef WSM
CLOSE_FILES_ON_EXEC();
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
-#endif /* WSM */
/*
* Restart the window manager with the initial arguments plus
* the restart settings.
execvp (*(wmGD.argv), wmGD.argv);
-#ifdef WSM
Warning (((char *)GETMESSAGE(26, 1,
"The window manager restart failed. The window manager program could not \
be found or could not be executed.")));
-#else /* WSM */
- Warning ("Cannot restart the window manager");
-#endif /* WSM */
Do_Quit_Mwm (True);
{
XUnmapWindow (DISPLAY, pCD->iconWindow);
XRemoveFromSaveSet (DISPLAY, pCD->iconWindow);
-#ifdef WSM
XReparentWindow (DISPLAY, pCD->iconWindow,
ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX,
pCD->pWsList->iconY);
-#else /* WSM */
- XReparentWindow (DISPLAY, pCD->iconWindow,
- ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY);
-#endif /* WSM */
}
if (pCD->maxConfig)
ClientListEntry *pStackEntry;
String string = args;
int flags = STACK_NORMAL;
-#ifdef WSM
WmWorkspaceData *pWS = ACTIVE_WS;
-#endif /* WSM */
if (string)
{
F_GROUP_ALL)))
{
pNextEntry = pEntry->nextSibling;
-#ifdef WSM
if (ClientInWorkspace (pWS, pEntry->pCD))
{
-#endif /* WSM */
Do_Raise (pEntry->pCD, pStackEntry, STACK_NORMAL);
pStackEntry = pEntry;
-#ifdef WSM
}
-#endif /* WSM */
}
}
/* process family stacking stuff */
}
index += len;
}
-#ifdef WSM
if (ClientInWorkspace (pWS, pCD))
{
-#endif /* WSM */
Do_Raise (pCD, (ClientListEntry *) NULL, flags);
-#ifdef WSM
}
-#endif /* WSM */
}
}
else if (pCD)
{
-#ifdef WSM
if (ClientInWorkspace (pWS, pCD))
{
-#endif /* WSM */
Do_Raise (pCD, (ClientListEntry *) NULL, STACK_NORMAL);
-#ifdef WSM
}
-#endif /* WSM */
}
return (True);
Boolean restackTransients;
ClientData *pcdLeader;
WmWorkspaceData *pWS = ACTIVE_WS;
-#ifdef WSM
Boolean bLeaderRestacked;
-#endif /* WSM */
if (pCD->pECD)
{
*/
return;
}
- else
-#ifdef WSM
- if (ClientInWorkspace(pWS, pCD) &&
+ else if (ClientInWorkspace(pWS, pCD) &&
(!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD)))
{
/*
*/
return;
}
-#endif /* WSM */
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
}
else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */
{
-#ifdef WSM
/*
* Handle restacking of primary/secondary windows
* within the transient window tree. Don't raise this
}
}
-#endif /* WSM */
+
/*
* If this is a transient window then put it on top of its
* sibling transient windows.
/* Restack the transients if needed */
-#ifdef WSM
if ((restackTransients) || (bLeaderRestacked))
-#else /* WSM */
- if (restackTransients)
-#endif /* WSM */
{
RestackTransients (pCD);
}
* The window is obscured by another window, raise the window.
*/
-#ifdef WSM
F_Raise (NULL, pCD, (XEvent *)NULL);
-#else /* WSM */
- F_Raise (NULL, pcdLeader, (XEvent *)NULL);
-#endif /* WSM */
}
else if (CheckIfClientObscuringAny (pcdLeader) &&
!(wmGD.systemModalActive &&
*/
F_Lower (NULL, pcdLeader, (XEvent *)NULL);
-#ifdef WSM
if ((pcdLeader->secondariesOnTop == False) &&
(pCD->transientLeader != NULL) &&
(!IS_APP_MODALIZED(pcdLeader)))
(void) BumpPrimaryToTop (pcdLeader);
RestackTransients (pcdLeader);
}
-#endif /* WSM */
}
-#ifdef WSM
else if ((pcdLeader->secondariesOnTop == False) &&
(pcdLeader->transientChildren != NULL) &&
(!wmGD.systemModalActive) &&
RestackTransients (pcdLeader);
}
}
-#endif /* WSM */
}
return (True);
h = (unsigned int) pCD->maxHeight;
}
-#ifdef WSM
if (wmGD.refreshByClearing)
{
RefreshByClearing (pCD->clientFrameWin);
}
else
{
-#endif /* WSM */
/* default background_pixmap is None */
win = XCreateWindow (DISPLAY,
pCD->clientBaseWin,
XMapWindow (DISPLAY, win);
XDestroyWindow (DISPLAY, win);
-#ifdef WSM
}
-#endif /* WSM */
XFlush (DISPLAY);
}
} /* END OF FUNCTION Do_Set_Behavior */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* F_Set_Context (args, pCD, event)
return (True);
} /* END OF FUNCTION F_Set_Context */
-#endif /* WSM */
\f
/*************************************<->*************************************
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* F_InvokeCommand (args, pCD, event)
return (True);
} /* END OF FUNCTION F_InvokeCommand */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
dirtyLeader = NULL;
}
}
-#if defined(DEBUG) && defined(WSM)
+#if defined(DEBUG)
\f
/***********************<->*************************************
*
}
#endif /* DEBUG */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* F_Next_Workspace (args, pCD, event)
}
#endif /* DEBUG */
-#endif /* WSM */
-
-
-
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
-#ifdef WSM
extern Boolean F_Action (String actionName, ClientData *pCD, XEvent *event);
-#endif /* WSM */
extern Boolean F_Beep (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Lower (String args, ClientData *pCD, XEvent *event);
extern void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags);
extern void Do_Quit_Mwm (Boolean diedOnRestart);
extern Boolean F_Focus_Key (String args, ClientData *pCD, XEvent *event);
extern void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags);
-#ifdef WSM
extern Boolean F_Goto_Workspace (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Help (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Help_Mode (String args, ClientData *pCD, XEvent *event);
-#endif /* WSM */
extern Boolean F_Next_Key (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Prev_Cmap (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Prev_Key (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event);
-#ifdef WSM
extern Boolean F_Marquee_Selection (String args, ClientData *pCD, XEvent *event);
-#endif /* WSM */
extern Boolean F_Maximize (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Menu (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Minimize (String args, ClientData *pCD, XEvent *event);
extern void Do_Restart (Boolean dummy);
extern void RestartWm (long startupFlags);
extern void DeFrameClient (ClientData *pCD);
-#ifdef WSM
extern Boolean F_Send (String args, ClientData *pCD, XEvent *event);
-#endif /* WSM */
extern Boolean F_Send_Msg (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Separator (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Raise (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Set_Behavior (String args, ClientData *pCD, XEvent *event);
-#ifdef WSM
extern Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event);
-#endif
extern void Do_Set_Behavior (Boolean dummy);
extern Boolean F_Title (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Screen (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Toggle_Front_Panel (String args, ClientData *pCD,
XEvent *event);
extern Boolean F_Version (String args, ClientData *pCD, XEvent *event);
-#ifdef WSM
extern Boolean F_Next_Workspace (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Prev_Workspace (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Workspace_Presence (String args, ClientData *pCD,
#if defined(DEBUG)
extern Boolean F_ZZ_Debug (String, ClientData *, XEvent *);
#endif /* DEBUG */
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
extern Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event);
extern Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
extern Time GetFunctionTimestamp (XButtonEvent *pEvent);
extern void ReBorderClient (ClientData *pCD, Boolean reMapClient);
extern void ClearDirtyStackEntry (ClientData *pCD); /* Fix for 5325 */
#include <X11/StringDefs.h>
#include <Xm/MwmUtil.h>
#include <Xm/Xm.h>
-#ifdef WSM
#include <Xm/ColorObjP.h>
#include <Dt/Service.h>
#include <Dt/Wsm.h>
#include <Dt/WsmP.h>
#include "WmParse.h"
#include <Dt/Action.h>
-#endif /* WSM */
#if defined(sun) && defined(ALLPLANES)
#include <X11/extensions/allplanes.h>
#ifdef MOTIF_ONE_DOT_ONE
#define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET"
#endif
-#ifdef WSM
extern int WmIdentity;
#define CSERVE_NORMAL 0
#define CSERVE_NOT_AVAILABLE 1
#define CSERVE_FAILURE 2
-#endif /* WSM */
/* window manager name and class used to get resources: */
#define WM_RESOURCE_CLASS "Mwm"
#define WM_RESOURCE_NAME "mwm"
-#ifdef WSM
#define DT_WM_RESOURCE_CLASS "Dtwm"
#define DT_WM_RESOURCE_NAME "dtwm"
#define MwmBehavior (WmIdentity == MWM)
#define DtwmBehavior (WmIdentity == DT_MWM)
-#else
-#define MwmBehavior (True)
-
-#endif /* WSM */
/* ICCC atom names: */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define _XA_TARGETS "TARGETS"
# define _XA_MULTIPLE "MULTIPLE"
# define _XA_TIMESTAMP "TIMESTAMP"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
#define _XA_WM_STATE "WM_STATE"
#define _XA_WM_PROTOCOLS "WM_PROTOCOLS"
#define _XA_WM_TAKE_FOCUS "WM_TAKE_FOCUS"
#define _XA_WM_COLORMAP_WINDOWS "WM_COLORMAP_WINDOWS"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* original set of query targets */
# define _XA_MOTIF_WM_CLIENT_WINDOW "_MOTIF_WM_CLIENT_WINDOW"
# define _XA_MOTIF_WM_POINTER_WINDOW "_MOTIF_WM_POINTER_WINDOW"
/* automation support */
# define _XA_MOTIF_WM_AUTOMATION "_MOTIF_WM_AUTOMATION"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/* window manager exit value on fatal errors: */
#define WM_ERROR_EXIT_VALUE 1
#define MANAGEW_CONFIRM_BOX (1L << 4)
#define MANAGEW_WM_RESTART_ICON (1L << 5)
-#ifdef WSM
#define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | \
MANAGEW_CONFIRM_BOX )
-#else /* WSM */
-#define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | MANAGEW_CONFIRM_BOX)
-#endif /* WSM */
/* keyboard input focus flag values (for calls to SetKeyboardFocus) */
#define ALWAYS_SET_FOCUS (1L << 0)
#define TEXT_HEIGHT(pfs) (((pfs)->ascent)+((pfs)->descent))
/* icon frame shadow widths */
-#ifdef WSM
#define ICON_EXTERNAL_SHADOW_WIDTH (wmGD.iconExternalShadowWidth)
-#else /* WSM */
-#define ICON_EXTERNAL_SHADOW_WIDTH 2
-#endif /* WSM */
#define ICON_INTERNAL_SHADOW_WIDTH 1
/* padding widths */
/* client frame shadow widths */
-#ifdef WSM
#define FRAME_EXTERNAL_SHADOW_WIDTH (wmGD.frameExternalShadowWidth)
-#else /* WSM */
-#define FRAME_EXTERNAL_SHADOW_WIDTH 2
-#endif /* WSM */
#define FRAME_INTERNAL_SHADOW_WIDTH 1
#define FRAME_CLIENT_SHADOW_WIDTH 1
#define FRAME_MATTE_SHADOW_WIDTH 1
#define STRETCH_COUNT 8
-#ifdef WSM
/* Workspace allocation granularity */
#define WS_ALLOC_AMOUNT 8
/* Window list allocation granularity */
#define WINDOW_ALLOC_AMOUNT 16
-#endif /* WSM */
/* function flag masks */
#define WM_FUNC_DEFAULT MWM_FUNC_ALL
#define WM_FUNC_PANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE)
#define WM_FUNC_SUBPANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE|\
MWM_FUNC_CLOSE)
-#ifdef WSM
/* workspace controller definitions */
#define CONTROL_BOX_FUNCTIONS (MWM_FUNC_MOVE)
/* workspace presence definitions */
#define PRESENCE_BOX_FUNCTIONS (MWM_FUNC_MOVE)
-#endif /* WSM */
/* show feedback definitions */
#define WM_SHOW_FB_BEHAVIOR (1L << 0)
#define WM_SHOW_FB_DEFAULT WM_SHOW_FB_ALL
-#ifdef WSM
/* flags identifying resources to save */
#define WM_RES_WORKSPACE_LIST (1L << 0)
#define WM_RES_ICONBOX_GEOMETRY (1L << 5)
#define WM_RES_WORKSPACE_COUNT (1L << 6)
-#endif /* WSM */
\f
} WmColorData;
-#ifdef WSM
typedef Atom WorkspaceID;
-#endif
\f
/*************************************<->*************************************
#define F_CONTEXT_NORMAL (1L << 2)
#define F_CONTEXT_MAXIMIZE (1L << 3)
#define F_CONTEXT_ICONBOX (1L << 4)
-#ifdef WSM
#define F_CONTEXT_IFKEY (1L << 7)
-#endif /* WSM */
#define F_CONTEXT_WINDOW (F_CONTEXT_NORMAL|F_CONTEXT_MAXIMIZE)
#define F_CONTEXT_ALL (F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW)
#define FRAME_NBORDER 14
#define FRAME_MATTE 15
#define FRAME_MISC FRAME_MATTE
-#ifdef WSM
#define FRAME_TITLEBAR 17
-#endif /* WSM */
/* icon part contexts */
#define ICON_PART_NONE 0
{
Boolean clickPending;
Boolean doubleClickPending;
-#ifdef WSM
Boolean bReplayed;
-#endif /* WSM */
unsigned int button;
unsigned int state;
unsigned int releaseState;
#define F_GROUP_ALL (F_GROUP_DEFAULT | F_GROUP_TRANSIENT)
#define F_GROUP_GROUP (1L << 3)
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* Workspace data structures ...
#define SM_START_ACK 1
#define SM_STOP_ACK 2
-#endif /* WSM */
-\f
/*************************************<->*************************************
*
* Menu specification data structures ...
*
*************************************<->***********************************/
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*
* Used to denote where the separators belong in a pair of separators
* used to surround a client command.
* Used to denote what kind of change to make to a client command.
*/
typedef enum { ENABLE, DISABLE, REMOVE, RENAME } CmdModifier;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
typedef struct _MenuItem
{
String wmFuncArgs;
Context greyedContext;
long mgtMask;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
String clientCommandName; /* as specified by the user in
his .mwmrc file. */
CARD32 clientCommandID;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
struct _MenuItem *nextMenuItem;
} MenuItem;
-#ifdef WSM
/*
* We use the top part of mgtMask for workspace function bits.
#define MWM_MGT_MASK 0x0000FFFF
#define DTWM_MGT_MASK 0xFFFF0000
-#endif /* WSM */
typedef struct _MenuButton
{
} MenuButton;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
typedef struct _MenuExclusion
{
String command_string;
struct _MenuExclusion *nextExclusion;
} MenuExclusion;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
typedef struct _MenuSpec
{
Context accelContext; /* accelerator context */
KeySpec *accelKeySpecs; /* list of accelerator KeySpecs */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
MenuExclusion *exclusions; /* list of client commands to be
excluded from this menu. */
Boolean clientLocal; /* this menu is owned by a client and not
shared with any other clients */
CARD32 commandID; /* if this is a client command, then this
its id value - globally unique. */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
struct _MenuSpec *nextMenuSpec;
} MenuSpec;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* The range to which a client command operation should apply. */
typedef enum { SINGLE, ROOT, ALL } OpRange;
struct _matchlist *next;
} MatchList;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
int currentCol;
int lastRow;
int lastCol;
-#ifdef WSM
WorkspaceID wsID; /* workspace identifier */
-#endif /* WSM */
struct _ClientData *pCD_iconBox; /* ptr to its own clientdata */
struct _IconBoxData *pNextIconBox; /* ptr to next icon box */
struct _IconPlacementData IPD; /* icon placement data */
Window rootWindow;
Widget screenTopLevelW;
Widget screenTopLevelW1; /* for internal WM components */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
Widget utmShell; /* DrawingArea used for UTM */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
Widget confirmboxW[4];
Widget wPanelist; /* panel object */
-#ifdef WSM
WsPresenceData presence; /* workspace presence dialog*/
Widget switcherW; /* workspace switcher */
Widget switcherShellW; /* shell for ws switcher */
-#endif /* WSM */
Window wmWorkspaceWin; /* holds wm properties */
Window feedbackWin;
Window activeIconTextWin;
Window activeLabelParent;
String displayString; /* used for putenv in F_Exec */
-#ifdef WSM
int displayResolutionType;
-#endif /* WSM */
struct _WmFpEmbeddedClientData *pECD; /* clients living in front panel */
int numEmbeddedClients;
struct _WmFpPushRecallClientData *pPRCD; /* push_recall clients */
Colormap workspaceColormap;
Colormap lastInstalledColormap;
struct _WmWorkspaceData *pActiveWS; /* for this screen */
-#ifdef WSM
struct _WmWorkspaceData *pLastWS; /* previously active WS */
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
CmdTree *cciTree; /* pointer to cci definitions */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/* per screen caches */
BitmapCache *bitmapCache;
GC fadeIconGC;
GC fadeIconTextGC;
-#ifdef WSM
-
/* per screen configuration outline windows */
Window woN; /* North outline window */
Window woS; /* South outline window */
Window woE; /* East outline window */
Window woW; /* West outline window */
-#endif /* WSM */
/* per screen feedback data */
unsigned long fbStyle;
int actionNbr;
/* resource description file data: */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
String rootMenu; /* resource */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
String buttonBindings; /* resource */
ButtonSpec *buttonSpecs;
String keyBindings; /* resource */
Boolean decoupleTitleAppearance; /* see clientTitleAppearance */
int frameBorderWidth; /* resource */
String feedbackGeometry; /* resource */
-#ifndef WSM
- String iconBoxGeometry; /* resource */
-#endif /* WSM */
String iconBoxName; /* resource */
String iconBoxSBDisplayPolicy; /* resource */
int iconBoxScheme; /* resource - testing */
Boolean iconBoxControl; /* FP control for icon box */
Boolean moveOpaque; /* move window not outlines */
-#ifdef WSM
-
/* pixel set info (from color object) */
XmPixelSet *pPixelData; /* all pixel data */
XmPixelSet *pActivePixelSet; /* ptr into pPixelData */
XmPixelSet *pSecondaryPixelSet; /* ptr into pPixelData */
XmPixelSet *pTextPixelSet; /* ptr into pPixelData */
int colorUse; /* indication from color obj */
-#endif /* WSM */
/* client frame component appearance resources and data: */
ClientListEntry *clientList;
ClientListEntry *lastClient;
-#ifdef WSM
/* DtSessionHints for clients */
struct _DtSessionItem *pDtSessionItems;
int totalSessionItems;
DtSvcHandle hWsm; /* WORKSPACEMGR message handle */
Boolean bMarqueeSelectionInitialized;
-#else /* WSM */
- /* workspace for this screen */
-
- struct _WmWorkspaceData *pWS;
-#endif /* WSM */
-
} WmScreenData;
typedef struct _WmScreenData *PtrScreenData;
#define FADE_ICON_GC(pcd) ((pcd)->pSD->fadeIconGC)
#define FADE_ICON_TEXT_GC(pcd) ((pcd)->pSD->fadeIconTextGC)
#define DEFAULT_PIXMAP(pcd) ((pcd)->pSD->defaultPixmap)
-#ifdef WSM
#define ICON_PLACE(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconPlace)
#define ICON_X(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconX)
#define ICON_Y(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconY)
#define P_ICON_BOX(pcd) ((pcd)->pWsList[(pcd)->currentWsc].pIconBox)
#define ICON_FRAME_WIN(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconFrameWin)
-#else /* WSM */
-#define ICON_PLACE(pcd) ((pcd)->iconPlace)
-#define ICON_X(pcd) ((pcd)->iconX)
-#define ICON_Y(pcd) ((pcd)->iconY)
-#define P_ICON_BOX(pcd) ((pcd)->pIconBox)
-#define ICON_FRAME_WIN(pcd) ((pcd)->iconFrameWin)
-#endif /* WSM */
-
-#ifdef WSM
+
/*
* Definitions for Screen data
*/
String szExecParms;
} WmActionArg;
-#endif /* WSM */
\f
{
int dataType;
-#ifdef WSM
WorkspaceID id;
int map_state;
BackdropData backdrop;
Widget buttonW;
XmString title; /* resource (visible name) */
String iconBoxGeometry;/* resource */
-#endif /* WSM */
String name; /* workspace name */
/* (used for resource fetching) */
struct _ClientData *keyboardFocus; /* ptr to client with the key focus */
struct _ClientData *nextKeyboardFocus; /* next client to get focus */
-#ifdef WSM
struct _ClientData **ppClients; /* list of client data ptrs */
unsigned int numClients; /* number of client in list */
unsigned int sizeClientList; /* size of client list */
-#endif /* WSM */
} WmWorkspaceData;
#define ACTIVE_LABEL_PARENT(pcd) ((pcd)->pSD->activeLabelParent)
-#ifndef WSM
-#define ICON_BOX_GEOMETRY(pcd) ((pcd)->pSD->iconBoxGeometry)
-#endif /* WSM */
#define ICON_BOX_TITLE(pcd) ((pcd)->pSD->iconBoxTitle)
#define TRANSIENT_DECORATION(pcd) ((pcd)->pSD->transientDecoration)
int wmUnmapCount;
struct _WmFpEmbeddedClientData *pECD; /* embedded client data */
struct _WmFpPushRecallClientData *pPRCD; /* embedded client data */
-#ifdef WSM
Atom * paInitialProperties; /* initial window properties */
int numInitialProperties; /* number of initial properties */
-#endif /* WSM */
/* client supported protocols: */
#ifndef NO_OL_COMPAT
Boolean bPseudoTransient; /* transientFor window group */
#endif /* NO_OL_COMPAT */
-#ifndef WSM
- IconBoxData *pIconBox; /* icon box for this win */
-#endif /* WSM */
IconBoxData *thisIconBox; /* icon box data for self */
/* if this is an icon box */
Context grabContext; /* used to support icon box */
struct _ClientData *transientLeader; /* trans leader of this win */
struct _ClientData *transientChildren; /* transients of this win */
struct _ClientData *transientSiblings; /* related transient win's */
-#ifdef WSM
int primaryStackPosition; /* stack pos'n of primary */
Boolean secondariesOnTop; /* resource */
-#endif /* WSM */
int primaryModalCount; /* primary modal win count */
int fullModalCount; /* full modal win count */
long iconFlags;
XmString iconTitle; /* WM_ICON_NAME field */
-#ifndef WSM
- int iconX; /* WM_HINTS field */
- int iconY; /* WM_HINTS field */
- int iconPlace;
- Window iconFrameWin;
-#endif /* WSM */
Pixmap iconPixmap; /* WM_HINTS field */
Pixmap iconMask; /* WM_HINTS field */
Window iconWindow; /* WM_HINTS field */
/* to reflect the */
RList *piconBottomShadows; /* depressed icon image */
-#ifdef WSM
/* workspace data */
int absentMapBehavior; /* resource */
Window attachWindow; /* _DT_WM_HINTS */
SlideDirection slideDirection; /* slide-up direction */
SlideOutRec *pSOR; /* slide-out record */
-#endif /* WSM */
#ifndef NO_SHAPE
short wShaped; /* this window has a bounding shape */
#endif /* NO_SHAPE */
#define NORMAL_STATE 1
#define MINIMIZED_STATE 2
#define MAXIMIZED_STATE 3
-#ifdef WSM
#define UNSEEN_STATE 8
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define NO_CHANGE -1
# define UNSET 0
# define SET 1
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/* clientFlags field values: */
#define CLIENT_HINTS_TITLE (1L << 0)
#define FRONT_PANEL_BOX (1L << 14) /* a DT 3.0 front panel */
#define GOT_DT_WM_HINTS (1L << 15)
-#ifdef WSM
#define SM_LAUNCHED (1L << 17) /* launched by dtsession */
-#endif /* WSM */
#define SM_X (1L << 18) /* X from DB/dtsession */
#define SM_Y (1L << 19) /* Y from DB/dtsession */
/* global return buffer */
#define MAXWMPATH 1023
#define MAXBUF (MAXWMPATH+1)
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* WsClientData
} WsClientData;
-#endif /* WSM */
/*
* frame style types
char **environ; /* environment vector */
char *mwmName; /* name of our executable */
Widget topLevelW;
-#ifdef WSM
Widget topLevelW1; /* from which WM components hang */
-#endif /* WSM */
Boolean confirmDialogMapped; /* confirm dialog is mapped */
XtAppContext mwmAppContext; /* application context for mwm */
XContext windowContextType; /* window context for XSaveContext */
#ifndef IBM_169380
XContext cmapWindowContextType; /* list of pCD's in WM_COLORMAP_WINDOWS context for XSaveContext */
#endif
-#ifdef WSM
XContext mwmWindowContextType; /* mwm win context for XSaveContext */
Window dtSmWindow; /* used for contention management */
Window commandWindow; /* WM_SAVE_YOURSELF win for dtwm */
-#endif /* WSM */
/* presentation resource id's: */
String displayString; /* used for putenv in F_Exec */
Display *display; /* display we are running to */
-#ifdef WSM
Display *display1; /* second display connection */
int statusColorServer; /* CSERVE_NORMAL, CSERVE_NOT_AVAILABLE */
DtWmpParseBuf *pWmPB; /* global parse buffer */
-#endif /* WSM */
int numScreens; /* number of screens */
unsigned char **screenNames; /* default names for screens */
WmScreenData *Screens; /* array of screen info */
/* Resource database used to restore client geometries, etc. */
XrmDatabase clientResourceDB;
-#ifndef WSM
- char *dbFileName;
- String sessionClientDB; /* resource */
-#endif
/* atoms used in inter-client communication: */
Atom xa_MWM_INFO;
Atom xa_MWM_OFFSET;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
Atom *xa_WM;
Atom xa_TARGETS;
/* automation support */
Atom _MOTIF_WM_AUTOMATION;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
Atom xa_MOTIF_BINDINGS;
Atom xa_COMPOUND_TEXT;
Atom xa_WMSAVE_HINT;
-#ifdef WSM
-
/* atoms used for workspace management: */
Atom xa_DT_WORKSPACE_HINTS;
Atom xa_DT_WM_EXIT_SESSION;
Atom xa_DT_WM_LOCK_DISPLAY;
Atom xa_DT_WM_READY;
-#endif /* WSM */
+
#ifndef NO_OL_COMPAT
Atom xa_OL_WIN_ATTR;
Atom xa_OL_DECOR_RESIZE;
Boolean autoKeyFocus; /* resource */
int autoRaiseDelay; /* resource */
String bitmapDirectory; /* resource */
-#ifdef WSM
String backdropDirs; /* resource */
-#endif /* WSM */
Boolean clientAutoPlace; /* resource */
int colormapFocusPolicy; /* resource */
String configFile; /* resource */
-#ifdef WSM
String cppCommand; /* resource */
-#endif /* WSM */
Boolean deiconifyKeyFocus; /* resource */
int doubleClickTime; /* resource */
Boolean enableWarp; /* resource */
Boolean enforceKeyFocus; /* resource */
Boolean freezeOnConfig; /* resource - testing */
-#ifdef WSM
Boolean useWindowOutline; /* resource */
-#endif /* WSM */
Boolean iconAutoPlace; /* resource */
Boolean iconClick; /* resource */
Boolean interactivePlacement; /* resource */
Boolean multiScreen; /* resource */
String screenList; /* resource */
int showFeedback; /* resource */
-#ifdef WSM
Boolean refreshByClearing; /* resource */
Boolean rootButtonClick; /* resource */
-#endif /* WSM */
Boolean startupKeyFocus; /* resource */
Boolean systemButtonClick; /* resource */
Boolean systemButtonClick2; /* resource */
Boolean useLargeCursors;
Boolean useFrontPanel; /* resource */
-#ifdef WSM
String helpDirectory; /* resource */
Window requestContextWin; /* for WmRequest f.fcns */
-#endif /* WSM */
Boolean dtLite; /* resource */
Boolean blinkOnExec; /* resource */
WmScreenData *dtSD; /* screen for front panel */
int iSlideUpsInProgress;
Boolean waitForClicks; /* resource */
FrameStyle frameStyle; /* resource */
-#ifdef WSM
Dimension iconExternalShadowWidth; /* resource */
Dimension frameExternalShadowWidth; /* resource */
int marqueeSelectGranularity; /* resource */
Boolean bReplayedButton; /* true if button replayed */
Boolean bSuspendSecondaryRestack; /* overrides transient
stacking */
-#endif /* WSM */
XmString clientDefaultTitle;
XmString iconDefaultTitle;
/* quick references to global data: */
#define DISPLAY wmGD.display
-#ifdef WSM
#define DISPLAY1 wmGD.display1
-#endif /* WSM */
#define ACTIVE_PSD (wmGD.pActiveSD)
#define ACTIVE_SCREEN (wmGD.pActiveSD->screen)
#define ACTIVE_WS (wmGD.pActiveSD->pActiveWS)
/* According to the xkb protocol bits 13 and 14 are interpreted as a */
/* two-bit unsigned numeric value and report the state keyboard group */
#define NOLOCKMOD(state) ((state) & ~wmGD.lockingModMask & ~(3 << 13))
-#ifdef WSM
/* absent map behavior policy values (absentMapBehavior): */
#define AMAP_BEHAVIOR_ADD 0
#define AMAP_BEHAVIOR_MOVE 1
#define AMAP_BEHAVIOR_IGNORE 2
-#endif /* WSM */
/* colormap focus policy values (colormapFocus): */
#define CMAP_FOCUS_EXPLICIT 0
#define MOVE_CLIENT 1
#define RESIZE_CLIENT 2
#define PLACE_CLIENT 3
-#ifdef WSM
#define MARQUEE_SELECT 4
-#endif /* WSM */
/* Motif input bindings file name */
#define MOTIF_BINDINGS_FILE ".motifbind"
# else /* __ultrix */
# define _CLIENT_CAT_NAME "dtwm"
# endif /* __ultrix */
-# ifdef WSM
-# define GETMESSAGE(set, number, string)\
+# define GETMESSAGE(set, number, string)\
_DtGetMessage(_CLIENT_CAT_NAME, set, number, string)
-# else
-# define GETMESSAGE(set, number, string) (string)
-# endif /* WSM */
#else
# define GETMESSAGE(set, number, string)\
string
* B/W displays.
*
*************************************<->***********************************/
-#ifdef WSM
void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
XmString xmstring, GC gc, Position x, Position y,
Dimension width, XRectangle *pbox, Boolean bCenter)
-#else /* WSM */
-void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
- XmString xmstring, GC gc, Position x, Position y,
- Dimension width, XRectangle *pbox)
-#endif /* WSM */
{
Dimension textWidth;
-#ifdef WSM
int alignment;
-#else /* WSM */
- int alignment = XmALIGNMENT_BEGINNING;
-#endif /* WSM */
textWidth = XmStringWidth(xmfontlist, xmstring);
-#ifdef WSM
alignment = bCenter ? XmALIGNMENT_CENTER : XmALIGNMENT_BEGINNING;
if (textWidth >= pbox->width) /* can't center text if no room */
{ /* left justify & clip text */
alignment = XmALIGNMENT_BEGINNING;
}
-#else /* WSM */
- if (textWidth < pbox->width) { /* center text if there's room */
- alignment = XmALIGNMENT_CENTER;
- }
- else
- { /* left justify & clip text */
- alignment = XmALIGNMENT_BEGINNING;
- }
-#endif /* WSM */
if (ACTIVE_PSD->cleanText)
{
}
} /* END OF FUNCTION WmDrawXmString */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* WmInstallBitmapIntoXmCache (pchName, bitmap, width, height)
}
} /* END OF FUNCTION WmInstallBitmapDataIntoXmCache */
-#endif /* WSM */
unsigned int cwidth, unsigned int cheight);
extern void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y,
char *string, unsigned int length);
-#ifdef WSM
extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
XmString xmstring, GC gc, Position x, Position y,
Dimension width, XRectangle *pbox,
Boolean bCenter);
-#else /* WSM */
-extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
- XmString xmstring, GC gc, Position x, Position y,
- Dimension width, XRectangle *pbox);
-#endif /* WSM */
extern GC WmGetGC (WmScreenData *pSD, unsigned long gc_mask, XGCValues *pGcv);
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
} /* END OF FUNCTION wmDtErrorDialogPopupCB */
/**************************** eof ***************************/
-#endif /* WSM */
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
/******** End Public Function Declarations ********/
/**************************** eof ***************************/
-#endif /* WSM */
#endif /* DTWM_NEED_FNTPL */
-#ifdef WSM
/*
* Backdrop bitmap patterns
*/
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#endif /* DTWM_NEED_BACKBITS */
-#endif /* WSM */
/*
*
* Used to define the small hourglass and mask used to indicate
0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f};
#endif /* DTWM_NEED_TIME16 */
-#ifdef WSM
/**************************** eof ***************************/
-#endif /* WSM */
#include "WmIconBox.h"
#include "WmMenu.h"
#include "WmWinInfo.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
unsigned long attr_mask;
int xOffset;
int yOffset;
-#ifdef WSM
WsClientData *pWsc = GetWsClientData (pWS, pcd);
-#endif /* WSM */
/*
ICON_APPEARANCE(pcd).background;
}
-#ifdef WSM
if ((!pcd->pSD->useIconBox) ||
(pcd->clientFlags & (CLIENT_WM_CLIENTS | FRONT_PANEL_BOX)))
-#else
- if ((!pcd->pSD->useIconBox) || (pcd->clientFlags & ICON_BOX))
-#endif /* WSM */
{
-#ifdef WSM
pWsc->iconFrameWin = XCreateWindow (DISPLAY,
ROOT_FOR_CLIENT(pcd), /* parent */
pWsc->iconX,
pWsc->iconY,
-#else /* WSM */
- pcd->iconFrameWin = XCreateWindow (DISPLAY,
- ROOT_FOR_CLIENT(pcd), /* parent */
- pcd->iconX,
- pcd->iconY,
-#endif /* WSM */
(unsigned int) ICON_WIDTH(pcd),
(unsigned int) ICON_HEIGHT(pcd),
0, /* border width */
*/
if ((pcd->pSD->useIconBox) &&
-#ifdef WSM
(!(pcd->clientFlags & CLIENT_WM_CLIENTS)) &&
-#else
- (!(pcd->clientFlags & ICON_BOX)) &&
-#endif /* WSM */
(pcd->clientFunctions & MWM_FUNC_MINIMIZE) )
{
if (!InsertIconIntoBox(pWS->pIconBox, pcd))
ReparentIconWindow (pcd, xOffset, yOffset);
}
-#ifdef WSM
if (pcd->piconTopShadows->used == 0)
-#endif /* WSM */
MakeIconShadows (pcd, xOffset, yOffset);
return(TRUE);
GetIconTitleBox (pcd, &textBox);
/* get appropriate GCs */
-#ifdef WSM
if ((ACTIVE_PSD->useIconBox &&
!((pcd->dtwmBehaviors & (DtWM_BEHAVIOR_PANEL)) ||
(pcd->clientFlags & CLIENT_WM_CLIENTS))) ||
-#else
- if ((ACTIVE_PSD->useIconBox && !(pcd->clientFlags & ICON_BOX)) ||
-#endif /* WSM */
!(wmGD.keyboardFocus == pcd))
{
iconGC = ICON_APPEARANCE(pcd).inactiveGC;
/* paint the text */
-#ifdef WSM
WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList,
pcd->iconTitle, iconGC,
textBox.x, textBox.y, textBox.width, &textBox, True);
-#else /* WSM */
- WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList,
- pcd->iconTitle, iconGC,
- textBox.x, textBox.y, textBox.width, &textBox);
-#endif /* WSM */
} /* END OF FUNCTION DrawIconTitle */
* Get appropriate GCs
* Dim text if this is in the icon box and the client is mapped
*/
-#ifdef WSM
if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) &&
!(pcd->clientFlags & CLIENT_WM_CLIENTS)) ||
-#else
- if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) &&
- !(pcd->clientFlags & ICON_BOX)) ||
-#endif /* WSM */
!(wmGD.keyboardFocus == pcd))
{
iconGC = ICON_APPEARANCE(pcd).inactiveGC;
FALSE);
/* in with the new */
-#ifdef WSM
WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd),
ICON_APPEARANCE(pcd).fontList,
pcd->iconTitle, iconGC,
textBox.x, textBox.y, textBox.width, &textBox,
True);
-#else /* WSM */
- WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd),
- ICON_APPEARANCE(pcd).fontList,
- pcd->iconTitle, iconGC,
- textBox.x, textBox.y, textBox.width, &textBox);
-#endif /* WSM */
/*
* Erase & paint text in the active icon text window
FALSE);
}
-#ifdef WSM
WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin,
ICON_APPEARANCE(pcd).fontList,
pcd->iconTitle, iconGC,
textBox.x, textBox.y, textBox.width, &textBox, True);
-#else /* WSM */
- WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin,
- ICON_APPEARANCE(pcd).fontList,
- pcd->iconTitle, iconGC,
- textBox.x, textBox.y, textBox.width, &textBox);
-#endif /* WSM */
} /* END OF FUNCTION PaintActiveIconText */
pCD = clients[i];
strcpy(ptr, pCD->smClientID);
clientWorkspaces[i] =
-#ifdef WSM
pCD->pWsList[pCD->currentWsc].wsID;
-#else
- pCD->pSD->pWS->id;
-#endif
}
}
}
#include "WmIDecor.h"
#include "WmIconBox.h"
#include "WmWinConf.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
/*
ClientData *pCD;
ClientData *pCD_active;
int hasActiveText = 1;
-#ifdef WSM
WsClientData *pWsc;
-#endif /* WSM */
/*
* find context of the activeIconTextWin to get pCD and then
MoveIconInfo (&ACTIVE_WS->IPData, iOld, iNew);
pCD = ACTIVE_WS->IPData.placeList[iNew].pCD;
-#ifdef WSM
pWsc = GetWsClientData (ACTIVE_WS, pCD);
pWsc->iconPlace = iNew;
CvtIconPlaceToPosition (&ACTIVE_WS->IPData,
pWsc->iconPlace, &pWsc->iconX, &pWsc->iconY);
-#else /* WSM */
- pCD->iconPlace = iNew;
- CvtIconPlaceToPosition (&ACTIVE_WS->IPData,
- pCD->iconPlace, &pCD->iconX, &pCD->iconY);
-#endif /* WSM */
if (hasActiveText && (pCD == pCD_active))
{
/* hide activeIconTextWin first */
HideActiveIconText ((WmScreenData *)NULL);
-#ifdef WSM
XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX,
pWsc->iconY);
-#else /* WSM */
- XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX,
- pCD->iconY);
-#endif /* WSM */
ShowActiveIconText (pCD);
}
else
{
-#ifdef WSM
XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX,
pWsc->iconY);
-#else /* WSM */
- XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX,
- pCD->iconY);
-#endif /* WSM */
}
}
}
void MoveIconInfo (IconPlacementData *pIPD, int p1, int p2)
{
-#ifdef WSM
WsClientData *pWsc;
-#endif /* WSM */
/* only move if destination is empty */
if (pIPD->placeList[p2].pCD == NULL)
{
pIPD->placeList[p2].pCD = pIPD->placeList[p1].pCD;
pIPD->placeList[p2].theWidget = pIPD->placeList[p1].theWidget;
-#ifdef WSM
pWsc = GetWsClientData (pIPD->placeList[p2].pCD->pSD->pActiveWS,
pIPD->placeList[p2].pCD);
pWsc->iconPlace = p2;
-#else /* WSM */
- pIPD->placeList[p2].pCD->iconPlace = p2;
-#endif /* WSM */
pIPD->placeList[p1].pCD = NULL;
pIPD->placeList[p1].theWidget = NULL;
}
}
-#ifdef WSM
+
/**************************** eof ***************************/
-#endif /* WSM */
*/
#include "WmGlobal.h"
-#ifdef WSM
#include "WmHelp.h"
-#endif /* WSM */
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
#include "WmResParse.h"
#include "WmResource.h"
#include "WmWinInfo.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
void InitIconBox (WmScreenData *pSD)
{
-#ifdef WSM
int iws;
-#endif /* WSM */
/*
* Start the process of making the icon boxes
*/
-#ifdef WSM
/*
* Manage a separate icon box in every workspace
* on this screen.
AddIconBoxForWorkspace (&pSD->pWS[iws]);
}
-#else /* WSM */
- ManageWindow (pSD, None, MANAGEW_ICON_BOX);
-#endif /* WSM */
-
if (pSD->fadeNormalIcon)
{
MakeFadeIconGC (pSD);
} /* END OF FUNCTION InitIconBox */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* AddIconBoxForWorkspace (pWS)
ManageWindow (pWS->pSD, None, MANAGEW_ICON_BOX);
} /* END OF FUNCTION AddIconBoxForWorkspace */
-#endif /* WSM */
-\f
/*************************************<->*************************************
*
* MakeIconBox (pWS, pCD);
} /* END OF FUNCTION MakeIconBox */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* DestroyIconBox (pWS)
XtFree ((char *) pIBD);
} /* END OF FUNCTION DestroyIconBox */
-#endif /* WSM */
-\f
/*************************************<->*************************************
*
* MakeShell (pWS, pIBD)
Arg setArgs[20];
int i;
-#ifdef WSM
char *pchIBTitle = NULL;
-#endif /* WSM */
/*
* Create top level application shell for icon box
XtSetArg (setArgs[i], XmNkeyboardFocusPolicy, (XtArgVal)XmEXPLICIT); i++;
-#ifndef WSM
- if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
- {
- XtSetArg (setArgs[i], XmNbackground,
- (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
- XtSetArg (setArgs[i], XmNforeground,
- (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++;
- }
-#else /* WSM */
if (pWS->pSD->iconBoxTitle)
{
pchIBTitle = WmXmStringToString (pWS->pSD->iconBoxTitle);
XtSetArg (setArgs[i], XmNtitle, (XtArgVal)pchIBTitle); i++;
XtSetArg (setArgs[i], XmNiconName, (XtArgVal)pchIBTitle); i++;
}
-#endif /* WSM */
XtSetArg (setArgs[i], XmNmappedWhenManaged, (XtArgVal)False); i++;
XtSetArg (setArgs[i], XmNdialogStyle, (XtArgVal)XmDIALOG_MODELESS); i++;
XtSetArg (setArgs[i], XmNdepth,
XtSetArg (setArgs[i], XmNscreen,
(XtArgVal) ScreenOfDisplay (DISPLAY, pWS->pSD->screen)); i++;
-#ifdef WSM
pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNclient,
topLevelShellWidgetClass,
pWS->workspaceTopLevelW,
(ArgList)setArgs, i);
if (pchIBTitle != NULL) XtFree (pchIBTitle);
-#else /* WSM */
- pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNiconBox,
- topLevelShellWidgetClass,
- pWS->workspaceTopLevelW,
- (ArgList)setArgs, i);
-#endif /* WSM */
} /* END OF FUNCTION MakeShell */
*/
i=0;
-#ifndef WSM
-/*
- if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
- {
- XtSetArg (setArgs[i], XmNbackground,
- (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
- XtSetArg (setArgs[i], XmNforeground,
- (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++;
- }
-*/
-#endif /* WSM */
XtSetArg (setArgs[i], XmNborderWidth, (XtArgVal) 0 ); i++;
XtSetArg (setArgs[i], XmNmarginWidth, (XtArgVal) 0 ); i++;
XtSetArg (setArgs[i], XmNmarginHeight, (XtArgVal) 0 ); i++;
pIBD->shellWidget,
(ArgList)setArgs, i);
-#ifdef WSM
XtAddCallback (pIBD->frameWidget, XmNhelpCallback,
WmDtWmTopicHelpCB, WM_DT_ICONBOX_TOPIC);
-#endif /* WSM */
/*
* Create scrolled window to hold row column manager
*/
XtSetArg (setArgs[i], XmNborderWidth , (XtArgVal) 0 ); i++;
XtSetArg (setArgs[i], XmNspacing , (XtArgVal) IB_MARGIN_WIDTH ); i++;
-#ifndef WSM
-
- if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
- {
- XtSetArg (setArgs[i], XmNbackground,
- (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
- XtSetArg (setArgs[i], XmNforeground,
- (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++;
- }
-#endif /* WSM */
/*
* do we want to get these from a resource or set it here
* to control the appearance of the iconBox
#endif /* DEBUG_ICON_BOX */
XtSetArg (setArgs[i], XmNshadowThickness,(XtArgVal) 0); i++;
-#ifndef WSM
- if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
- {
- XtSetArg (setArgs[i], XmNforeground,
- (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
- XtSetArg (setArgs[i], XmNbottomShadowColor,
- (XtArgVal) pWS->pSD->clientAppearance.bottomShadowColor ); i++;
- XtSetArg (setArgs[i], XmNtopShadowColor,
- (XtArgVal) pWS->pSD->clientAppearance.topShadowColor ); i++;
- }
-#endif /* WSM */
XtSetArg (setArgs[i], XmNspacing , 0); i++;
XtSetArg (setArgs[i], XmNmarginHeight , 0); i++;
pIBD->scrolledWidget = NULL;
pIBD->bBoardWidget = NULL;
pIBD->clipWidget = NULL;
-#ifdef WSM
pIBD->wsID = pWS->id;
-#endif /* WSM */
ToLower (pWS->pSD->iconBoxSBDisplayPolicy);
* iconBoxGeometry width and height are not specified
*/
-#ifdef WSM
if (pWS->iconBoxGeometry == NULL) /* not set by user */
-#else /* WSM */
- if (pWS->pSD->iconBoxGeometry == NULL) /* not set by user */
-#endif /* WSM */
{
/*
* Use the iconPlacement resource
}
else
{
-#ifdef WSM
mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y,
&width, &height);
-#else /* WSM */
- mask = XParseGeometry(pWS->pSD->iconBoxGeometry, &X, &Y,
- &width, &height);
-#endif /* WSM */
if ((mask & WidthValue) && (width > 0))
{
* Set initial placement of icon box
*/
-#ifdef WSM
mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y,
&width, &height);
-#else /* WSM */
- mask = XParseGeometry(pCD->pSD->iconBoxGeometry,
- &X, &Y, &width, &height);
-#endif /* WSM */
if (mask & XValue)
{
while (pibd)
{
XtPopup(pibd->shellWidget, XtGrabNone);
-#ifndef WSM
- F_Raise (NULL, pibd->pCD_iconBox, (XEvent *)NULL);
- XMapWindow (DISPLAY, pibd->pCD_iconBox->clientFrameWin);
-#endif /* WSM */
pibd = pibd->pNextIconBox;
}
}
} /* END OF FUNCTION MapIconBoxes */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* UnmapIconBoxes (pWS)
}
} /* END OF FUNCTION UnmapIconBoxes */
-#endif /* WSM */
/******************************<->*************************************
*
Widget iconWidget;
IconInfo *pIconInfo;
static XmString dummyString = NULL;
-#ifdef WSM
WsClientData *pWsc;
WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID);
pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
/*
* If we go to multiple icon boxes, find the box this client
if (pCD->client)
{
-#ifdef WSM
pWsc->pIconBox = tmpPointerToIconBox;
-#else /* WSM */
- P_ICON_BOX(pCD) = tmpPointerToIconBox;
-#endif /* WSM */
iconWidth = ICON_WIDTH(pCD)
+ (2 * IB_MARGIN_WIDTH);
iconHeight = ICON_HEIGHT(pCD)
+ (2 * IB_MARGIN_HEIGHT);
-#ifdef WSM
pIconInfo = InsertIconInfo (pWsc->pIconBox, pCD, (Widget) NULL);
-#else /* WSM */
- pIconInfo = InsertIconInfo (P_ICON_BOX(pCD), pCD, (Widget) NULL);
-#endif /* WSM */
if (pIconInfo)
{
-#ifdef WSM
pWsc->pIconBox->numberOfIcons++;
-#else /* WSM */
- P_ICON_BOX(pCD)->numberOfIcons++;
-#endif /* WSM */
i = 0;
XtSetArg (setArgs[i], XmNbackground,
XtSetArg (setArgs[i], XmNforeground,
(XtArgVal) ICON_APPEARANCE(pCD).foreground ); i++;
-#ifdef WSM
XtSetArg (setArgs[i], XmNx , (XtArgVal) pWsc->iconX); i++;
XtSetArg (setArgs[i], XmNy , (XtArgVal) pWsc->iconY); i++;
-#else /* WSM */
- XtSetArg (setArgs[i], XmNx , (XtArgVal) ICON_X(pCD)); i++;
- XtSetArg (setArgs[i], XmNy , (XtArgVal) ICON_Y(pCD)); i++;
-#endif /* WSM */
XtSetArg (setArgs[i], XmNwidth , (XtArgVal) iconWidth); i++;
XtSetArg (setArgs[i], XmNheight , (XtArgVal) iconHeight); i++;
iconWidget = XtCreateManagedWidget("iconInIconBox",
xmDrawnButtonWidgetClass,
-#ifdef WSM
pWsc->pIconBox->bBoardWidget,
-#else /* WSM */
- P_ICON_BOX(pCD)->bBoardWidget,
-#endif /* WSM */
(ArgList)setArgs, i);
if (dummyString == NULL)
pIconInfo->theWidget = iconWidget;
-#ifdef WSM
pWsc->iconFrameWin = XtWindow (iconWidget);
-#else /* WSM */
- ICON_FRAME_WIN(pCD) = XtWindow (iconWidget);
-#endif /* WSM */
XtAddCallback (iconWidget, XmNactivateCallback,
(XtCallbackProc)IconActivateCallback,
}
}
-#ifdef WSM
ResetIconBoxMaxSize(pWsc->pIconBox->pCD_iconBox,
pWsc->pIconBox->bBoardWidget);
ResetArrowButtonIncrements (pWsc->pIconBox->pCD_iconBox);
-#else /* WSM */
- ResetIconBoxMaxSize(P_ICON_BOX(pCD)->pCD_iconBox,
- P_ICON_BOX(pCD)->bBoardWidget);
-
- ResetArrowButtonIncrements (P_ICON_BOX(pCD)->pCD_iconBox);
-
-#endif /* WSM */
rval = True;
}
}
Arg setArgs[3];
Arg getArgs[4];
Dimension clipWidth, clipHeight;
-#ifdef WSM
WsClientData *pWsc;
-#endif /* WSM */
place = GetNextIconPlace (&pIBD->IPD);
if (place == NO_ICON_PLACE)
pII->pCD = pCD;
-#ifdef WSM
pWsc = GetWsClientData (GetWorkspaceData (pCD->pSD, pIBD->wsID), pCD);
pWsc->iconPlace = place;
pIBD->currentCol = pWsc->iconX / pIBD->pCD_iconBox->widthInc;
pIBD->currentRow = pWsc->iconY / pIBD->pCD_iconBox->heightInc;
-#else /* WSM */
- ICON_PLACE(pCD) = place;
-
- CvtIconPlaceToPosition (&pIBD->IPD, ICON_PLACE(pCD),
- &ICON_X(pCD), &ICON_Y(pCD));
-
-
- /* update next free position */
-
- pIBD->currentCol = ICON_X(pCD) / pIBD->pCD_iconBox->widthInc;
- pIBD->currentRow = ICON_Y(pCD) / pIBD->pCD_iconBox->heightInc;
-
-#endif /* WSM */
/*
* Increase bboard size if necessary
if (pIBD->currentRow > pIBD->lastRow)
{
pIBD->lastRow = pIBD->currentRow;
-#ifdef WSM
if (clipHeight <= (Dimension) (pWsc->iconY +
pIBD->pCD_iconBox->heightInc))
{
XtSetArg (setArgs[i], XmNheight, (XtArgVal)
pWsc->iconY + pIBD->pCD_iconBox->heightInc); i++;
}
-#else /* WSM */
- if (clipHeight <= (pII->pCD->iconY + pIBD->pCD_iconBox->heightInc))
- {
- /*
- * Increase bulletin board height as needed.
- */
- XtSetArg (setArgs[i], XmNheight, (XtArgVal)
- pII->pCD->iconY + pIBD->pCD_iconBox->heightInc); i++;
- }
-#endif /* WSM */
}
}
else
if (pIBD->currentCol > pIBD->lastCol)
{
pIBD->lastCol = pIBD->currentCol;
-#ifdef WSM
if (clipWidth <= (Dimension)
(pWsc->iconX + pIBD->pCD_iconBox->widthInc))
{
(XtArgVal) pWsc->iconX +
pIBD->pCD_iconBox->widthInc); i++;
}
-#else /* WSM */
- if (clipWidth <= (pII->pCD->iconX + pIBD->pCD_iconBox->widthInc))
- {
- /*
- * Increase bulletin board width as needed
- */
- XtSetArg (setArgs[i], XmNwidth,
- (XtArgVal) pII->pCD->iconX +
- pIBD->pCD_iconBox->widthInc); i++;
- }
-#endif /* WSM */
}
if (pIBD->currentRow > pIBD->lastRow)
Dimension oldWidth, oldHeight;
int newWidth, newHeight;
int i, newCols, newRows;
-#ifdef WSM
WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID);
WsClientData *pWsc;
pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
i = 0;
XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++;
}
}
-#ifdef WSM
DeleteIconInfo (pWsc->pIconBox, pCD);
pWsc->pIconBox->numberOfIcons--;
pWsc->pIconBox = NULL;
pWsc->iconPlace = NO_ICON_PLACE;
-#else /* WSM */
- DeleteIconInfo (P_ICON_BOX(pCD), pCD);
-
- pCD->pIconBox->numberOfIcons--;
-
- theChild = XtWindowToWidget (DISPLAY, ICON_FRAME_WIN(pCD));
-#endif /* WSM */
XtUnmanageChild (theChild);
XtDestroyWidget (theChild);
int newWidth, newHeight;
int i;
Boolean rippling = False;
-#ifdef WSM
WsClientData *pWsc;
WmWorkspaceData *pWS;
-#endif /* WSM */
i = 0;
XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++;
* We need to start rippling the icons into new positions if
* their (x,y) position changed
*/
-#ifdef WSM
pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID);
pWsc = GetWsClientData (pWS, pII_2->pCD);
CvtIconPlaceToPosition (&pIBD->IPD, pWsc->iconPlace,
rippling = ((newX != pWsc->iconX) ||
(newY != pWsc->iconY));
-#else /* WSM */
- CvtIconPlaceToPosition (&pIBD->IPD, pII_2->pCD->iconPlace,
- &newX, &newY);
-
- rippling = ((newX != pII_2->pCD->iconX) ||
- (newY != pII_2->pCD->iconY));
-#endif /* WSM */
}
if ((pII_2->pCD == NULL) || rippling)
CvtIconPlaceToPosition (&pIBD->IPD, ix2, &newX, &newY);
-#ifdef WSM
pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID);
pWsc = GetWsClientData (pWS, pII_2->pCD);
pWsc->iconX = newX;
pWsc->iconY = newY;
-#else /* WSM */
- pII_2->pCD->iconX = newX;
- pII_2->pCD->iconY = newY;
-#endif /* WSM */
if (hasActiveText && (pII_2->pCD == pCD_tmp))
{
if (!(XFindContext (DISPLAY, theIcon,
wmGD.windowContextType, (caddr_t *)&pCD)))
{
-#ifdef WSM
SetClientWsIndex (pCD);
-#endif /* WSM */
keyEvent->window = ICON_FRAME_WIN(pCD);
if (pCD->clientState == MINIMIZED_STATE)
{
Window child;
-#ifdef WSM
WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD);
-#endif /* WSM */
-#ifdef WSM
if (pCD->pSD->useIconBox && pWsc->pIconBox)
-#else /* WSM */
- if (pCD->pSD->useIconBox && P_ICON_BOX(pCD))
-#endif /* WSM */
{
-#ifdef WSM
XTranslateCoordinates(DISPLAY,
XtWindow(pWsc->pIconBox->bBoardWidget),
ROOT_FOR_CLIENT(pCD),
pWsc->iconX + IB_MARGIN_WIDTH,
pWsc->iconY + IB_MARGIN_HEIGHT,
pX, pY, &child);
-#else /* WSM */
- XTranslateCoordinates(DISPLAY,
- XtWindow(P_ICON_BOX(pCD)->bBoardWidget),
- ROOT_FOR_CLIENT(pCD),
- ICON_X(pCD) + IB_MARGIN_WIDTH,
- ICON_Y(pCD) + IB_MARGIN_HEIGHT,
- pX, pY, &child);
-#endif /* WSM */
-
}
else
{
*/
Boolean rval = True;
-#ifdef WSM
WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD);
-#endif /* WSM */
XtSetArg (getArgs[i], XmNheight, (XtArgVal) &tmpHeight ); i++;
XtSetArg (getArgs[i], XmNx, (XtArgVal) &tmpX ); i++;
XtSetArg (getArgs[i], XmNy, (XtArgVal) &tmpY ); i++;
-#ifdef WSM
XtGetValues (pWsc->pIconBox->clipWidget, getArgs, i);
XtTranslateCoords(pWsc->pIconBox->scrolledWidget,
tmpX, tmpY,
&clipX, &clipY);
-#else /* WSM */
- XtGetValues (P_ICON_BOX(pCD)->clipWidget, getArgs, i);
- XtTranslateCoords(P_ICON_BOX(pCD)->scrolledWidget,
- tmpX, tmpY,
- &clipX, &clipY);
-#endif /* WSM */
GetIconBoxIconRootXY(pCD, &iconX, &iconY);
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
-#ifdef WSM
extern void AddIconBoxForWorkspace (WmWorkspaceData *pWS);
-#endif /* WSM */
extern void AddNewBox (WmWorkspaceData *pWS, IconBoxData *pIBD);
extern void ChangeActiveIconboxIconText (Widget icon, caddr_t dummy,
XFocusChangeEvent *event);
extern void SetIconBoxInfo (WmWorkspaceData *pWS, ClientData *pCD);
extern void SetNewBounds (IconBoxData *pIBD);
extern void ShowClientIconState (ClientData *pCD, int newState);
-#ifdef WSM
extern void UnmapIconBoxes (WmWorkspaceData *pWS);
-#endif /* WSM */
extern void UpdateIncrements (Widget sWidget, IconBoxData *pIBD,
XConfigureEvent *event);
extern String WmXmStringToString (XmString xmString);
String env_pathname,
Boolean *user_path) ;
#endif
-#ifdef WSM
#include <Xm/IconFile.h>
#include <Dt/GetDispRes.h>
-#endif
#define MATCH_XBM 'B' /* .xbm character: see XmGetPixmap */
#define MATCH_PATH "XBMLANGPATH"
/*
* The bitmap was not made with usable parameters.
*/
-#ifdef WSM
Warning (((char *)GETMESSAGE(38, 9, "Icon bitmap cannot be used on this screen")));
-#else /* WSM */
- Warning ("Invalid root for icon bitmap");
-#endif /* WSM */
return ((Pixmap)NULL);
}
Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName)
{
int bitmapIndex;
-#ifdef WSM
Pixmap pixmap, pixmap_r, mask;
Window root;
int x, y;
unsigned int width, height, border_width, depth;
String sIconFileName;
int iconSizeDesired;
-#endif /* WSM */
/*
* Get the bitmap cache entry (will read data from file if necessary).
* If unable to find the iconName file return NULL.
*/
-#ifdef WSM
if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName,
False)) < 0)
-#else /* WSM */
- if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName)) < 0)
-#endif /* WSM */
{
-#ifdef WSM
if ((PSD_FOR_CLIENT(pCD)->displayResolutionType == LOW_RES_DISPLAY) ||
(PSD_FOR_CLIENT(pCD)->displayResolutionType == VGA_RES_DISPLAY))
{
if (sIconFileName != NULL)
XtFree (sIconFileName);
-#endif /* WSM */
return ((Pixmap)NULL);
}
Pixmap iconPixmap;
GC imageGC, topGC, botGC;
XGCValues gcv;
-#ifdef WSM
unsigned long gc_mask;
XmPixelSet *pPS = NULL;
-#endif /* WSM */
unsigned int imageWidth;
unsigned int imageHeight;
int dest_x, dest_y;
}
/* create a GC to use */
-#ifdef WSM
gc_mask = GCForeground | GCBackground | GCGraphicsExposures;
if (mask)
{
gcv.graphics_exposures = False;
imageGC = XCreateGC (DISPLAY, iconPixmap, gc_mask, &gcv);
-#else /* WSM */
- gcv.foreground = bg; /* clear it first! */
- gcv.background = bg;
- gcv.graphics_exposures = False;
-
- imageGC = XCreateGC (DISPLAY, iconPixmap, (GCForeground|GCBackground),
- &gcv);
-#endif /* WSM */
/*
* Format the image.
dest_x = (imageWidth - width) / 2;
dest_y = (imageHeight - height) / 2;
-#ifdef WSM
if (mask)
{
if (pPS != NULL)
}
XChangeGC (DISPLAY, imageGC, gc_mask, &gcv);
-#else /* WSM */
- /* set the foreground */
- XSetForeground (DISPLAY, imageGC, fg);
-#endif /* WSM */
/* copy the bitmap to the pixmap */
#ifndef DISALLOW_DEEP_ICONS
* Shadowing
*/
-#ifdef WSM
if (mask && (pPS != NULL))
{
topGC = GetHighlightGC (pSD, pPS->ts, pPS->bg,
}
else
{
-#endif /* WSM */
topGC = GetHighlightGC (pSD, pCD->iconImageTopShadowColor,
pCD->iconImageBackground,
pCD->iconImageTopShadowPixmap);
botGC = GetHighlightGC (pSD, pCD->iconImageBottomShadowColor,
pCD->iconImageBackground,
pCD->iconImageBottomShadowPixmap);
-#ifdef WSM
}
-#endif /* WSM */
/*
* CR5208 - Better fix than from OSF!
#define BITMAP_CACHE_INC 5
-#ifdef WSM
int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError)
-#else /* WSM */
-int GetBitmapIndex (WmScreenData *pSD, char *name)
-#endif /* WSM */
{
char *path;
BitmapCache *bitmapc;
&bitmapc->bitmap, &x, &y)
!= BitmapSuccess)
{
-#ifdef WSM
if (bReportError)
-#endif /* WSM */
MWarning (((char *)GETMESSAGE(38, 7, "Unable to read bitmap file %s\n")), path);
XtFree ((char *)bitmapc->path);
return (-1);
if (bitmapc->width == 0 || bitmapc->height == 0)
{
-#ifdef WSM
if (bReportError)
-#endif /* WSM */
MWarning (((char *)GETMESSAGE(38, 8, "Invalid bitmap file %s\n")), path);
XtFree ((char *)bitmapc->path);
return (-1);
} /* END OF FUNCTION BitmapPathName */
-#ifdef WSM
/**************************** eof ***************************/
-#endif /* WSM */
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
extern char *BitmapPathName (char *string);
-#ifdef WSM
extern int GetBitmapIndex (WmScreenData *pSD,
char *name,
Boolean bReportError);
-#else /* WSM */
-extern int GetBitmapIndex (WmScreenData *pSD, char *name);
-#endif /* WSM */
extern Pixmap MakeCachedIconPixmap (ClientData *pCD, int bitmapIndex, Pixmap mask);
extern Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex);
extern Pixmap MakeClientIconPixmap (ClientData *pCD, Pixmap iconBitmap, Pixmap iconMask);
#include "WmGlobal.h"
#include "WmResNames.h"
-#ifdef WSM
#include "WmHelp.h"
-#endif /* WSM */
#include "WmICCC.h"
#define DTWM_NEED_FNTPL
#include "WmIBitmap.h"
#ifndef NO_HP_KEY_REMAP
#include <Xm/VirtKeysP.h>
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# include <Xm/DrawingA.h>
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
typedef struct
{
String new_name ;
} str_xref_rec, *str_xref ;
#endif /* NO_HP_KEY_REMAP */
-#ifdef WSM
#include <Dt/GetDispRes.h>
#include <Dt/SessionP.h>
#include <Dt/SessionM.h>
#include <Dt/Message.h>
#include <Dt/WsmM.h>
#include <Dt/EnvControlP.h>
-#endif /* WSM */
/* Busy is also defined in the BMS -> bms.h. This conflicts with
* /usr/include/X11/Xasync.h on ibm.
/*
* include extern functions
*/
-#ifdef WSM
#include "WmBackdrop.h"
-#endif /* WSM */
#include "WmCDInfo.h"
#include "WmColormap.h"
#include "WmError.h"
#include "WmFeedback.h"
#include "WmFunction.h"
#include "WmIDecor.h"
-#ifdef WSM
#include "WmIPC.h"
-#endif /* WSM */
#include "WmIPlace.h"
#include "WmIconBox.h"
#include "WmKeyFocus.h"
#include "WmPanelP.h" /* for typedef in WmManage.h */
#include "WmManage.h"
#include "WmMenu.h"
-#ifdef WSM
#include "WmPresence.h"
-#endif /* WSM */
#include "WmProperty.h"
#include "WmResCvt.h"
#include "WmResource.h"
#include "WmCDecor.h"
#include "stdio.h"
#include "WmResParse.h"
-#ifdef WSM
#include <stdlib.h>
-#endif /* WSM */
#include "WmXSMP.h"
/*
#include "WmInitWs.h"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# include "WmWsmLib/wsm_proto.h"
# include "WmWsmLib/utm_send.h"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
static void InsureDefaultBackdropDir(char **ppchBackdropDirs);
-#endif /* WSM */
void InitWmDisplayEnv (void);
#ifndef NO_MESSAGE_CATALOG
void InitNlsStrings (void);
Boolean VirtKeys4DIN(Display *dpy);
#endif /* NO_HP_KEY_REMAP */
-#ifdef WSM
/* limited to 3 chars max */
#define UNSPECIFIED_SCREEN_NAME "fbk"
char **dpy2Argv; /* copy for second display */
int dpy2Argc;
-#endif /* WSM */
/*
* Global Variables:
*/
int savedArgc;
wmGD.errorFlag = False;
-#ifdef WSM
wmGD.dtSD = NULL;
wmGD.iSlideUpsInProgress = 0;
-#endif /* WSM */
SetupWmSignalHandlers (0); /* dummy paramater */
#ifndef IBM_169380
wmGD.cmapWindowContextType = XUniqueContext ();
#endif
-#ifdef WSM
wmGD.mwmWindowContextType = XUniqueContext ();
-#endif /* WSM */
/* copy argv (the XtInititalize changes the original) for use in restart */
savedArgc = argc;
wmGD.environ = environ;
-#ifdef WSM
wmGD.pWmPB = _DtWmParseNewBuf();
-#endif /* WSM */
{
wmGD.mwmName = wmGD.argv[0];
}
-#ifdef WSM
if (MwmBehavior)
{
res_class = WM_RESOURCE_CLASS;
}
wmGD.statusColorServer = CSERVE_NOT_AVAILABLE;
-#else /* WSM */
- res_class = WM_RESOURCE_CLASS;
-#endif /* WSM */
-
wmGD.display = (Display *)NULL;
wmGD.topLevelW = (Widget)NULL;
*/
InitCursorInfo ();
-#ifdef WSM
InitWmDisplayEnv ();
-#endif
ShowWaitState (TRUE);
/*
XtSetArg (args[argnum], XtNheight, 10); argnum++;
XtSetArg (args[argnum], XtNmappedWhenManaged, False); argnum++;
XtSetArg (args[argnum], XtNjoinSession, True); argnum++;
-#ifdef WSM
XtSetArg (args[argnum], XtNrestartStyle, SmRestartNever); argnum++;
-#else
- XtSetArg (args[argnum], XtNrestartStyle, SmRestartIfRunning); argnum++;
-#endif
XtSetArg (args[argnum], XtNargc, savedArgc); argnum++;
XtSetArg (args[argnum], XtNargv, wmGD.argv); argnum++;
ProcessGlobalScreenResources ();
ProcessCommandLine (argc, argv);
-#ifdef WSM
/*
* Make sure backdrops are in our icon search path.
* This call MUST occur before ANY icons are looked up either
XtFree(sBdPath);
}
-#endif /* WSM */
/*
* Allocate data and initialize for screens we manage:
{
if (!processedGlobalResources)
{
-#ifdef WSM
enum {
XA_DT_SESSION_HINTS, XA_DT_SM_WM_PROTOCOL,
XA_DT_SM_START_ACK_WINDOWS, XA_DT_SM_STOP_ACK_WINDOWS,
wmGD.xa_DT_WM_EXIT_SESSION = atoms[XA_DT_WM_EXIT_SESSION];
wmGD.xa_DT_WM_LOCK_DISPLAY = atoms[XA_DT_WM_LOCK_DISPLAY];
wmGD.xa_DT_WM_READY = atoms[XA_DT_WM_READY];
-#endif /* WSM */
#ifndef NO_OL_COMPAT
InitOLCompat();
#endif /* NO_OL_COMPAT */
wmGD.pLockMaskSequence = NULL;
SetupLockingModifierMask ();
-#ifdef WSM
wmGD.requestContextWin = (Window) 0L;
wmGD.cppCommand = NULL;
wmGD.evLastButton.button = 0;
args,
argnum);
-#endif /* WSM */
/*
InitWmScreen (&(wmGD.Screens[scr]), sNum);
wmGD.Screens[scr].managed = True;
managed++;
-#ifdef WSM
GetDtSessionHints(&(wmGD.Screens[scr]), sNum);
-#endif /* WSM */
if (!activeSet)
{
ExitWM (WM_ERROR_EXIT_VALUE);
}
}
-#ifdef WSM
/*
* Initialize the IPC mechanism
*/
XtSetValues (wmGD.topLevelW, args, argnum);
XtSetValues (wmGD.topLevelW1, args, argnum);
-#endif /* WSM */
-
/*
* Prepare to have child processes (e.g., exec'ed commands).
ExitWM (WM_ERROR_EXIT_VALUE);
}
-#ifdef WSM
{
enum { XA_DT_WORKSPACE_HINTS, XA_DT_WORKSPACE_PRESENCE,
wmGD.xa_DT_WORKSPACE_CURRENT = atoms[XA_DT_WORKSPACE_CURRENT];
}
-#endif /* WSM */
/* Initialize properties used in session management. */
wmGD.xa_SM_CLIENT_ID =
if (pSD->managed)
{
-#ifdef WSM
if (XDefaultScreen (wmGD.display) == pSD->screen)
{
wmGD.commandWindow = wmGD.Screens[scr].wmWorkspaceWin;
}
-#endif /* WSM */
/*
* Initialize workspace colormap data.
*/
* convert DT 2.0 syntax to DT 3.0
*/
DeleteTempConfigFileIfAny();
-#ifdef WSM
/*
* Point second display's resource data base
* to the first display's resource data base
* NEW LOCATION
*/
wmGD.display1->db = wmGD.display->db;
-#endif /* WSM */
/*
* Realize the top level widget, make the window override
*/
XtRealizeWidget (wmGD.topLevelW);
-#ifdef WSM
XtRealizeWidget (wmGD.topLevelW1);
/*
* is required for ICCCM-style messaging).
*/
dtInitializeMessaging (wmGD.topLevelW);
-#endif /* WSM */
sAttributes.override_redirect = True;
XChangeWindowAttributes (DISPLAY, XtWindow (wmGD.topLevelW),
* Use the WM_SAVE_YOURSELF protocol
* for notification of when to save ourself
*/
-#ifdef WSM
SetMwmSaveSessionInfo(wmGD.commandWindow);
-#endif
/*
* Initialize window manager event handling:
*/
for (scr = 0; scr < wmGD.numScreens; scr++)
{
-#ifdef WSM
int iws;
-#endif /* WSM */
pSD = &(wmGD.Screens[scr]);
if (pSD->managed)
{
ACTIVE_PSD = &wmGD.Screens[scr];
-#ifdef WSM
MapIconBoxes (pSD->pActiveWS);
ChangeBackdrop (pSD->pActiveWS);
}
RestoreHelpDialogs(pSD);
-#else /* WSM */
- MapIconBoxes (pSD->pActiveWS);
-#endif /* WSM */
}
}
firstTime = 0;
InitKeyboardFocus ();
-#ifndef WSM
- InitWmDisplayEnv ();
-#endif
ShowWaitState (FALSE);
-#ifdef WSM
/*
* Tell the rest of DT that we're up
*/
dtReadyNotification();
-#endif /* WSM */
#ifdef DEBUG_RESOURCE_DATABASE
XrmPutFileDatabase(wmGD.display->db, "/tmp/dtwm.resDB");
Arg args[12];
int argnum;
-#ifdef WSM
int wsnum;
WmWorkspaceData *pwsI;
int buf_size;
int iwsx;
-#endif /* WSM */
char *pDisplayName;
#define LENCBUFFER 256
pSD->bitmapCacheCount = 0;
pSD->dataType = SCREEN_DATA_TYPE;
pSD->managed = False;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
pSD->cciTree = NULL;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
pSD->initialWorkspace=NULL;
pSD->presence.shellW = NULL;
pSD->presence.onScreen = False;
pSD->woS = (Window) 0L;
pSD->woE = (Window) 0L;
pSD->woW = (Window) 0L;
-#endif /* WSM */
pSD->wPanelist = NULL;
pSD->pECD = NULL;
pSD->numPushRecallClients = 0;
pSD->numEmbeddedClients = 0;
pSD->pPRCD = NULL;
pSD->iconBoxControl = False;
-#ifdef WSM
pSD->displayResolutionType = _DtGetDisplayResolution(DISPLAY, sNum);
/*
}
} /* if wmGD.screenNames[sNum] == UNSPECIFIED_SCREEN_NAME */
-#endif /* WSM */
/*
* Save screen context
*/
args,
argnum);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* Create a DrawingArea as a child of the popupShell. This will be used
* to handle UTM traffic relating to cci. We need this
* particular widget to get the callbacks from conversion requests made
/* Must realize to own WM_i if unmapped, causes mwm to
freeze when menu is displayed. */
XtPopup(pSD->screenTopLevelW, XtGrabNone);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
argnum = 0;
XtSetArg (args[argnum], XtNgeometry, NULL); argnum++;
XtSetArg (args[argnum], XtNx, 10000); argnum++;
args,
argnum);
XtRealizeWidget (pSD->screenTopLevelW1);
-#endif /* WSM */
+
/*
* Fetch screen based resources
*/
MakeXorGC (pSD);
InitIconSize(pSD);
-#ifdef WSM
/*
* Complete initialization of workspace structures
*/
/* make first workspace in list the active one to start with */
pSD->pActiveWS = pSD->pWS;
}
-#else /* WSM */
- /*
- * Allocate and initialize a workspace structure
- */
-
- if (!(pSD->pWS = (WmWorkspaceData *) XtMalloc (sizeof(WmWorkspaceData))))
- {
- ShowWaitState (FALSE);
- Warning (((char *)GETMESSAGE(40, 8, "Insufficient memory for Workspace data")));
- ExitWM (WM_ERROR_EXIT_VALUE);
- }
-
- /*
- * Set up workspace for this screen
- */
- InitWmWorkspace (pSD->pWS, pSD);
- pSD->pActiveWS = pSD->pWS;
-#endif /* WSM */
pDisplayName = DisplayString (DISPLAY);
Arg args[10];
int argnum;
-#ifndef WSM
-#define DEFAULT_WS_NAME "workspace"
-#endif /* not WSM */
pWS->pSD = pSD;
pWS->pIconBox = NULL;
pWS->dataType = WORKSPACE_DATA_TYPE;
-#ifdef WSM
pWS->backdrop.window = 0;
pWS->backdrop.nameAtom = 0;
pWS->backdrop.image = NULL;
pWS->sizeClientList = 0;
pWS->ppClients = 0;
pWS->buttonW = NULL;
-#else /* WSM */
-
- if ((pWS->name = (char *)
- XtMalloc ((1+strlen(DEFAULT_WS_NAME)) * sizeof (char))) == NULL)
- {
- ShowWaitState (FALSE);
- ExitWM (WM_ERROR_EXIT_VALUE);
- }
- strcpy (pWS->name, DEFAULT_WS_NAME);
-#endif /* WSM */
/*
* Create widget for workspace resource hierarchy
args,
argnum);
-#ifdef WSM
/* internalize the workspace name */
pWS->id = XInternAtom (DISPLAY, pWS->name, False);
-#endif /* WSM */
/*
* Process workspace based resources
} /* END OF FUNCTION InitWmWorkspace */
-#ifdef WSM
-\f
+
/******************************<->*************************************
*
* InsureDefaultBackdropDir(char **ppchBackdropDirs)
}
} /* END OF FUNCTION InsureDefaultBackdropDirs */
-#endif /* WSM */
\f
/*************************************<->*************************************
(long) ((wmGD.useStandardBehavior) ?
MWM_INFO_STARTUP_STANDARD : MWM_INFO_STARTUP_CUSTOM),
pSD->wmWorkspaceWin);
-#ifdef WSM
XSaveContext (DISPLAY, pSD->wmWorkspaceWin,
wmGD.mwmWindowContextType, (caddr_t)pSD);
-#endif /* WSM */
}
}
{
Warning (((char *)GETMESSAGE(40, 10, "Insufficient memory for window manager data")));
wmGD.argv = argv;
-#ifdef WSM
dpy2Argv = argv;
-#endif /* WSM */
}
else
{
wmGD.argv[i] = argv[i];
}
wmGD.argv[i] = NULL;
-#ifdef WSM
if ((dpy2Argv = (char **)XtMalloc((argc + 1) * sizeof(char *))) == NULL)
{
Warning (((char *)GETMESSAGE(40, 11, "Insufficient memory for window manager data")));
dpy2Argc = argc;
dpy2Argv[i] = NULL;
}
-#endif /* WSM */
}
} /* END OF FUNCTION CopyArgv */
ExitWM (WM_ERROR_EXIT_VALUE);
}
/* default name is left justified, 3-chars max, zero terminated */
-#ifdef WSM
sprintf((char *)wmGD.screenNames[num], UNSPECIFIED_SCREEN_NAME);
-#else /* WSM */
- sprintf((char *)wmGD.screenNames[num],"%d",num%1000);
-#endif /* WSM */
}
}
#ifndef NO_MESSAGE_CATALOG
{
char * tmpString;
-#ifdef WSM
/*
* Initialize messages
*/
wmGD.okLabel=XmStringCreateLocalized((String)_DtOkString);
wmGD.cancelLabel=XmStringCreateLocalized((String)_DtCancelString);
wmGD.helpLabel=XmStringCreateLocalized((String)_DtHelpString);
-#endif /* WSM */
/*
* catgets returns a pointer to an area that is over written
strcpy(wmNLS.default_icon_box_title, tmpString);
}
-#ifdef WSM
tmpString = ((char *)GETMESSAGE(40, 20, "%s: %s on line %d of configuration file %s\n"));
if ((pWarningStringFile =
(char *)XtMalloc ((unsigned int) (strlen(tmpString) + 1))) == NULL)
{
strcpy(wmNLS.defaultHelpTitle, tmpString);
}
-#endif /* WSM */
} /* InitNlsStrings */
#endif
else
{
strcpy(wmGD.displayString, buffer);
-#ifdef WSM
putenv(wmGD.displayString);
-#endif /* WSM */
}
} /* END OF FUNCTION InitWmDisplayEnv */
}
#endif /* NO_HP_KEY_REMAP */
-#ifdef WSM
/**************************** eof ***************************/
-#endif /* WSM */
#ifndef NO_MESSAGE_CATALOG
extern void InitNlsStrings( void ) ;
#endif
-#ifdef WSM
extern void InitWmDisplayEnv( void ) ;
-#endif /* WSM */
void ResetExplicitSelectHandling (ClientData *pCD)
{
-#ifdef WSM
Boolean bUnseen;
bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False;
if (bUnseen)
pCD->clientState &= ~UNSEEN_STATE;
-#endif /* WSM */
if ((pCD->clientState == NORMAL_STATE) ||
(pCD->clientState == MAXIMIZED_STATE))
{
/* !!! grab reset if client icon window? !!! */
}
-#ifdef WSM
if (bUnseen)
pCD->clientState |= UNSEEN_STATE;
-#endif /* WSM */
} /* END OF FUNCTION ResetExplicitSelectHandling */
void ClearFocusIndication (ClientData *pCD, Boolean refresh)
{
ClientData *saveCD;
-#ifdef WSM
Boolean bUnseen;
-#endif /* WSM */
/*
* Set the "focus" to NULL to insure correct display of the frame
saveCD = wmGD.keyboardFocus;
wmGD.keyboardFocus = NULL;
-#ifdef WSM
bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False;
if (bUnseen)
pCD->clientState &= ~UNSEEN_STATE;
-#endif /* WSM */
if ((pCD->clientState == NORMAL_STATE) ||
(pCD->clientState == MAXIMIZED_STATE))
ShowInactiveIcon (pCD, refresh);
}
-#ifdef WSM
if (bUnseen)
pCD->clientState |= UNSEEN_STATE;
-#endif /* WSM */
/* restore old keyboard focus */
wmGD.keyboardFocus = saveCD;
*/
if (((pNextEntry->type == NORMAL_STATE) &&
-#ifdef WSM
(!(pCD->clientState & UNSEEN_STATE)) &&
-#endif /* WSM */
(pCD->clientState != MINIMIZED_STATE)) ||
((pNextEntry->type == MINIMIZED_STATE) &&
(pCD->clientState == MINIMIZED_STATE)))
{
if ((pNextEntry->type != MINIMIZED_STATE) &&
(pCD->clientState != MINIMIZED_STATE) &&
-#ifdef WSM
(!(pCD->clientState & UNSEEN_STATE)) &&
-#endif /* WSM */
(pCD != pcdNoFocus))
{
if (pCD->transientChildren)
#ifndef NO_MULTIBYTE
#include <locale.h>
#endif
-#ifdef WSM
#include <Dt/Message.h>
#include <Dt/EnvControlP.h>
-#endif /* WSM */
/*
* include extern functions
*/
#include "WmEvent.h"
#include "WmInitWs.h"
#include "WmError.h"
-#ifdef WSM
#include "WmIPC.h"
#include "WmBackdrop.h"
-#endif /* WSM */
/*
* Function Declarations:
*/
-#ifdef WSM
int WmReturnIdentity (int argc, char *argv[], char *environ[]);
#define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \
(caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : \
(IsBackdropWindow (ACTIVE_PSD, (w))))
-#else /* WSM */
-#define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \
-(caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : False)
-#endif /* WSM */
WmScreenData *pSD;
#ifndef NO_MESSAGE_CATALOG
NlsStrings wmNLS;
#endif
-#ifdef WSM
int WmIdentity;
-#endif /* WSM */
\f
setlocale(LC_ALL, "");
#ifndef NO_MULTIBYTE
-#ifdef WSM
/*
* Set up environment variables for this HP DT client
*/
{
char * foo = ((char *)GETMESSAGE(44, 1, ""));
}
-#endif /* WSM */
XtSetLanguageProc (NULL, (XtLanguageProc)NULL, NULL);
#endif
-#ifdef WSM
/*
* Get Identity
*/
WmIdentity = WmReturnIdentity(argc, argv, environ);
-#endif /* WSM */
/*
* Initialize the workspace:
*/
InitWmGlobal (argc, argv, environ);
-#ifdef WSM
/*
* Set up PATH variable if it must run as standalone command
{
_DtEnvControl(DT_ENV_SET_BIN);
}
-#endif /* WSM */
/*
* MAIN EVENT HANDLING LOOP:
wmGD.attributesWindow = 0L;
-#ifdef WSM
if ((event.type == ButtonPress) ||
(event.type == ButtonRelease))
{
wmGD.bReplayedButton = False;
}
}
-#endif /* WSM */
dispatchEvent = True;
if (wmGD.menuActive)
{
} /* END OF FUNCTION main */
-#ifdef WSM
/******************************<->*************************************
*
* WmReturnIdentity (argc, argv, environ)
return(retVal);
} /* END OF FUNCTION WmReturnIdentity */
-#endif /* WSM */
-#ifdef WSM
+
/************************* eof ******************************/
-#endif /* WSM */
#include "WmWinInfo.h"
#include "WmWinList.h"
#include "WmWinState.h"
-#ifdef WSM
#include "WmPresence.h"
#include "WmWrkspace.h"
-#endif /* WSM */
#include "WmXSMP.h"
Window root;
Window parent;
Window *clients;
-#ifdef WSM
int nAncillaries, iAnc;
Window *pAncillaryWindows, *pWin1;
WmWorkspaceData *pWS0;
-#endif /* WSM */
unsigned int nclients;
ClientData *pcd = NULL;
PropWMState *wmStateProp;
int i,j;
long manageFlags;
-#ifdef WSM
/*
* Generate list of ancillary windows (not to be managed)
*/
*pWin1++ = XtWindow (pSD->screenTopLevelW);
*pWin1 = pSD->activeIconTextWin;
-#endif /* WSM */
/*
* Look for mapped top-level windows and start managing them:
for (i = 0; i < nclients; i++)
{
/* determine if the client window should be managed by wm */
-#ifdef WSM
if (InWindowList (clients[i], pAncillaryWindows, nAncillaries))
{
/* don't manage ancillary window manager windows */
continue;
}
-#else /* WSM */
- if ((clients[i] == XtWindow (pSD->screenTopLevelW)) ||
- (clients[i] == XtWindow (pSD->pActiveWS->workspaceTopLevelW)) ||
- (clients[i] == pSD->activeIconTextWin))
- {
- /* don't manage ancillary window manager windows */
- continue;
- }
-#endif /* WSM */
if (!XFindContext (DISPLAY, clients[i], wmGD.windowContextType,
(caddr_t *)&pcd))
{
}
}
-#ifdef WSM
if (pAncillaryWindows)
{
XtFree ((char *) pAncillaryWindows);
}
-#endif /* WSM */
} /* END OF FUNCTION AdoptInitialClients */
int initialState;
int i;
Boolean sendConfigNotify;
-#ifdef WSM
WmWorkspaceData *pwsi;
-#endif /* WSM */
WmFpEmbeddedClientData *pECD;
/*
* ...then we've embedded it in the front
* panel--no further processing required.
*/
-#ifdef WSM
if (smAckState == SM_START_ACK)
{
SendClientMsg( wmGD.dtSmWindow,
(long) wmGD.xa_DT_WM_WINDOW_ACK,
CurrentTime, NULL, 0);
}
-#endif /* WSM */
return;
}
}
}
#endif
-#ifdef WSM
if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL)
{
/*
F_AddToAllWorkspaces(0, pCD, 0);
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
}
-#endif /* WSM */
if (manageFlags & MANAGEW_WM_RESTART)
{
if (manageFlags & MANAGEW_WM_RESTART_ICON)
* window.
*/
-#ifdef WSM
if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
(pCD->transientLeader == NULL))
{
}
}
}
-#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:
XSaveContext (DISPLAY, pCD->clientTitleWin, wmGD.windowContextType,
(caddr_t)pCD);
}
-#ifndef WSM
- if (pCD->iconFrameWin)
- {
- XSaveContext (DISPLAY, pCD->iconFrameWin, wmGD.windowContextType,
- (caddr_t)pCD);
- }
-#endif /* WSM */
if (pCD->clientCmapCount > 0)
{
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.
*/
{
SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs,
pCD->clientFrameWin, GrabModeSync, F_CONTEXT_ALL);
-#ifdef WSM
for (i = 0; i < pCD->numInhabited; i++)
{
if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin)
F_CONTEXT_ALL);
}
}
-#else /* WSM */
- if (!pCD->pIconBox && pCD->iconFrameWin)
- {
- SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs,
- pCD->iconFrameWin, GrabModeSync, F_CONTEXT_ALL);
- }
-#endif /* WSM */
}
-#ifdef WSM
for (i = 0; i < pCD->numInhabited; i++)
{
if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin)
-#else /* WSM */
- if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
{
static int iconKeySpec = 1;
static int iconAccelSpec = 1;
if ((iconKeySpec != 0) && KEY_SPECS(pCD))
{
-#ifdef WSM
iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD),
pCD->pWsList[i].iconFrameWin,
GrabModeSync, F_CONTEXT_ICON);
-#else /* WSM */
- iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD), pCD->iconFrameWin,
- GrabModeSync, F_CONTEXT_ICON);
-#endif /* WSM */
}
if ((iconAccelSpec != 0) && ACCELERATOR_MENU_COUNT(pCD))
iconAccelSpec = 0;
for (n= 0; n < pSD->acceleratorMenuCount; n++)
{
-#ifdef WSM
iconAccelSpec += SetupKeyBindings (
ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs,
pCD->pWsList[i].iconFrameWin, GrabModeSync,
F_CONTEXT_ICON);
-#else /* WSM */
- iconAccelSpec += SetupKeyBindings (
- ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs,
- pCD->iconFrameWin, GrabModeSync,
- F_CONTEXT_ICON);
-#endif /* WSM */
}
}
}
-#ifdef WSM
}
-#endif /* WSM */
/*
DoExplicitSelectGrab (pCD->clientBaseWin);
}
-#ifdef WSM
UpdateWorkspacePresenceProperty(pCD);
-#endif /* WSM */
/*
*/
initialState = pCD->clientState;
-#ifdef WSM
if (!ClientInWorkspace (pSD->pActiveWS, pCD))
{
initialState |= UNSEEN_STATE;
}
-#endif /* WSM */
pCD->clientState = WITHDRAWN_STATE;
pCD->clientFlags &= ~WM_INITIALIZATION;
-#ifdef WSM
/*
* Add to stacking list using the client's zero'th workspace
* instead of the current one because it may not be in
*/
AddClientToList (GetWorkspaceData (pSD, pCD->pWsList[0].wsID),
pCD, True /*on top*/);
-#else /* WSM */
- AddClientToList (pSD->pActiveWS, pCD, True /*on top*/);
-#endif /* WSM */
SetClientState (pCD, initialState, GetTimestamp());
/*
!(manageFlags &
(MANAGEW_WM_STARTUP | MANAGEW_WM_RESTART | MANAGEW_WM_CLIENTS)) &&
(pCD->clientState != MINIMIZED_STATE) &&
-#ifdef WSM
!(pCD->clientState & UNSEEN_STATE) &&
-#endif /* WSM */
(pCD->inputFocusModel ||
(pCD->protocolFlags & PROTOCOL_WM_TAKE_FOCUS)))))
{
Do_Focus_Key ((ClientData *)NULL, GetTimestamp() , ALWAYS_SET_FOCUS);
}
-#ifdef WSM
if (smAckState == SM_START_ACK)
{
SendClientMsg( wmGD.dtSmWindow, (long) wmGD.xa_DT_SM_WM_PROTOCOL,
*/
DiscardInitialPropertyList (pCD);
-#endif /* WSM */
CheckPushRecallClient (pCD);
} /* END OF FUNCTION ManageWindow */
* - make sure the input focus no longer is associted with the window
* - free the icon placement (if necessary)
*/
-#ifdef WSM
SetClientWsIndex (pCD);
-#endif /* WSM */
if (!(pCD->clientFlags & WM_INITIALIZATION))
{
ResetWithdrawnFocii (pCD);
if (pCD->clientState & MINIMIZED_STATE)
{
-#ifdef WSM
if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD))))
{
WmWorkspaceData *pWsTmp;
}
}
}
-#else /* WSM */
- if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD))))
- {
- if (ICON_PLACE(pCD) != NO_ICON_PLACE)
- {
- pCD->pSD->pActiveWS->IPData.placeList[ICON_PLACE(pCD)].pCD
- = NULL;
- }
- }
-#endif /* WSM */
if (ICON_FRAME_WIN(pCD))
{
XUnmapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
XFlush (DISPLAY);
}
}
-#ifdef WSM
/*
* Clean up the workspace presence dialog if it's
* connected to this client.
}
pCD->pSD->presence.pCDforClient = NULL;
}
-#endif /* WSM */
/*
* Check to see if the window is being unmanaged because the window
if ((pCD->clientFlags & CLIENT_REPARENTED) &&
!(pCD->clientFlags & CLIENT_DESTROYED))
{
-#ifdef WSM
SetWMState (pCD->client, WithdrawnSTATE,
pCD->pWsList[0].iconFrameWin);
-#else /* WSM */
- SetWMState (pCD->client, WithdrawnSTATE, ICON_FRAME_WIN(pCD));
-#endif /* WSM */
if (pCD->maxConfig)
{
if (pCD->iconWindow && (pCD->clientFlags & ICON_REPARENTED))
{
XUnmapWindow (DISPLAY, pCD->iconWindow);
-#ifdef WSM
XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD),
pCD->pWsList[0].iconX, pCD->pWsList[0].iconY);
-#else /* WSM */
- XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD),
- ICON_X(pCD), ICON_Y(pCD));
-#endif /* WSM */
}
}
XFreePixmap (DISPLAY, pCD->iconPixmap);
}
-#ifdef WSM
if ((pCD->numInhabited > 0) && ICON_FRAME_WIN(pCD))
-#else /* WSM */
- if (ICON_FRAME_WIN(pCD))
-#endif /* WSM */
{
FreeIcon (pCD);
}
*/
DeleteClientContext (pCD);
-
-#ifdef WSM
/*
* Count backward for efficiency --
* removes from end of list.
GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID),
pCD);
}
-#endif /* WSM */
/*
* Free up window manager resources:
#endif
}
-#ifdef WSM
/*
* Insure list of initial properties has been freed.
*/
{
XtFree ((char *)pCD->pWorkspaceHints);
}
-#endif /* WSM */
if (pCD->smClientID)
XFree (pCD->smClientID);
}
if (ICON_FRAME_WIN(pCD))
{
-#ifdef WSM
int k;
for (k=0; k < pCD->numInhabited; k++)
XDeleteContext (DISPLAY, pCD->pWsList[k].iconFrameWin,
wmGD.windowContextType);
}
-#else /* WSM */
- XDeleteContext (DISPLAY, pCD->iconFrameWin,
- wmGD.windowContextType);
-#endif /* WSM */
}
pCD->clientFlags &= ~CLIENT_CONTEXT_SAVED;
}
void FreeIcon (ClientData *pCD)
{
-#ifdef WSM
WmWorkspaceData *pWsTmp;
int i;
-#endif /* WSM */
if (pCD->piconTopShadows) {
FreeRList (pCD->piconTopShadows);
* destroy frame window & all children
*/
-#ifdef WSM
if ((pCD->pSD->useIconBox) && pCD->pWsList[0].pIconBox)
{
/*
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 */
void WithdrawDialog (Widget dialogboxW)
{
-#ifdef WSM
int i;
-#endif /* WSM */
ClientData *pCD = NULL;
/*
XtUnmanageChild (dialogboxW);
DeleteClientFromList (ACTIVE_WS, pCD);
-#ifdef WSM
/* TakeClientOutOfWorkspace (ACTIVE_WS, pCD); */
/*
GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID),
pCD);
}
-#endif /* WSM */
+
ResetWithdrawnFocii (pCD);
XUnmapWindow (DISPLAY, pCD->clientFrameWin);
* The order is important here:
*/
-#ifdef WSM
/*
* Put system modal windows in all workspaces to
* avoid the race condition of the window coming up
pCD->dtwmFunctions |= DtWM_FUNCTION_OCCUPY_WS;
F_AddToAllWorkspaces(0, pCD, 0);
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
-#endif /* WSM */
if (pSD->clientList)
{
pECD->pCD = pCD;
pCD->pECD = (void *) pECD;
-#ifdef WSM
SetClientWsIndex(pCD);
-#endif
SetClientWMState (pCD, NormalState, NORMAL_STATE);
/*
#include "WmCEvent.h"
#include "WmResource.h"
#include "WmResParse.h"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# include "WmDebug.h"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
#include <stdio.h>
#include <X11/Shell.h>
#include "WmIconBox.h"
#include "WmImage.h"
#include "WmError.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
static void UnmapCallback (Widget w, XtPointer client_data,
XtPointer call_data);
static MenuItem *DuplicateMenuItems (MenuItem *menuItems);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
static MenuExclusion *DuplicateMenuExclusions(MenuExclusion *exclusions);
static Boolean FindClientCommandMatch (MenuSpec *menuSpec,
String clientCommand,
static MenuSpec *MakeMenuSpec (String menuName, CARD32 commandID);
static void UnmapPulldownCallback (Widget w, XtPointer client_data,
XtPointer call_data);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
*
*************************************<->***********************************/
MenuSpec *MakeMenu (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, Context initialContext,
Context accelContext, MenuItem *moreMenuItems,
Boolean fSystemMenu)
if (moreMenuItems != NULL)
{
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
if ((newMenuSpec = DuplicateMenuSpec(menuSpec)) == (MenuSpec *)NULL)
return NULL;
#else
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* MakeMenuSpec (menuName, commandID)
newMenuItem->wmFunction = curMenuItem->wmFunction;
if ((curMenuItem->wmFunction == F_Send_Msg)
-#ifdef WSM
|| (curMenuItem->wmFunction == F_Set_Context)
/*
* NOTE: For now, in dtwm this function is used only
* the WmActionArg. 11/20/96
*/
|| (curMenuItem->wmFunction == F_Action)
-#endif /* WSM */
)
newMenuItem->wmFuncArgs = curMenuItem->wmFuncArgs;
else if (curMenuItem->wmFuncArgs != (String) NULL)
newMenuItem->greyedContext = curMenuItem->greyedContext;
newMenuItem->mgtMask = curMenuItem->mgtMask;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
newMenuItem->clientCommandName =
XtNewString(curMenuItem->clientCommandName);
newMenuItem->clientCommandID = curMenuItem->clientCommandID;
}
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* DuplicateMenuExclusions (exclusions)
newMenuSpec->menuButtonCount = 0;
newMenuSpec->accelContext = menuSpec->accelContext;
newMenuSpec->accelKeySpecs = (KeySpec *) NULL;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
newMenuSpec->exclusions = DuplicateMenuExclusions(menuSpec->exclusions);
newMenuSpec->clientLocal = TRUE;
newMenuSpec->commandID = menuSpec->commandID;
}
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* MakeMenuItem (label, wmFunction, funcArgs, mnemonic, accelText)
modifier, context, newname);
}
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
*
XtSetSensitive (menuButton->buttonWidget, FALSE);
}
}
-#ifdef WSM
+
if (menuItem->wmFunction == F_Remove)
{
/*
fSupported = (pCD && (pCD->numInhabited > 1));
XtSetSensitive (menuButton->buttonWidget, fSupported);
}
-#endif /* WSM */
if ((menuItem->mgtMask) && pCD)
/* PushButton might not apply */
{
-#ifdef WSM
if ((pCD->clientFunctions & menuItem->mgtMask & MWM_MGT_MASK) ||
(pCD->dtwmFunctions & menuItem->mgtMask & DTWM_MGT_MASK))
-#else /* WSM */
- if (pCD->clientFunctions & menuItem->mgtMask)
-#endif /* WSM */
/* function applies -- manage it */
{
if (!menuButton->managed)
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* AdjustTearOffControl (cascade, closure, cbackdata)
/* Well, nothing failed so let's create it. */
return(TRUE);
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
*
} StrList;
Widget CreateMenuWidget (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, Widget parent,
Boolean fTopLevelPane, MenuSpec *topMenuSpec,
MenuItem *moreMenuItems)
KeySpec *accelKeySpec;
Dimension menuHeight;
Boolean fUseTitleSep = False;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
Boolean labelIsClientCommand = False;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
StrList *stringsToFree = NULL, *sPtr;
XmString tmpstr;
#ifndef IBM_151913
{
i = 0;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
labelIsClientCommand = IsClientCommand(menuItem->label);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
if (menuItem->wmFunction == F_Separator)
/*
* An immediately following title will not have a top separator.
*/
{
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* If it is a client command, then we only want to create the
* separator under particular circumstances. Specifically, we
* want to make sure that:
}
}
else
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
{
children[n] =
XmCreateSeparatorGadget (menuW, SEPARATOR_NAME,
} /* F_Separator */
else
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
if (!labelIsClientCommand)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/*
* We will use one of:
*
i++;
children[n] = XmCreateCascadeButtonGadget (menuW,
CASCADE_BTN_NAME, (ArgList) args, i);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
XtAddCallback(children[n], XmNcascadingCallback,
(XtCallbackProc)AdjustTearOffControl,
(XtPointer)subMenuW);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
}
else
/*
* Increment the children array count if we actually
* created a new child.
*/
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
if (!labelIsClientCommand)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
n++;
/*
XButtonPressedEvent event;
Window saveWindow;
Display *saveDisplay;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
Boolean menuAdjusted;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
if ((menuSpec == NULL) || (menuSpec->menuWidget == NULL))
{
* change, we may need to remeasure things. (CR 9316)
*/
-#ifdef WSM
if(pCD && pCD->clientFlags & ICON_BOX)
{
newContext |= F_CONTEXT_ICONBOX;
}
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
menuAdjusted =
AdjustTearOffControl(NULL, (XtPointer) (menuSpec->menuWidget), NULL);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
if (AdjustPBs (menuSpec, pCD, newContext)
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
|| menuAdjusted
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
)
{
i = 0;
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* UnmapPulldownCallback (w, client_data, call_data)
{
wmGD.menuActive = (MenuSpec *) NULL;
} /* END OF FUNCTION UnmapPulldownCallback */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
/*
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
MakeMenu(pSD, pCD, mName, iC, aC, moreItems, sysMenu)
# define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu)
# define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
CreateMenuWidget(pSD, mName, parent, fTLP, tSpec, moreItems)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
extern void ActivateCallback (Widget w, caddr_t client_data,
caddr_t call_data);
extern Widget CreateMenuWidget (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
String menuName, Widget parent,
Boolean fTopLevelPane, MenuSpec *topMenuSpec,
MenuItem *moreMenuItems);
extern void FreeCustomMenuSpec (MenuSpec *menuSpec);
extern void MWarning (char *format, char *message);
extern MenuSpec *MakeMenu (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
String menuName,
Context initialContext, Context accelContext,
MenuItem *moreMenuItems, Boolean fSystemMenu);
extern void TraversalOn (MenuSpec *menuSpec);
extern void UnpostMenu (MenuSpec *menuSpec);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree,
Atom selection, Context active_context,
Boolean in_line);
String newname);
extern void DestroyMenuSpecWidgets (MenuSpec *menuspec);
extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec);
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED
} /* END OF FUNCTION UpdatePresenceWorkspaces */
-/* DO NOT ADD ANYTHING AFTER THIS ENDIF */
-#endif /* WSM */
/**************************** eof ***************************/
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY
* ALL RIGHTS RESERVED
extern void UpdatePresenceWorkspaces( WmScreenData *pSD );
/******** End Public Function Declarations ********/
-#endif /* WSM */
#include "WmGlobal.h"
#include "WmICCC.h"
#include <stdio.h>
-#ifdef WSM
#include <Dt/WsmP.h>
#include <X11/Xatom.h>
#include <Xm/AtomMgr.h>
-#endif /* WSM */
/*
* include extern functions
* ICCC_CURRENT version: nitems = PROP_SIZE_HINTS_ELEMENTS
*/
-#ifdef WSM
if ((!HasProperty (pCD, XA_WM_NORMAL_HINTS)) ||
((Success != XGetWindowProperty (DISPLAY, pCD->client,
XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS,
(actualType != XA_WM_SIZE_HINTS) ||
(nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) ||
(actualFormat != 32)))
-#else /* WSM */
- if ((Success != XGetWindowProperty (DISPLAY, pCD->client,
- XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS,
- False, XA_WM_SIZE_HINTS, &actualType, &actualFormat,
- &nitems, &leftover, (unsigned char **)&property)) ||
- (actualType != XA_WM_SIZE_HINTS) ||
- (nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) ||
- (actualFormat != 32))
-#endif /* WSM */
{
/*
* Indicate no property values were retrieved:
*/
#ifndef ICCC_COMPLIANT
-#ifdef WSM
if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS))
rValue = -1;
else
-#endif /* WSM */
rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_WM_PROTOCOLS, 0L,
(long)MAX_CLIENT_PROTOCOL_COUNT, False, AnyPropertyType,
&actualType, &actualFormat, &nitems, &leftover,
if ((rValue != Success) || (actualType == None) || (actualFormat != 32))
#else
-#ifdef WSM
if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS))
rValue = -1;
else
-#endif /* WSM */
rValue = XGetWMProtocols (DISPLAY, pCD->client,
(Atom **)&property, &nitems);
* Read the _MWM_MESSAGES property.
*/
-#ifdef WSM
if (!HasProperty (pCD, wmGD.xa_MWM_MESSAGES))
rValue = ~Success;
else
-#endif /* WSM */
rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_MESSAGES, 0L,
(long)MAX_MWM_MESSAGES_COUNT, False, AnyPropertyType,
&actualType, &actualFormat, &nitems, &leftover,
} /* END OF FUNCTION SetMwmInfo */
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* SetMwmSaveSessionInfo (wmWindow)
SetWMState(wmWindow, NORMAL_STATE, 0);
} /* END OF FUNCTION SetMwmSaveSessionInfo */
-#endif /* WSM */
+
\f
/*************************************<->*************************************
unsigned long leftover;
-#ifdef WSM
if (!HasProperty(pCD, wmGD.xa_MWM_HINTS))
ret_val = ~Success;
else
-#endif /* WSM */
ret_val = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_HINTS,
0L, PROP_MWM_HINTS_ELEMENTS,
False, wmGD.xa_MWM_HINTS,
} /* END OF FUNCTION GetMwmMenuItems */
-#ifdef WSM
\f
/*************************************<->*************************************
return (bFound);
} /* END OF FUNCTION HasProperty */
-#endif /* WSM */
+
extern void ProcessWmProtocols (ClientData *pCD);
extern void ProcessMwmMessages (ClientData *pCD);
extern void SetMwmInfo (Window propWindow, long flags, Window wmWindow);
-#ifdef WSM
void SetMwmSaveSessionInfo (Window wmWindow);
-#endif /* WSM */
extern void GetDtWmRequest (WmScreenData *pSD, char **pszReq, Boolean *pmore);
extern void GetDtSessionHints (WmScreenData *pSD, int sNum);
extern Colormap FindColormap (ClientData *pCD, Window window);
extern MenuItem * GetMwmMenuItems (ClientData *pCD);
extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients);
-#ifdef WSM
extern void GetInitialPropertyList (ClientData *pCD);
extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll);
#ifdef HP_VUE
extern void SetWorkspaceInfoProperty (WmWorkspaceData *pWS);
extern void DeleteWorkspaceInfoProperty (WmWorkspaceData *pWS);
extern char *WorkspacePropertyName (WmWorkspaceData *pWS);
-#endif /* WSM */
+
#endif /* NO_WMQUERY */
#include "WmPanelP.h"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# include "WmCmd.h"
# include "WmDebug.h"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/*
* Function Declarations:
static void wmq_bump_xids(void);
#endif /* NO_WMQUERY */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
static void OwnWMSelections (Time timestamp);
static Boolean WMiConvert (Widget, Atom, Atom,
XtPointer, unsigned long, int, Atom *,
XtPointer *, unsigned long *, int *);
static void WMiConvertCB (Widget, XtPointer, XtPointer);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/*
* Global Variables:
void SetupWmICCC (void)
{
enum {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
XA_TARGETS, XA_MULTIPLE, XA_TIMESTAMP,
#endif
XA_WM_STATE, XA_WM_PROTOCOLS, XA_WM_CHANGE_STATE,
XA_WM_SAVE_YOURSELF, XA_WM_DELETE_WINDOW,
XA_WM_COLORMAP_WINDOWS, XA_WM_TAKE_FOCUS, XA_MWM_HINTS,
XA_MWM_MENU, XA_MWM_MESSAGES, XA_MOTIF_WM_OFFSET,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
+#if (defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
XA_MOTIF_WM_CLIENT_WINDOW, XA_MOTIF_WM_POINTER_WINDOW,
XA_MOTIF_WM_ALL_CLIENTS,
#endif
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
XA_MOTIF_WM_DEFINE_COMMAND, XA_MOTIF_WM_INCLUDE_COMMAND,
XA_MOTIF_WM_REMOVE_COMMAND, XA_MOTIF_WM_ENABLE_COMMAND,
XA_MOTIF_WM_DISABLE_COMMAND, XA_MOTIF_WM_RENAME_COMMAND,
XA_COMPOUND_TEXT, NUM_ATOMS };
static char *atom_names[] = {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
_XA_TARGETS, _XA_MULTIPLE, _XA_TIMESTAMP,
#endif
_XA_WM_STATE, _XA_WM_PROTOCOLS, _XA_WM_CHANGE_STATE,
_XA_WM_SAVE_YOURSELF, _XA_WM_DELETE_WINDOW,
_XA_WM_COLORMAP_WINDOWS, _XA_WM_TAKE_FOCUS, _XA_MWM_HINTS,
_XA_MWM_MENU, _XA_MWM_MESSAGES, _XA_MOTIF_WM_OFFSET,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
+#if (defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
# ifdef _XA_MOTIF_WM_CLIENT_WINDOW
_XA_MOTIF_WM_CLIENT_WINDOW, _XA_MOTIF_WM_POINTER_WINDOW,
_XA_MOTIF_WM_ALL_CLIENTS,
"_MOTIF_WM_ALL_CLIENTS"
# endif
#endif
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
_XA_MOTIF_WM_DEFINE_COMMAND, _XA_MOTIF_WM_INCLUDE_COMMAND,
_XA_MOTIF_WM_REMOVE_COMMAND, _XA_MOTIF_WM_ENABLE_COMMAND,
_XA_MOTIF_WM_DISABLE_COMMAND, _XA_MOTIF_WM_RENAME_COMMAND,
XInternAtoms(DISPLAY, atom_names, XtNumber(atom_names), False, atoms);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
wmGD.xa_TARGETS = atoms[XA_TARGETS];
wmGD.xa_MULTIPLE = atoms[XA_MULTIPLE];
wmGD.xa_TIMESTAMP = atoms[XA_TIMESTAMP];
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
wmGD.xa_WM_STATE = atoms[XA_WM_STATE];
wmGD.xa_WM_PROTOCOLS = atoms[XA_WM_PROTOCOLS];
wmGD.xa_MWM_MESSAGES = atoms[XA_MWM_MESSAGES];
wmGD.xa_MWM_OFFSET = atoms[XA_MOTIF_WM_OFFSET];
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* wm query targets */
wmGD._MOTIF_WM_CLIENT_WINDOW = atoms[XA_MOTIF_WM_CLIENT_WINDOW];
wmGD._MOTIF_WM_POINTER_WINDOW = atoms[XA_MOTIF_WM_POINTER_WINDOW];
wmGD._MOTIF_WM_WINDOW_FLAGS = atoms[XA_MOTIF_WM_WINDOW_FLAGS];
wmGD._MOTIF_WM_AUTOMATION = atoms[XA_MOTIF_WM_AUTOMATION];
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*
* Assert ownership of the WINDOW_MANAGER selection
* on each screen that the window manager controls.
* these use the format WM_Si.
*/
OwnWMSelections(GetTimestamp());
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
wmGD.xa_COMPOUND_TEXT = atoms[XA_COMPOUND_TEXT];
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* static void OwnWMSelections ()
&(cnv->type), &(cnv->value), &(cnv->length), &(cnv->format));
}
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
void AddWmResourceConverters (void)
{
-#ifdef WSM
XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRAbsentMapBehavior,
(XtConverter)WmCvtStringToAMBehavior, NULL, 0);
-#endif /* WSM */
XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRCFocusPolicy,
(XtConverter)WmCvtStringToCFocus, NULL, 0);
XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRClientDecor,
} /* END OF FUNCTION AddWmResourceConverters */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* WmCvtStringToAMBehavior (args, numArgs, fromVal, toVal)
} /* END OF FUNCTION WmCvtStringToAMBehavior */
-#endif /* WSM */
\f
/*************************************<->*************************************
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
extern void AddWmResourceConverters (void);
-#ifdef WSM
extern void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs,
XrmValue *fromVal, XrmValue *toVal);
-#endif /* WSM */
extern void WmCvtStringToCFocus (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
extern void WmCvtStringToCDecor (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
extern void WmCvtStringToCFunc (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
/* mwm specific appearance and behavior resources: */
-#ifdef WSM
#define WmNall "all"
-#endif /* WSM */
#define WmNautoKeyFocus "autoKeyFocus"
#define WmNautoRaiseDelay "autoRaiseDelay"
-#ifdef WSM
#define WmNbackdropDirectories "backdropDirectories"
-#endif /* WSM */
#define WmNbitmapDirectory "bitmapDirectory"
#define WmNblinkOnExec "blinkOnExec"
#define WmNbuttonBindings "buttonBindings"
#define WmNclientAutoPlace "clientAutoPlace"
#define WmNcolormapFocusPolicy "colormapFocusPolicy"
#define WmNconfigFile "configFile"
-#ifdef WSM
#define WmNcppCommand "cppCommand"
-#endif /* WSM */
#define WmNdeiconifyKeyFocus "deiconifyKeyFocus"
#define WmNdoubleClickTime "doubleClickTime"
#define WmNenableWarp "enableWarp"
#define WmNfadeNormalIcon "fadeNormalIcon"
#define WmNfeedbackGeometry "feedbackGeometry"
#define WmNframeBorderWidth "frameBorderWidth"
-#ifdef WSM
#define WmNframeExternalShadowWidth "frameExternalShadowWidth"
-#endif /* WSM */
#define WmNfreezeOnConfig "freezeOnConfig"
-#ifdef WSM
#define WmNgeometry "geometry"
-#endif /* WSM */
#define WmNiconAutoPlace "iconAutoPlace"
#define WmNiconBoxGeometry "iconBoxGeometry"
#define WmNiconBoxLayout "iconBoxLayout"
#define WmNiconBoxTitle "iconBoxTitle"
#define WmNiconClick "iconClick"
#define WmNiconDecoration "iconDecoration"
-#ifdef WSM
#define WmNiconExternalShadowWidth "iconExternalShadowWidth"
-#endif /* WSM */
#define WmNiconImageMaximum "iconImageMaximum"
#define WmNiconImageMinimum "iconImageMinimum"
#define WmNiconPlacement "iconPlacement"
#define WmNiconPlacementMargin "iconPlacementMargin"
-#ifdef WSM
#define WmNimage "image"
#define WmNimageBackground "imageBackground"
#define WmNimageForeground "imageForeground"
-#endif /* WSM */
#define WmNinteractivePlacement "interactivePlacement"
#define WmNkeyBindings "keyBindings"
#define WmNkeyboardFocusPolicy "keyboardFocusPolicy"
#define WmNlimitResize "limitResize"
#define WmNlowerOnIconify "lowerOnIconify"
-#ifdef WSM
#define WmNmarqueeSelectGranularity "marqueeSelectGranularity"
-#endif /* WSM */
#define WmNmaximumMaximumSize "maximumMaximumSize"
#define WmNmoveThreshold "moveThreshold"
#define WmNmultiScreen "multiScreen"
#define WmNpositionOnScreen "positionOnScreen"
#define WmNquitTimeout "quitTimeout"
#define WmNraiseKeyFocus "raiseKeyFocus"
-#ifdef WSM
#define WmNrefreshByClearing "refreshByClearing"
-#endif
#define WmNresizeBorderWidth "resizeBorderWidth"
#define WmNresizeCursors "resizeCursors"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define WmNrootMenu "rootMenu"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
+#endif /* defined(MWM_QATS_PROTOCOL) */
#define WmNrootButtonClick "rootButtonClick"
#define WmNsecondariesOnTop "secondariesOnTop"
#define WmNsessionVersion "sessionVersion"
-#endif /* WSM */
-#ifndef WSM
-#define WmNsessionClientDB "sessionClientDB"
-#endif /* ! WSM */
#define WmNshowFeedback "showFeedback"
-#ifdef WSM
#define WmNshowNames "showNames"
-#endif /* WSM */
#define WmNstartupKeyFocus "startupKeyFocus"
#define WmNsubpanelDecoration "subpanelDecoration"
#define WmNsubpanelResources "subpanelResources"
#define WmNtransientFunctions "transientFunctions"
#define WmNuseFrontPanel "useFrontPanel"
#define WmNuseIconBox "useIconBox"
-#ifdef WSM
#define WmNuseWindowOutline "useWindowOutline"
-#endif /* WSM */
#define WmNdtLite "useDtLite"
#define WmNmoveOpaque "moveOpaque"
#define WmNframeStyle "frameStyle"
/* mwm - client specific resources: */
-#ifdef WSM
#define WmNabsentMapBehavior "absentMapBehavior"
-#endif /* WSM */
#define WmNclientDecoration "clientDecoration"
#define WmNclientFunctions "clientFunctions"
#define WmNfocusAutoRaise "focusAutoRaise"
-#ifdef WSM
#define WmNhelpResources "helpResources"
-#endif /* WSM */
#define WmNiconImage "iconImage"
#define WmNiconImageBackground "iconImageBackground"
#define WmNiconImageBottomShadowColor "iconImageBottomShadowColor"
#define WmNiconImageTopShadowColor "iconImageTopShadowColor"
#define WmNiconImageTopShadowPixmap "iconImageTopShadowPixmap"
#define WmNignoreWMSaveHints "ignoreWMSaveHints"
-#ifdef WSM
#define WmNinitialWorkspace "initialWorkspace"
-#endif /* WSM */
#define WmNmatteBackground "matteBackground"
#define WmNmatteBottomShadowColor "matteBottomShadowColor"
#define WmNmatteBottomShadowPixmap "matteBottomShadowPixmap"
#define WmNsystemMenu "windowMenu"
#define WmNuseClientIcon "useClientIcon"
#define WmNusePPosition "usePPosition"
-#ifdef WSM
#define WmNworkspaceList "workspaceList"
#define WmNworkspaceCount "workspaceCount"
-#endif /* WSM */
/* window manager part resource names: */
#define WmNmenu "menu"
#define WmNtitle "title"
#define WmNdefaults "defaults"
-#ifdef WSM
#define WmNbackdrop "backdrop"
#define WmNcolorSetId "colorSetId"
#define WmNfrontPanel "frontPanel"
#define WmNworkspaceController "workspaceController"
#define WmNworkspacePresence "workspacePresence"
#define WmNworkspaceSwitch "workspaceSwitch"
-#endif /* WSM */
/* window manager client resource names: */
#define WmNiconBox "iconbox"
#define WmNconfirmbox "confirmbox"
-#ifdef WSM
#define WmNswitcher "switcher"
-#endif /* WSM */
\f
#define WmCAutoKeyFocus "AutoKeyFocus"
#define WmCAutoRaiseDelay "AutoRaiseDelay"
-#ifdef WSM
#define WmCBackdropDirectories "BackdropDirectories"
-#endif /* WSM */
#define WmCBitmapDirectory "BitmapDirectory"
#define WmCBlinkOnExec "BlinkOnExec"
#define WmCButtonBindings "ButtonBindings"
#define WmCClientAutoPlace "ClientAutoPlace"
#define WmCColormapFocusPolicy "ColormapFocusPolicy"
#define WmCConfigFile "ConfigFile"
-#ifdef WSM
#define WmCCppCommand "CppCommand"
-#endif /* WSM */
#define WmCDeiconifyKeyFocus "DeiconifyKeyFocus"
#define WmCDoubleClickTime "DoubleClickTime"
#define WmCEnableWarp "EnableWarp"
#define WmCFadeNormalIcon "FadeNormalIcon"
#define WmCFeedbackGeometry "FeedbackGeometry"
#define WmCFrameBorderWidth "FrameBorderWidth"
-#ifdef WSM
#define WmCFrameExternalShadowWidth "FrameExternalShadowWidth"
-#endif /* WSM */
#define WmCFreezeOnConfig "FreezeOnConfig"
-#ifdef WSM
#define WmCGeometry "Geometry"
-#endif /* WSM */
#define WmCIconAutoPlace "IconAutoPlace"
#define WmCIconBoxGeometry "IconBoxGeometry"
#define WmCIconBoxLayout "IconBoxLayout"
#define WmCIconBoxTitle "IconBoxTitle"
#define WmCIconClick "IconClick"
#define WmCIconDecoration "IconDecoration"
-#ifdef WSM
#define WmCIconExternalShadowWidth "IconExternalShadowWidth"
-#endif /* WSM */
#define WmCIconImageMaximum "IconImageMaximum"
#define WmCIconImageMinimum "IconImageMinimum"
#define WmCIconPlacement "IconPlacement"
#define WmCIconPlacementMargin "IconPlacementMargin"
-#ifdef WSM
#define WmCImage "Image"
#define WmCImageBackground "ImageBackground"
#define WmCImageForeground "ImageForeground"
-#endif /* WSM */
#define WmCInteractivePlacement "InteractivePlacement"
#define WmCKeyBindings "KeyBindings"
#define WmCKeyboardFocusPolicy "KeyboardFocusPolicy"
#define WmCLimitResize "LimitResize"
#define WmCLowerOnIconify "LowerOnIconify"
-#ifdef WSM
#define WmCMarqueeSelectGranularity "MarqueeSelectGranularity"
-#endif /* WSM */
#define WmCMaximumMaximumSize "MaximumMaximumSize"
#define WmCMoveThreshold "MoveThreshold"
#define WmCMultiScreen "MultiScreen"
#define WmCPositionOnScreen "PositionOnScreen"
#define WmCQuitTimeout "QuitTimeout"
#define WmCRaiseKeyFocus "RaiseKeyFocus"
-#ifdef WSM
#define WmCRefreshByClearing "RefreshByClearing"
-#endif
#define WmCResizeBorderWidth "ResizeBorderWidth"
#define WmCResizeCursors "ResizeCursors"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define WmCRootMenu "RootMenu"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
+#endif /* defined(MWM_QATS_PROTOCOL) */
#define WmCRootButtonClick "RootButtonClick"
#define WmCSecondariesOnTop "SecondariesOnTop"
#define WmCSessionVersion "SessionVersion"
-#endif /* WSM */
-#ifndef WSM
-#define WmCSessionClientDB "SessionClientDB"
-#endif /* ! WSM */
#define WmCScreenList "ScreenList"
#define WmCScreens "Screens"
#define WmCShowFeedback "ShowFeedback"
-#ifdef WSM
#define WmCShowNames "ShowNames"
-#endif /* WSM */
#define WmCStartupKeyFocus "StartupKeyFocus"
#define WmCSubpanelDecoration "SubpanelDecoration"
#define WmCSubpanelResources "SubpanelResources"
#define WmCTransientFunctions "TransientFunctions"
#define WmCUseFrontPanel "UseFrontPanel"
#define WmCUseIconBox "UseIconBox"
-#ifdef WSM
#define WmCUseWindowOutline "UseWindowOutline"
-#endif /* WSM */
#define WmCDtLite "UseDtLite"
#define WmCMoveOpaque "MoveOpaque"
#define WmCFrameStyle "FrameStyle"
-#ifdef WSM
#define WmCWorkspaceList "WorkspaceList"
#define WmCWorkspaceCount "WorkspaceCount"
-#endif /* WSM */
/* component appearance resources: */
/* mwm - client specific resources: */
-#ifdef WSM
#define WmCAbsentMapBehavior "AbsentMapBehavior"
-#endif /* WSM */
#define WmCClientDecoration "ClientDecoration"
#define WmCClientFunctions "ClientFunctions"
#define WmCFocusAutoRaise "FocusAutoRaise"
-#ifdef WSM
#define WmCHelpResources "HelpResources"
-#endif /* WSM */
#define WmCIconImage "IconImage"
#define WmCIconImageBackground "IconImageBackground"
#define WmCIconImageBottomShadowColor "IconImageBottomShadowColor"
#define WmCIconImageTopShadowColor "IconImageTopShadowColor"
#define WmCIconImageTopShadowPixmap "IconImageTopShadowPixmap"
#define WmCIgnoreWMSaveHints "IgnoreWMSaveHints"
-#ifdef WSM
#define WmCInitialWorkspace "InitialWorkspace"
-#endif /* WSM */
#define WmCMatteBackground "MatteBackground"
#define WmCMatteBottomShadowColor "MatteBottomShadowColor"
#define WmCMatteBottomShadowPixmap "MatteBottomShadowPixmap"
#define WmCMenu "Menu"
#define WmCTitle "Title"
#define WmCDefaults "Defaults"
-#ifdef WSM
#define WmCBackdrop "Backdrop"
#define WmCColorSetId "ColorSetId"
#define WmCFrontPanel "FrontPanel"
#define WmCWorkspaceController "WorkspaceController"
#define WmCWorkspacePresence "WorkspacePresence"
#define WmCWorkspaceSwitch "WorkspaceSwitch"
-#endif /* WSM */
/* window manager client resource names: */
#define WmCIconBox "Iconbox"
#define WmCConfirmbox "Confirmbox"
-#ifdef WSM
#define WmCSwitcher "Switcher"
-#endif /* WSM */
\f
*
*************************************<->***********************************/
-#ifdef WSM
#define WmRAbsentMapBehavior "WmAMBehavior"
-#endif /* WSM */
#define WmRCFocusPolicy "WmCFocus"
#define WmRClientDecor "WmCDecor"
#define WmRClientFunction "WmCFunc"
#define WmCHelpDirectory "HelpDirectory"
-#ifdef WSM
/************************** eof ************************/
-#endif /* WSM */
+
#include "WmGlobal.h"
#include "WmResNames.h"
-#ifdef WSM
#include <Dt/UserMsg.h>
#include <Dt/Connect.h>
#include <Tt/tt_c.h>
-#endif /* WSM */
#include "WmParse.h"
#include "WmParseP.h"
#include "WmPanelP.h"
#else
#include <Xm/XmP.h> /* for XmeGetHomeDirName */
#endif
-#ifdef WSM
#include <signal.h>
-#endif /* WSM */
/* maximum string lengths */
#define MBBSIZ 4096
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD, mSpec)
#else
# define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/*
* include extern functions
*/
#include "WmResParse.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
#include "WmError.h"
#include "WmFunction.h"
#include "WmImage.h"
* Global Variables And Tables:
*/
static char cfileName[MAXWMPATH+1];
-#ifdef WSM
#ifndef NO_MESSAGE_CATALOG
char * pWarningStringFile;
char * pWarningStringLine;
#define parseP (wmGD.pWmPB->pchNext)
#define line (wmGD.pWmPB->pchLine)
#define linec (wmGD.pWmPB->lineNumber)
-#else /* WSM */
-static FILE *cfileP = NULL; /* fopen'ed configuration file or NULL */
-static unsigned char line[MAXLINE+1]; /* line buffer */
-static int linec = 0; /* line counter for parser */
-static unsigned char *parseP = NULL; /* pointer to parse string */
-#endif /* WSM */
typedef struct {
Boolean fClick;
} EventTableEntry;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
# define CCI_USE_DEFAULT_NAME_TAG "DEFAULT_NAME"
CCIEntryModifier mod;
String cciEntry;
} CCIFuncArg;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
#ifdef MOTIF_ONE_DOT_ONE
void GetHomeDirName(String fileName);
#endif
-#ifdef WSM
static String GetNetworkFileName (char *pchFile);
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
static MenuItem *MakeSeparatorTemplate (int);
static void ParseMenuItemName (unsigned char **linePP, MenuItem *menuItem);
static Boolean ParseClientCommand (unsigned char **linePP, MenuSpec *menuSpec,
static Boolean GetCCIModifier (String modString, CCIEntryModifier *mod);
static Boolean ParseWmFuncCCIArgs (unsigned char **linePP,
WmFunction wmFunction, String *pArgs);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
FILE *FopenConfigFile (void);
void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec);
static void ParseMenuSet (WmScreenData *pSD, unsigned char *lineP);
MenuItem *ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr);
static MenuItem *ParseMenuItems (WmScreenData *pSD
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
, MenuSpec *menuSpec
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
);
static Boolean ParseWmLabel (WmScreenData *pSD, MenuItem *menuItem,
unsigned char *string);
*/
FunctionTableEntry functionTable[] = {
-#ifdef WSM
{"f.action", 0,
CRS_ANY,
0,
F_Action,
ParseWmFuncActionArg},
-#endif /* WSM */
{"f.beep", 0,
CRS_ANY,
0,
F_Beep,
ParseWmFuncNoArg},
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
{"f.cci", 0,
CRS_ANY,
0,
F_Nop,
ParseWmFuncCCIArgs},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
{"f.circle_down", F_SUBCONTEXT_IB_IICON|F_SUBCONTEXT_IB_WICON,
CRS_ANY,
0,
0,
F_Circle_Up,
ParseWmFuncGrpArg},
-#ifdef WSM
{"f.create_workspace", 0,
CRS_ANY,
0,
0,
F_DeleteWorkspace,
ParseWmFuncNoArg},
-#endif /* WSM */
{"f.exec", 0,
CRS_ANY,
0,
0,
F_Focus_Key,
ParseWmFuncNoArg},
-#ifdef WSM
{"f.goto_workspace", 0,
CRS_ANY,
0,
F_Goto_Workspace,
ParseWmFuncStrArg},
-#endif /* WSM */
-#ifdef WSM
{"f.help", 0,
CRS_ANY,
0,
0,
F_Help_Mode,
ParseWmFuncNoArg}, /* for now */
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
{"f.invoke_command",
0, CRS_ANY,
0,
F_InvokeCommand,
ParseWmFuncStrArg},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
{"f.kill", F_CONTEXT_ROOT,
CRS_ANY,
MWM_FUNC_CLOSE,
0,
F_Lower,
ParseWmFuncMaybeStrArg},
-#ifdef WSM
{"f.marquee_selection",
F_CONTEXT_WINDOW|F_CONTEXT_ICON|F_SUBCONTEXT_IB_IICON,
CRS_ANY,
0,
F_Marquee_Selection,
ParseWmFuncNoArg},
-#endif /* WSM */
{"f.maximize", F_CONTEXT_ROOT|F_CONTEXT_MAXIMIZE|
F_SUBCONTEXT_IB_WICON,
CRS_ANY,
0,
F_Next_Key,
ParseWmFuncGrpArg},
-#ifdef WSM
{"f.next_workspace", 0,
CRS_ANY,
0,
F_Next_Workspace,
ParseWmFuncNoArg},
-#endif /* WSM */
{"f.nop", F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW|
F_SUBCONTEXT_IB_WICON | F_SUBCONTEXT_IB_IICON,
CRS_ANY,
0,
F_Normalize_And_Raise,
ParseWmFuncMaybeStrArg},
-#ifdef WSM
{"f.occupy_all", F_CONTEXT_ICONBOX|F_CONTEXT_ROOT,
CRS_ANY,
DtWM_FUNC_OCCUPY_WS,
F_AddToAllWorkspaces,
ParseWmFuncNoArg},
-#endif /* WSM */
{"f.pack_icons", 0,
CRS_ANY,
0,
0,
F_Pass_Key,
ParseWmFuncNoArg},
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
{"f.post_rmenu", 0,
CRS_KEY,
0,
F_Post_RMenu,
ParseWmFuncNoArg},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
{"f.post_wmenu", 0,
CRS_BUTTON|CRS_KEY,
0,
0,
F_Prev_Key,
ParseWmFuncGrpArg},
-#ifdef WSM
{"f.prev_workspace", 0,
CRS_ANY,
0,
F_Prev_Workspace,
ParseWmFuncNoArg},
-#endif /* WSM */
{"f.quit_mwm", F_CONTEXT_ICON|F_CONTEXT_WINDOW,
CRS_ANY,
0,
0,
F_Refresh_Win,
ParseWmFuncNoArg},
-#ifdef WSM
{"f.remove", F_CONTEXT_ROOT,
CRS_ANY,
DtWM_FUNC_OCCUPY_WS,
F_Remove,
ParseWmFuncNoArg},
-#endif /* WSM */
{"f.resize", F_CONTEXT_ICON|F_CONTEXT_ROOT|
F_SUBCONTEXT_IB_IICON|F_SUBCONTEXT_IB_WICON,
CRS_ANY,
MWM_FUNC_RESIZE,
F_Resize,
ParseWmFuncNoArg},
-#ifdef WSM
{"f.restart", F_CONTEXT_ICON|F_CONTEXT_WINDOW,
CRS_ANY,
0,
F_Restart,
ParseWmFuncStrArg},
-#else /* WSM */
- {"f.restart", F_CONTEXT_ICON|F_CONTEXT_WINDOW,
- CRS_ANY,
- 0,
- F_Restart,
- ParseWmFuncNoArg},
-#endif /* WSM */
{"f.restore", F_CONTEXT_ROOT|F_CONTEXT_NORMAL|F_SUBCONTEXT_IB_WICON,
CRS_ANY,
0,
0,
F_Set_Behavior,
ParseWmFuncNoArg},
-#ifdef WSM
{"f.set_context", 0,
CRS_ANY,
0,
F_Set_Context,
ParseWmFuncNbrArg},
-#endif /* WSM */
{"f.title", 0,
CRS_MENU,
0,
0,
F_Version,
ParseWmFuncNoArg},
-#ifdef WSM
#ifdef OLD
{"f.workspace_presence",F_CONTEXT_ICON|F_CONTEXT_ROOT|F_CONTEXT_ICONBOX|
DtWM_FUNC_OCCUPY_WS,
F_Workspace_Presence,
ParseWmFuncNoArg},
-#endif /* WSM */
-#if defined(DEBUG) && defined(WSM)
+#if defined(DEBUG)
{"f.zz_debug", 0,
CRS_ANY,
0,
/*
* Be sure to update these define, whenever adding/deleting a function.
*/
-#ifdef WSM
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define F_CCI_INDEX 2
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#if (defined(MWM_QATS_PROTOCOL))
+# define F_CCI_INDEX 2
+#endif /* defined(MWM_QATS_PROTOCOL) */
int F_ACTION_INDEX;
int F_EXEC_INDEX;
int F_NOP_INDEX;
-#else /* WSM */
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define F_CCI_INDEX 1
-# define F_EXEC_INDEX 4
-# define F_NOP_INDEX 16
-# else
-# define F_EXEC_INDEX 3
-# define F_NOP_INDEX 14
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#endif /* WSM */
-#ifdef WSM
-\f
+
/******************************<->*************************************
*
* void GetFunctionTableValues (int *execIndex, int *nopIndex,
return(0);
}
} /* END OF FUNCTION PeekAhead */
-
-
-#endif /* WSM */
+
\f
pSD->keySpecs = NULL;
pSD->menuSpecs = NULL;
-#ifdef WSM
/**** hhhhhhhhhhhh ******/
GetFunctionTableValues (&F_EXEC_INDEX, &F_NOP_INDEX, &F_ACTION_INDEX);
-#endif /* WSM */
/*
* Find and parse the default system menu string, if it exists.
*/
return lang;
}
-#ifdef WSM
#define RC_CONFIG_SUBDIR "/config/"
#define RC_DEFAULT_CONFIG_SUBDIR "/config/C"
-#endif /* WSM */
-\f
+
/*************************************<->*************************************
*
* FopenConfigFile ()
strcpy (cfileName, homeDir);
#endif
-#ifdef WSM
if (MwmBehavior)
{
/*
}
strncat(cfileName, LANG_DT_WMRC, MAXWMPATH - strlen(cfileName));
}
-#else /* WSM */
- if (LANG != NULL)
- {
- strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
- strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
- }
- strncat(cfileName, HOME_MWMRC, MAXWMPATH - strlen(cfileName));
-#endif /* WSM */
if ((fileP = fopen (cfileName, "r")) != NULL)
{
if (LANG != NULL) {
#else
strcpy (cfileName, homeDir);
#endif
-#ifdef WSM
if (MwmBehavior)
{
/*
*/
strncat(cfileName, HOME_DT_WMRC, MAXWMPATH - strlen(cfileName));
}
-#else /* WSM */
- strncat(cfileName, HOME_MWMRC, MAXWMPATH - strlen(cfileName));
-#endif /* WSM */
if ((fileP = fopen (cfileName, "r")) != NULL)
{
if (LANG != NULL) {
#endif
if (LANG != NULL)
{
-#ifdef WSM
if (MwmBehavior)
{
strcpy(cfileName, LIBDIR);
strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
strncat(cfileName, SLASH_DT_WMRC, MAXWMPATH - strlen(cfileName));
}
-#else /* WSM */
- /*
- * Try /$LANG/system.mwmrc within the install tree
- */
- strcpy(cfileName, LIBDIR);
- strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
- strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
- strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-#endif /* WSM */
if ((fileP = fopen (cfileName, "r")) != NULL)
{
XtFree(LANG);
if ((fileP == NULL) && !stackPushed)
{
-#ifdef WSM
if (MwmBehavior)
{
strcpy(cfileName, LIBDIR);
strncat(cfileName, SLASH_DT_WMRC, MAXWMPATH - strlen(cfileName));
fileP = fopen (cfileName, "r");
}
-#else /* WSM */
- /*
- * Try /system.mwmrc within the install tree
- */
- strcpy(cfileName, LIBDIR);
- strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-
- if (LANG != NULL)
- {
- XtFree(LANG);
- LANG = NULL;
- }
- strcpy(cfileName, cfileName);
- fileP = fopen (cfileName, "r");
-#endif /* WSM */
}
}
menuSpec->menuItems = NULL;
menuSpec->accelContext = 0;
menuSpec->accelKeySpecs = NULL;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
menuSpec->exclusions = NULL;
menuSpec->clientLocal = FALSE;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
menuSpec->nextMenuSpec = NULL;
/*
*************************************<->***********************************/
static MenuItem *ParseMenuItems (WmScreenData *pSD
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
, MenuSpec *menuSpec
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
)
{
unsigned char *string;
MenuItem *lastMenuItem;
MenuItem *menuItem;
register int ix;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
Boolean use_separators = False;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/*
* Parse "label [mnemonic] [accelerator] function" or
menuItem->nextMenuItem = NULL;
menuItem->wmFunction = (WmFunction)NULL;
menuItem->wmFuncArgs = NULL;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
menuItem->clientCommandName = NULL;
menuItem->clientCommandID = 0;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*
* Is this a simple menu item label or is it a
* client command specification.
else menuItem->wmFunction = F_InvokeCommand;
}
else /* It must be a menu item label */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
{
/*
* Parse the menu item label.
* but we do want to search for a menu item name that occupies
* the same place as the function does for normal menu items.
*/
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
if (menuItem->wmFunction != NULL)
ParseMenuItemName(&lineP, menuItem);
else
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
ix = ParseWmFunction (&lineP, CRS_MENU, &menuItem->wmFunction);
/*
continue; /* skip this menu item */
}
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*
* If we're working on the f.cci function, this will fix-up
* the menuItem entries so that it appears that we read-in
else firstMenuItem = separator;
lastMenuItem = separator;
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
/*
* Add this item to the menu specification.
}
lastMenuItem = menuItem;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* If this menu item is supposed to be wrapped in separators
* then create a separator template after the menu item
*/
}
use_separators = FALSE;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
}
return (firstMenuItem);
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* StoreExclusion (menuSpec, string)
return(return_val);
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
*/
{
string++; /* skip "@" */
-#ifdef WSM
if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD,
(char *)string, True)) >= 0)
-#else /* WSM */
- if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD,
- (char *)string)) >= 0)
-#endif /* WSM */
{
menuItem->labelType = XmPIXMAP;
}
if ((*lineP != '\0') && /* something follows */
(*lineP != '!') && /* skip if we have the ! WmFunction */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/* skip label name for client command */
((*lineP != '"') || (menuItem->wmFunction != F_InvokeCommand)) &&
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
(*lineP != 'f') &&
(*(lineP+1) != '.')) /* skip if we have f.xxx WmFunction */
{
} /* END OF FUNCTION ParseWmAccelerator */
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* ParseMenuItemName (linePP, menuItem)
*linePP = lineP;
}
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
} /* END OF FUNCTION ParseWmFuncNbrArg */
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* ParseWmFuncCCIArgs (linePP, wmFunction, pArgs)
return(TRUE);
} /* END OF FUNCTION ParseWmFuncCCIArgs */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
*context |= F_CONTEXT_WINDOW;
*subContext |= F_SUBCONTEXT_W_APP;
}
-#ifdef WSM
else if (!strcmp ("ifkey", (char *)ctxStr))
{
*context |= F_CONTEXT_IFKEY;
}
-#endif /* WSM */
else
/* Unknown context name */
{
KeySpec *lastKeySpec;
unsigned int eventType;
int ix;
-#ifdef WSM
Boolean bBadKey;
-#endif /* WSM */
/*
* Parse the key set bindings from the configuration file.
/*
* Parse the key specification.
*/
-#ifdef WSM
bBadKey = False;
-#endif /* WSM */
if (!ParseKeyEvent(&lineP,
&eventType,
&keySpec->keycode,
&keySpec->state))
{
-#ifdef WSM
bBadKey = True;
-#else /* WSM */
- PWarning (((char *)GETMESSAGE(60, 27, "Invalid key specification")));
- XtFree ((char *)keySpec);
- continue; /* skip this key specification */
-#endif /* WSM */
}
/*
if (!ParseContext(&lineP, &keySpec->context,
&keySpec->subContext))
{
-#ifdef WSM
if (bBadKey)
PWarning (((char *)GETMESSAGE(60, 27, "Invalid key specification")));
-#endif /* WSM */
PWarning (((char *)GETMESSAGE(60, 28, "Invalid key context")));
XtFree ((char *)keySpec);
continue; /* skip this key specification */
}
-#ifdef WSM
if (bBadKey)
{
/*
* rest of the program doesn't see it.
*/
keySpec->context &= ~F_CONTEXT_IFKEY;
-#endif /* WSM */
/*
} /* END OF FUNCTION ParseKeySet */
-#ifndef WSM
-\f
-/*************************************<->*************************************
- *
- * GetNextLine ()
- *
- *
- * Description:
- * -----------
- * Returns the next line from an fopened configuration file or a newline-
- * embedded configuration string.
- *
- *
- * Inputs:
- * ------
- * cfileP = (global) file pointer to fopened configuration file or NULL
- * line = (global) line buffer
- * linec = (global) line count
- * parseP = (global) parse string pointer if cfileP == NULL
- *
- *
- * Outputs:
- * -------
- * line = (global) next line
- * linec = (global) line count incremented
- * parseP = (global) parse string pointer incremented
- * Return = line or NULL if file or string is exhausted.
- *
- *
- * Comments:
- * --------
- * If there are more than MAXLINE characters on a line in the file cfileP the
- * excess are truncated.
- * Assumes the line buffer is long enough for any parse string line.
- *
- *************************************<->***********************************/
-
-unsigned char *
-GetNextLine (void)
-{
- register unsigned char *string;
- int len;
-
-#ifndef NO_MULTIBYTE
- int chlen;
- wchar_t last;
- wchar_t wdelim;
- char delim;
- int lastlen;
-#endif
-
- if (cfileP != NULL)
- /* read fopened file */
- {
- if ((string = (unsigned char *)
- fgets ((char *)line, MAXLINE, cfileP)) != NULL)
- {
-#ifndef NO_MULTIBYTE
-
- lastlen = 0;
- while (*string &&
- ((len = mblen((char *)string, MB_CUR_MAX)) > 0))
- {
- mbtowc(&last, (char *)string, MB_CUR_MAX);
- lastlen = len;
- string += len;
- }
- delim = '\\';
- mbtowc(&wdelim, &delim, MB_CUR_MAX);
- if (lastlen == 1 && last == wdelim)
- {
- do
- {
- if (!fgets((char *)string, MAXLINE - (string - line), cfileP))
- break;
-
- lastlen = 0;
- while (*string &&
- ((len = mblen((char *)string, MB_CUR_MAX)) > 0))
- {
- mbtowc(&last, (char *)string, MB_CUR_MAX);
- lastlen = len;
- string += len;
- }
- linec++;
- }
- while (lastlen == 1 && last == wdelim);
- }
- string = line;
-#else
- len = strlen((char *)string) - 2;
- if ((len > 0) && string[len] == '\\')
- {
- do {
- string = &string[len];
- if (fgets((char *)string,
- MAXLINE - (string-line), cfileP) == NULL)
- break;
- len = strlen((char *)string) - 2;
- linec++;
- } while ((len >= 0) && string[len] == '\\');
- string = line;
- }
-#endif
- }
- }
- else if ((parseP != NULL) && (*parseP != '\0'))
- /* read parse string */
- {
- string = line;
-#ifndef NO_MULTIBYTE
- while ((*parseP != '\0') &&
- ((chlen = mblen ((char *)parseP, MB_CUR_MAX)) > 0) &&
- (*parseP != '\n'))
- /* copy all but NULL and newlines to line buffer */
- {
- while (chlen--)
- {
- *(string++) = *(parseP++);
- }
- }
-#else
- while ((*parseP != '\0') && (*parseP != '\n'))
- /* copy all but end-of-line and newlines to line buffer */
- {
- *(string++) = *(parseP++);
- }
-#endif
- *string = '\0';
- if (*parseP == '\n')
- {
- parseP++;
- }
- }
- else
- {
- string = NULL;
- }
-
- linec++;
- return (string);
-
-} /* END OF FUNCTION GetNextLine */
-#endif /* WSM */
-
/*************************************<->*************************************
*
} /* END OF FUNCTION LookupModifier */
\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* GetCCIModifier (modString, mod)
break;
}
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
} /* END OF FUNCTION ScanAlphanumeric */
-#ifndef WSM
-\f
-/*************************************<->*************************************
- *
- * ScanWhitespace(linePP)
- *
- *
- * Description:
- * -----------
- * Scan the string, skipping over all white space characters.
- *
- *
- * Inputs:
- * ------
- * linePP = nonNULL pointer to current line buffer pointer
- *
- *
- * Outputs:
- * -------
- * linePP = nonNULL pointer to revised line buffer pointer
- *
- *
- * Comments:
- * --------
- * Assumes linePP is nonNULL
- *
- *************************************<->***********************************/
-
-void ScanWhitespace(unsigned char **linePP)
-{
-#ifndef NO_MULTIBYTE
- while (*linePP && (mblen ((char *)*linePP, MB_CUR_MAX) == 1) && isspace (**linePP))
-#else
- while (*linePP && isspace (**linePP))
-#endif
- {
- (*linePP)++;
- }
-
-} /* END OF FUNCTION ScanWhitespace */
-#endif /* not WSM */
-
-#ifndef WSM
-\f
-/*************************************<->*************************************
- *
- * ToLower (string)
- *
- *
- * Description:
- * -----------
- * Lower all characters in a string.
- *
- *
- * Inputs:
- * ------
- * string = NULL-terminated character string or NULL
- *
- *
- * Outputs:
- * -------
- * string = NULL-terminated lower case character string or NULL
- *
- *
- * Comments:
- * --------
- * None.
- *
- *************************************<->***********************************/
-
-void ToLower (char *string)
-{
- char *pch = string;
-#ifndef NO_MULTIBYTE
- int chlen;
-
- while (*pch && ((chlen = mblen (pch, MB_CUR_MAX)) > 0))
- {
- if ((chlen == 1) && (isupper (*pch)))
- {
- *pch = tolower(*pch);
- }
- pch += chlen;
- }
-#else
- while (*pch != '\0')
- {
- if (isupper (*pch))
- {
- *pch = tolower(*pch);
- }
- pch++;
- }
-#endif
-} /* END OF FUNCTION ToLower */
-#endif /* WSM */
\f
/*************************************<->*************************************
PWarning (char *message)
{
-#ifdef WSM
char pch[MAXWMPATH+1];
String sMessage;
char *pchFile;
}
_DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL);
XtFree (sMessage);
-#else /* WSM */
- if (cfileP != NULL)
- {
- fprintf (stderr, ((char *)GETMESSAGE(60, 33, "%s: %s on line %d of configuration file %s\n")),
- wmGD.mwmName, message, linec,
- wmGD.configFile ? wmGD.configFile : cfileName);
- }
- else
- {
- fprintf (stderr, ((char *)GETMESSAGE(60, 34, "%s: %s on line %d of specification string\n")),
- wmGD.mwmName, message, linec);
- }
- fflush (stderr);
-#endif /* WSM */
} /* END OF FUNCTION PWarning */
-#ifdef WSM
/*
* Key substitution table entry
*/
*pNumKeySubs = numKS;
}
-#endif /* WSM */
-\f
+
/*************************************<->*************************************
*
* ProcessAccelText (startP, endP, destP)
#ifndef NO_MULTIBYTE
int chlen;
#endif
-#ifdef WSM
static Boolean bAccelInit = False;
static KeySub *pKeySub;
static int numKeySubs;
InitKeySubs (&pKeySub, &numKeySubs);
bAccelInit = True;
}
-#endif /* WSM */
/*
* Copy modifiers
{
*destP++ = *startP++;
}
-#ifdef WSM
pchFirst = startP;
-#endif /* WSM */
#ifndef NO_MULTIBYTE
while (*startP &&
{
while (chlen--)
{
-#ifdef WSM
startP++;
-
-#else /* WSM */
- *destP++ = *startP++;
-#endif /* WSM */
}
}
#else
while (isalnum (*startP))
{
-#ifdef WSM
startP++;
-#else /* WSM */
- *destP++ = *startP++;
-#endif /* WSM */
}
#endif
-#ifdef WSM
/* find substitution */
pchSub = NULL;
lenSub = 0;
memcpy (destP, pchFirst, startP-pchFirst);
destP += startP-pchFirst;
}
-#endif /* WSM */
*destP++ = '+';
ScanWhitespace (&startP);
} /* END OF FUNCTION ParseWmFuncActionArg */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* PreprocessConfigFile (pSD)
return (sReturn);
}
/**************************** eof ***************************/
-#endif /* WSM */
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* SetGreyedContextAndMgtMask (menuItem, wmFunction)
return(item);
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
extern void ProcessWmFile (WmScreenData *pSD, Boolean bNested);
extern void ProcessCommandLine (int argc, char *argv[]);
extern void ProcessMotifBindings (void);
-#ifdef WSM
extern Boolean FindDtSessionMatch(int commandArgc,
char **commandArgv,
ClientData *pCD,
extern void GetNopIndex (int tableSize, int *nopIndex);
extern void GetExecIndex (int tableSize, int *execIndex);
extern Boolean GetSessionHintsInfo (WmScreenData *pSD, long numItems);
-#endif /* WSM */
extern FILE * FopenConfigFile (void);
extern void FreeMenuItem (MenuItem *menuItem);
-#ifndef WSM
-extern unsigned char * GetNextLine (void);
-#endif /* not WSM */
-#ifdef WSM
extern unsigned char * GetStringC (unsigned char **linePP, Boolean SmBehavior);
extern void SystemCmd (char *pchCmd);
-#else /* WSM */
-extern unsigned char * GetString (unsigned char **linePP);
-#endif /* WSM */
extern Boolean ParseBtnEvent (unsigned char **linePP,
unsigned int *eventType,
unsigned int *button,
extern Boolean ParseKeyEvent (unsigned char **linePP, unsigned int *eventType,
KeyCode *keyCode, unsigned int *state);
extern MenuItem * ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr);
-#ifdef WSM
extern void ParseSessionClientState (WmScreenData *pSD, int count,
unsigned char *string);
extern void ParseSessionCommand (WmScreenData *pSD, int count,
extern void ParseSessionHost (WmScreenData *pSD, int count,
unsigned char *string);
extern void ParseDtSessionHints (WmScreenData *pSD, unsigned char *property);
-#endif /* WSM */
extern int ParseWmFunction (unsigned char **linePP, unsigned int res_spec, WmFunction *pWmFunction);
extern void PWarning (char *message);
extern void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec);
extern void ScanAlphanumeric (unsigned char **linePP);
-#ifndef WSM
-extern void ScanWhitespace(unsigned char **linePP);
-#endif /* not WSM */
extern void ToLower (unsigned char *string);
extern void SyncModifierStrings(void);
extern void DeleteTempConfigFileIfAny (void);
WmFunction wmFunction, String *pArgs);
extern Boolean ParseWmFuncActionArg (unsigned char **linePP,
WmFunction wmFunction, String *pArgs);
-#ifdef WSM
#define ToLower(s) (_DtWmParseToLower (s))
#define GetNextLine() (_DtWmParseNextLine (wmGD.pWmPB))
#define GetSmartSMString(s) (_DtWmParseNextTokenC (s, True))
#define GetSmartString(s) (_DtWmParseNextTokenC (s, False))
#define GetString(s) (_DtWmParseNextTokenC (s, False))
#define ScanWhitespace(s) (_DtWmParseSkipWhitespaceC (s))
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
extern Boolean IsClientCommand (String);
extern Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem,
WmFunction wmFunction);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
#include "WmGraphics.h"
#include "WmMenu.h"
#include "WmResParse.h"
-#ifdef WSM
#include "WmBackdrop.h"
#include "WmIconBox.h"
#include "WmWrkspace.h"
#include <Dt/GetDispRes.h>
#define cfileP (wmGD.pWmPB->pFile) /* fopen'ed configuration file or NULL */
-#endif /* WSM */
#include "WmXSMP.h"
/*
void SetStdClientResourceValues (ClientData *pCD);
void SetStdScreenResourceValues (WmScreenData *pSD);
GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap);
-#ifdef WSM
static void WriteOutXrmColors (WmScreenData *pSD);
-#endif /* WSM */
-#ifdef WSM
void ProcessPresenceResources (WmScreenData *pSD);
void ProcessDefaultBackdropImages (WmScreenData *pSD);
void _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value);
void _WmIconImageMaximumDefault (Widget widget, int offset, XrmValue *value);
void _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value);
int DefaultWsColorSetId (WmWorkspaceData *pWS);
-#endif /* WSM */
void _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pixel newBackground, XrmValue *value);
Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2);
char builtinSystemMenu[] = BUILTINSYSTEMMENU;
#else /* !defined(NO_MESSAGE_CATALOG)*/
char *builtinSystemMenu = BUILTINSYSTEMMENU;
-#ifdef WSM
+
#define DEFAULT_DTWM_SYSTEMMENU "_MwmWindowMenu_\n\
{\n\
Restore _R f.restore\n\
no-label f.separator\n\
Close _C Alt<Key>F4 f.kill\n\
}"
-#endif /* WSM */
void InitBuiltinSystemMenu(void)
{
char *MinString = NULL;
char *MaxString = NULL;
char *LowString = NULL;
-#ifdef WSM
char *OcpString = NULL;
char *OcaString = NULL;
char *RemString = NULL;
-#endif /* WSM */
char *CloString = NULL;
char dsm[2048];
char dsmtemp[sizeof(dsm)];
strcpy(LowString, tmpString);
}
}
-#ifdef WSM
+
if (DtwmBehavior)
{
if(gotItAll)
}
}
} /* if DTWM */
-#endif /* WSM */
+
if(gotItAll)
{
tmpString = ((char *)GETMESSAGE(62, 48, "Close _C Alt<Key>F4 f.kill"));
if (!gotItAll)
{
-#ifdef WSM
if (DtwmBehavior)
{
builtinSystemMenu = (char *)
builtinSystemMenu = (char *)
XtNewString((String)BUILTINSYSTEMMENU);
}
-#else /* WSM */
- builtinSystemMenu = (char *)
- XtNewString((String)BUILTINSYSTEMMENU);
-#endif /* WSM */
}
else
{
snprintf(dsm, sizeof(dsm), "%s\n{\n%s\n%s\n%s\n%s\n%s\n%s\n no-label f.separator\n",
defaultSystemMenuName, ResString, MovString,
SizString, MinString, MaxString, LowString);
-#ifdef WSM
if (DtwmBehavior)
{
snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n%s\n%s\n no-label f.separator\n",
dsm, OcpString, OcaString, RemString);
strcpy(dsm, dsmtemp);
}
-#endif /* WSM */
snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n}", dsm, CloString);
strcpy(dsm, dsmtemp);
(char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
{
Warning (((char *)GETMESSAGE(62, 21, "Insufficient memory for localized default system menu")));
-#ifdef WSM
if (DtwmBehavior)
{
builtinSystemMenu = (char *)
builtinSystemMenu = (char *)
XtNewString((String)BUILTINSYSTEMMENU);
}
-#else /* WSM */
- builtinSystemMenu = (char *)
- XtNewString((String)BUILTINSYSTEMMENU);
-#endif /* WSM */
}
else
{
XtFree(MaxString);
if (LowString != NULL)
XtFree(LowString);
-#ifdef WSM
if (OcpString != NULL)
XtFree(OcpString);
if (OcaString != NULL)
XtFree(OcaString);
if (RemString != NULL)
XtFree(RemString);
-#endif /* WSM */
if (CloString != NULL)
XtFree(CloString);
char builtinSystemMenu[];
#endif /* MCCABE */
-#ifdef WSM
#define HARD_CODED_PRIMARY 3
-#endif /* WSM */
char defaultRootMenuName[] = "DefaultRootMenu";
char builtinRootMenuName[] = "_MwmRootMenu_";
#ifndef MCCABE
char defaultButtonBindingsName[] = "DefaultButtonBindings";
char builtinButtonBindingsName[] = "_MwmButtonBindings_";
#ifndef MCCABE
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+# if (defined(MWM_QATS_PROTOCOL))
# define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
{\n\
<Btn1Down> icon|frame f.raise\n\
<Btn3Down> icon|frame f.post_wmenu\n\
<Btn3Down> root f.menu DefaultRootMenu\n\
}";
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+# endif /* defined(MWM_QATS_PROTOCOL) */
char builtinButtonBindings[] = BUILTINBUTTONBINDINGS
#else
static String _defaultBackground;
static String _defaultActiveBackground;
static AppearanceData *_pAppearanceData;
-#ifdef WSM
static WmWorkspaceData *pResWS;
static WmScreenData *pResSD;
-#endif /* WSM */
static char _defaultColor1HEX[] = "#A8A8A8A8A8A8";
static char _defaultColor2HEX[] = "#5F5F92929E9E";
Const char _75_foreground[] = "75_foreground";
Const char _50_foreground[] = "50_foreground";
Const char _25_foreground[] = "25_foreground";
-#ifdef WSM
Const char *_Dither = XmCO_DITHER;
Const char *_NoDither = XmCO_NO_DITHER;
Const char CLIENT_FRAME_PART[] = "client";
Const char ICON_FRAME_PART[] = "icon";
Const char FEEDBACK_FRAME_PART[] = "feedback";
Const char MENU_ITEM_PART[] = "menu";
-#endif /* WSM */
#define WmBGC XmBACKGROUND
#define WmFGC XmFOREGROUND
XtRImmediate,
(XtPointer)NULL
},
-#ifdef WSM
{
WmNcppCommand,
XtRImmediate,
(XtPointer)NULL
},
-#endif /* WSM */
{
WmNdeiconifyKeyFocus,
XtRImmediate,
(XtPointer)True
},
-#ifdef WSM
+
{
WmNframeExternalShadowWidth,
WmCFrameExternalShadowWidth,
XtRImmediate,
(XtPointer)2
},
-#endif /* WSM */
{
WmNfreezeOnConfig,
XtRImmediate,
(XtPointer)True
},
-#ifdef WSM
{
WmNuseWindowOutline,
XtRImmediate,
(XtPointer)False
},
-#endif /* WSM */
{
WmNiconAutoPlace,
XtRImmediate,
(XtPointer)True
},
-#ifdef WSM
+
{
WmNiconExternalShadowWidth,
WmCIconExternalShadowWidth,
XtRImmediate,
(XtPointer)2
},
-#endif /* WSM */
{
WmNiconClick,
XtRImmediate,
(XtPointer)True
},
-#ifdef WSM
{
WmNmarqueeSelectGranularity,
XtRImmediate,
(XtPointer)0
},
-#endif /* WSM */
{
WmNmoveThreshold,
XtRImmediate,
(XtPointer)False
},
-#ifdef WSM
{
WmNrefreshByClearing,
XtRImmediate,
(XtPointer)True
},
-#endif /* WSM */
-
-#ifndef WSM
- {
- WmNsessionClientDB,
- WmCSessionClientDB,
- XtRString,
- sizeof(String),
- XtOffsetOf(WmGlobalData, sessionClientDB),
- XtRImmediate,
- (XtPointer)NULL
- },
-#endif /* ! WSM */
{
WmNshowFeedback,
XtRImmediate,
(XtPointer)True
},
-#ifdef WSM
+
{
WmNhelpDirectory,
WmCHelpDirectory,
(XtPointer)"DT/Dtwm/"
},
-#endif /* WSM */
{
WmNdtLite,
WmCDtLite,
sizeof (Boolean),
XtOffsetOf(WmGlobalData, multiScreen),
XtRImmediate,
-#ifdef WSM
(XtPointer)True
-#else /* WSM */
- (XtPointer)False
-#endif /* WSM */
},
{
XtRImmediate,
(XtPointer)NULL
},
-#ifdef WSM
+
{ WmNbackdropDirectories,
WmCBackdropDirectories,
XmRString,
XmRString,
DEFAULT_BACKDROP_DIR
},
-#endif /* WSM */
};
(XtPointer)USE_ICON_DEFAULT_APPEARANCE
},
-#ifdef WSM
{
WmNiconImageMaximum,
WmCIconImageMaximum,
XtRCallProc,
(XtPointer) _WmIconImageMaximumDefault
},
-#else /* WSM */
- {
- WmNiconImageMaximum,
- WmCIconImageMaximum,
- WmRSize,
- sizeof (WHSize),
- XtOffsetOf (WmScreenData, iconImageMaximum),
- XtRString,
- "50x50"
- },
-#endif /* WSM */
{
WmNiconImageMinimum,
XtRImmediate,
(XtPointer) BIGSIZE
},
-#ifndef WSM
-
- {
- WmNiconBoxGeometry,
- WmCIconBoxGeometry,
- XtRString,
- sizeof (String),
- XtOffsetOf (WmScreenData, iconBoxGeometry),
- XtRString,
- (XtPointer)NULL
- },
-#endif /* WSM */
{
WmNiconBoxName,
(XtPointer)True
},
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
{
WmNrootMenu,
WmCRootMenu,
XtRString,
(XtPointer)builtinRootMenuName
},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
{
WmNtransientDecoration,
XtRImmediate,
(XtPointer)False
-#ifdef WSM
},
{
XtOffsetOf (WmScreenData, numWorkspaces),
XtRImmediate,
(XtPointer)0
-#endif /* WSM */
}
};
(XtPointer) BIGSIZE
},
-#ifdef WSM
{
WmNiconImageMaximum,
WmCIconImageMaximum,
XtRCallProc,
(XtPointer) _WmIconImageMaximumDefault
},
-#else /* WSM */
- {
- WmNiconImageMaximum,
- WmCIconImageMaximum,
- WmRSize,
- sizeof (WHSize),
- XtOffsetOf (WmScreenData, iconImageMaximum),
- XtRString,
- "50x50"
- },
-#endif /* WSM */
{
WmNiconImageMinimum,
* "Mwm*[screen<#>*]<workspace>*<resource_identifier>".
*
******************************<->***********************************/
-#ifdef WSM
XtResource wmWorkspaceResources[] =
{
{
}
};
-#else /* WSM */
-XtResource *wmWorkspaceResources = NULL;
-#endif /* WSM */
\f
*
*************************************<->***********************************/
-#ifdef WSM
XtResource wmStdWorkspaceResources[] =
{
{
(XtPointer)NULL
}
};
-#else /* WSM */
-XtResource *wmStdWorkspaceResources = NULL;
-#endif /* WSM */
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* wmBackdropResources
(XtPointer)NULL
}
};
-#endif /* WSM */
-\f
/*************************************<->*************************************
*
* wmClientResources
XtResource wmClientResources[] =
{
-#ifdef WSM
{
WmNabsentMapBehavior,
WmCAbsentMapBehavior,
XtRImmediate,
(XtPointer)(AMAP_BEHAVIOR_ADD)
},
-#endif /* WSM */
+
{
WmNclientDecoration,
WmCClientDecoration,
XtRString,
"0x0"
},
-#ifdef WSM
{
WmNsecondariesOnTop,
XtRCallProc,
(XtPointer)_WmSecondariesOnTopDefault
},
-#endif /* WSM */
{
WmNsystemMenu,
sizeof (Boolean),
XtOffsetOf (ClientData, useClientIcon),
XtRImmediate,
-#ifdef WSM
(XtPointer)True
-#else
- (XtPointer)False
-#endif /* WSM */
},
{
XtRString,
"0x0"
},
-#ifdef WSM
+
{
WmNsecondariesOnTop,
WmCSecondariesOnTop,
XtRCallProc,
(XtPointer)_WmSecondariesOnTopDefault
},
-#endif /* WSM */
{
WmNuseClientIcon,
} /* END OF FUNCTION _WmATopShadowPixmapDefault */
-#ifdef WSM
void
_WmBackdropBgDefault (Widget widget, int offset, XrmValue *value)
{
} /* END OF FUNCTION DefaultWsColorSetId */
-#endif /* WSM */
\f
} /* END OF FUNCTION _WmMultiClickTimeDefault */
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* _WmSecondariesOnTopDefault (widget, offset, value)
value->size = sizeof (Boolean);
} /* END OF FUNCTION _WmSecondariesOnTopDefault */
-#endif /* WSM */
\f
} /* END OF FUNCTION ProcessScreenListResource */
-#ifdef WSM
-\f
+
/******************************<->*************************************
*
* ProcessWmColors ()
} /* END OF FUNCTION CheckForNoDither */
-#endif /* WSM */
\f
(XtPointer) &(pSD->clientAppearance),
WmNclient, WmCClient, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
CheckForNoDither (&(pSD->clientAppearance));
-#endif /* WSM */
/*
(void)XtGetSubresources (clientW, (XtPointer) &(pSD->clientTitleAppearance),
WmNtitle, WmCTitle, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
CheckForNoDither (&(pSD->clientTitleAppearance));
-#endif /* WSM */
/*
(XtPointer) &(pSD->iconAppearance),
WmNicon, WmCIcon, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
CheckForNoDither (&(pSD->iconAppearance));
-#endif /* WSM */
/*
(XtPointer) &(pSD->feedbackAppearance),
WmNfeedback, WmCFeedback, wmAppearanceResources,
XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
CheckForNoDither (&(pSD->feedbackAppearance));
-#endif /* WSM */
/*
* Process the feedback resource values:
void
ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
{
-#ifdef WSM
pResSD = pSD; /* save current screen data for default processing */
/*
* Use the screen name (e.g., "0") as the default resource name.
#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.
pSD->resizeBorderWidth = (int) (avg_res * 2.2);
/* limit size because big borders look ugly */
-#ifndef WSM
- if (wmGD.frameStyle == WmSLAB)
- {
-#endif /* WSM */
if (pSD->resizeBorderWidth > 6) pSD->resizeBorderWidth = 6;
-#ifndef WSM
- }
- else
- {
- if (pSD->resizeBorderWidth > 7) pSD->resizeBorderWidth = 7;
- }
-#endif /* WSM */
}
/* Multiply times width in mm (avg. 5-6 pixels) */
{
pSD->resizeBorderWidth = MAXIMUM_FRAME_BORDER_WIDTH;
}
-#ifdef WSM
/*
* Update the resource database.
*/
WriteOutXrmColors (pSD);
-#endif /* WSM */
-
/*
* Process the component appearance resources for client,
* icon and feedback parts of mwm.
ProcessAppearanceResources (pSD);
-#ifdef WSM
/*
* Process the workspace list and name the initial
* workspaces
*/
ProcessDefaultBackdropImages (pSD);
-#endif /* WSM */
/*
* Save the default icon pixmap in global data. We'll use it only
* as a last resort.
} /* END OF FUNCTION ProcessScreenResources */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* ProcessDefaultBackdropImages (pSD)
} /* END OF FUNCTION ProcessWorkspaceList */
-#endif /* WSM */
\f
/******************************<->*************************************
/*
* Retrieve workspace specific resources.
*/
-#ifdef WSM
pResWS = pWS; /* save current ws for default processing */
-#endif /* WSM */
if (wmGD.useStandardBehavior)
{
*
* (no code for this right now)
*/
-#ifdef WSM
pWS->iconBoxGeometry = NULL;
-#endif /* WSM */
}
else
{
pWS->name, pWS->name, wmWorkspaceResources,
XtNumber (wmWorkspaceResources), NULL, 0);
-#ifdef WSM
/* Dup iconbox geometry, it may be free'd later on. */
if (pWS->iconBoxGeometry)
{
pWS->iconBoxGeometry = XtNewString (pWS->iconBoxGeometry);
}
-#endif /* WSM */
}
-#ifdef WSM
if (pWS->title == NULL)
{
/*
XtNumber (wmBackdropResources), NULL, 0);
ProcessBackdropResources (pWS, 0);
-#endif /* WSM */
} /* END OF FUNCTION ProcessWorkspaceResources */
-#ifdef WSM
-\f
/******************************<->*************************************
*
* ProcessPresenceResources (pSD)
}
} /* END OF FUNCTION ProcessPresenceResources */
-#endif /* WSM */
\f
/*************************************<->*************************************
/* make top and bottom shadow pixmaps */
-#ifdef WSM
if (pCD->matteBottomShadowPStr &&
(!strcmp(pCD->matteBottomShadowPStr, _NoDither)))
{
pCD->matteBottomShadowPStr = NULL;
}
-#endif /* WSM */
+
if (pCD->matteBottomShadowPStr)
{
if ((pCD->matteBottomShadowPStr ==
pCD->matteBottomShadowPixmap = (Pixmap)NULL;
}
-#ifdef WSM
if (pCD->matteTopShadowPStr &&
(!strcmp(pCD->matteTopShadowPStr, _NoDither)))
{
pCD->matteTopShadowPStr = NULL;
}
-#endif /* WSM */
+
if (pCD->matteTopShadowPStr)
{
if ((pCD->matteTopShadowPStr ==
void
SetStdScreenResourceValues (WmScreenData *pSD)
{
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
pSD->rootMenu = builtinRootMenuName;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
pSD->buttonBindings = builtinButtonBindingsName;
pSD->cleanText = True;
pSD->iconDecoration =
if (Monochrome (newScreen))
{
-#ifdef WSM
Boolean ok = False;
/*
* Check color server sets for this screen.
}
if (!ok)
{
-#endif /* WSM */
switch (type)
{
case WmFGC: newValue = BlackPixelOfScreen (newScreen); break;
case WmTSC: newValue = WhitePixelOfScreen (newScreen); break;
case WmBSC: newValue = BlackPixelOfScreen (newScreen); break;
}
-#ifdef WSM
}
-#endif /* WSM */
return;
}
* set.
*/
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*
* Before parsing the string, substitute the real name for
* the default rootmenu using the resource rootMenu
ParseKeyStr (pSD, (unsigned char *)buffer);
#else
ParseKeyStr (pSD, (unsigned char *)builtinKeyBindings);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
}
else
{
* set.
*/
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*
* Before parsing the string, substitute the real name for
* the default rootmenu using the resource rootMenu
ParseButtonStr (pSD, (unsigned char *)buffer);
#else
ParseButtonStr (pSD, (unsigned char *)builtinButtonBindings);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
}
#ifdef NO_MESSAGE_CATALOG
} /* END OF FUNCTION SimilarAppearanceData */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* Monochrome (screen)
return ((DefaultDepthOfScreen(screen) == 1));
} /* END OF FUNCTION Monochrome */
-#endif /* WSM */
-#ifdef WSM
+
/**************************** eof ***************************/
-#endif /* WSM */
extern void GetAppearanceGCs (WmScreenData *pSD, Pixel fg, Pixel bg, XFontStruct *font, Pixmap bg_pixmap, Pixel ts_color, Pixmap ts_pixmap, Pixel bs_color, Pixmap bs_pixmap, GC *pGC, GC *ptsGC, GC *pbsGC);
extern GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap);
extern void MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean makeActiveResources);
-#ifdef WSM
extern Boolean Monochrome (Screen *screen);
extern void ProcessWmColors (WmScreenData *pSD);
-#endif /* WSM */
extern void ProcessWmResources (void);
extern void SetStdGlobalResourceValues (void);
extern void ProcessScreenListResource (void);
extern void ProcessGlobalScreenResources (void);
extern void ProcessPresenceResources (WmScreenData *pSD);
extern void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName);
-#ifdef WSM
extern void ProcessWorkspaceList (WmScreenData *pSD);
-#endif /* WSM */
extern void ProcessWorkspaceResources (WmWorkspaceData *pWS);
extern void ProcessClientResources (ClientData *pCD);
extern void SetStdClientResourceValues (ClientData *pCD);
extern char *WmMalloc (char *ptr, unsigned size);
extern void SetupDefaultResources (WmScreenData *pSD);
extern Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2);
-#ifdef WSM
extern String ResCat (String s1, String s2, String s3, String s4);
void CheckForNoDither (AppearanceData *pAD);
-#endif /* WSM */
#ifndef NO_MESSAGE_CATALOG
extern char *builtinSystemMenu;
extern char builtinRootMenu[];
extern char builtinSystemMenuName[];
-#ifndef WSM
-#define Monochrome(screen) ( DefaultDepthOfScreen(screen) == 1 )
-#endif /* not WSM */
*/
-#ifdef WSM
\f
/*************************************<->*************************************
*
(void) sigaction (SIGSYS, &sa, (struct sigaction *) 0);
#endif
}
-#endif /* WSM */
\f
/*************************************<->*************************************
void SetupWmSignalHandlers (int dummy)
{
-#ifndef WSM
- void (*signalHandler) ();
-#endif
-
-#ifdef WSM
struct sigaction sa;
struct sigaction osa;
(void) sigaction (SIGSYS, &sa, (struct sigaction *) 0);
#endif
-#else /* not WSM - original mwm code*/
-
- signalHandler = (void (*)())signal (SIGINT, SIG_IGN);
- if (signalHandler != (void (*)())SIG_IGN)
- {
- signal (SIGINT, QuitWmSignalHandler);
- }
-
- signalHandler = (void (*)())signal (SIGHUP, SIG_IGN);
- if (signalHandler != (void (*)())SIG_IGN)
- {
- signal (SIGHUP, QuitWmSignalHandler);
- }
-
- signal (SIGQUIT, QuitWmSignalHandler);
-
- signal (SIGTERM, QuitWmSignalHandler);
-#endif /* WSM */
-
-
} /* END OF FUNCTION SetupWmSignalHandlers */
\f
#define NotGrabbed 0
#define ResizeGrab 1
#define MoveGrab 2
-#ifdef WSM
/* Anchors */
#define ANCHOR_NONE 0
#ifndef ABS
#define ABS(x) ((x)>0?(x):(-(x)))
#endif /* ABS */
-#endif /* WSM */
/* number of times to poll before blocking on a config event */
static int startX, startY;
static unsigned int startWidth, startHeight;
static unsigned int minWidth, minHeight, maxHeight, maxWidth;
-#ifdef WSM
static int marqueeX, marqueeY; /* root coords of UL corner of are */
static long marqueeWidth, marqueeHeight; /* size of area */
static unsigned int marqueeAnchor; /* id of anchor corner */
static long marqueeWidth0, marqueeHeight0; /* old size of area */
-#endif /* WSM */
static int opaqueMoveX = 0; /* for cancel request on opaque moves */
static int opaqueMoveY = 0;
static Boolean anyMotion = FALSE;
static Boolean configGrab = FALSE;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
static Boolean grabServer = TRUE;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
Dimension clipWidth = 0;
Dimension clipHeight = 0;
FALSE);
}
}
-#ifdef WSM
else if (wmGD.configAction == MARQUEE_SELECT)
{
WmScreenData *pSD;
dtSendMarqueeSelectionNotification(pSD, DT_MARQUEE_SELECT_END,
marqueeX, marqueeY, marqueeWidth, marqueeHeight);
}
-#endif /* WSM */
/*
* Clear configuration flags and data.
anyMotion = FALSE;
wmGD.movingIcon = FALSE;
-#ifdef WSM
if (pcd)
{
-#endif /* WSM */
/* hide the move/resize config data */
HideFeedbackWindow(pcd->pSD);
* Set the focus back to something reasonable
*/
RepairFocus ();
-#ifdef WSM
}
-#endif /* WSM */
} /* END OF FUNCTION CompleteFrameConfig */
}
else
{
-#ifdef WSM
if (wmGD.useWindowOutline)
WindowOutline(x,y,width,height);
else
-#endif
FlashOutline(x, y, width, height);
}
} /* END OF FUNCTION MoveOutline */
}
} /* END OF FUNCTION FlashOutline */
-#ifdef WSM
\f
/*************************************<->*************************************
*
} /* END OF FUNCTION WindowOutline */
-#endif /* WSM */
\f
/*************************************<->*************************************
} /* END OF FUNCTION StartClientMove */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/*************************************<->*************************************
*
* SetGrabServer ()
{
grabServer = FALSE;
}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
\f
/*************************************<->*************************************
Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTime, ClientData *pCD, Boolean alwaysGrab)
{
-#ifdef WSM
Window root;
if (pCD)
root = RootWindow (DISPLAY, ACTIVE_PSD->screen);
if (pCD && pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD))
-#else
- if (pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD))
-#endif
{
/*
* Confine the pointer to the icon box clip window
pmask,
GrabModeAsync, /* pointer_mode */
GrabModeAsync, /* keyboard_mode */
-#ifdef WSM
root,
-#else
- ROOT_FOR_CLIENT(pCD), /* confine_to window */
-#endif
cursor,
grabTime) != GrabSuccess)
{
* If running automation version of mwm, do not grab the server, since
* this will confuse the automation input synthesis code.
*/
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+# if (defined(MWM_QATS_PROTOCOL))
if (grabServer == TRUE)
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+# endif /* defined(MWM_QATS_PROTOCOL) */
if (wmGD.freezeOnConfig)
{
-#ifdef WSM
if (!pCD || ((pCD->pSD->moveOpaque && alwaysGrab) ||
(!(pCD->pSD->moveOpaque))))
-#else /* WSM */
- if ((pCD->pSD->moveOpaque && alwaysGrab) ||
- (!(pCD->pSD->moveOpaque)))
-#endif /* WSM */
{
XGrabServer(DISPLAY);
}
UndoGrabs();
/* turn off feedback window */
-#ifdef WSM
if (pcd)
{
-#endif /* WSM */
HideFeedbackWindow(pcd->pSD);
/* make sure title bar is popped out */
opaqueMoveX, opaqueMoveY);
}
}
-#ifdef WSM
}
if (wmGD.configAction == MARQUEE_SELECT)
{
dtSendMarqueeSelectionNotification(ACTIVE_PSD, DT_MARQUEE_SELECT_CANCEL,
marqueeX, marqueeY, 0, 0);
}
-#endif /* WSM */
/* replace pointer if no motion events received */
-#ifdef WSM
if (pcd)
-#endif /* WSM */
if (!anyMotion && wmGD.enableWarp) {
XWarpPointer(DISPLAY, None, ROOT_FOR_CLIENT(pcd),
0, 0, 0, 0, wmGD.preMoveX, wmGD.preMoveY);
CheckEatButtonRelease (ClientData *pcd, XEvent *pev)
{
Window grab_win;
-#ifdef WSM
Window root;
if (pcd != (ClientData *)NULL)
root = ROOT_FOR_CLIENT(pcd);
else
root = RootWindow (DISPLAY, ACTIVE_PSD->screen);
-#endif /* WSM */
-#ifdef WSM
if (pcd == (ClientData *) NULL)
grab_win = root;
else
-#endif /* WSM */
- grab_win = GrabWin(pcd, pev);
+ grab_win = GrabWin(pcd, pev);
if ((pev->type == KeyPress || pev->type == KeyRelease) &&
(pev->xbutton.state & ButtonMask))
ButtonReleaseMask,
GrabModeAsync, /* pointer_mode */
GrabModeAsync, /* keyboard_mode */
-#ifdef WSM
root, /* confine_to window */
-#else /* WSM */
- ROOT_FOR_CLIENT(pcd), /* confine_to window */
-#endif /* WSM */
wmGD.configCursor,
pev->xbutton.time) == GrabSuccess)
{
while (releaseButtons)
{
-#ifdef WSM
PullExposureEvents ();
-#endif /* WSM */
XMaskEvent (DISPLAY, ButtonReleaseMask, &event);
if (event.type == ButtonRelease)
return (grab_win);
} /* END OF FUNCTION GrabWin */
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* HandleMarqueeSelect (pSD, event)
} /* end switch(keysym) */
} /* END OF FUNCTION HandleResizeKeyPress */
-#endif /* WSM */
unsigned int width, unsigned int height,
Boolean clientRequest);
extern void ReGrabPointer (Window grab_win, Time grabTime);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
extern void SetGrabServer (void);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
extern void SetOutline (XSegment *pOutline, int x, int y, unsigned int width,
unsigned int height, int fatness);
extern void SetPointerPosition (int newX, int newY, int *actualX,
extern Boolean StartResizeConfig (ClientData *pcd, XEvent *pev);
extern int ResizeType (ClientData *pcd, XEvent *pev);
extern void UndoGrabs (void);
-#ifdef WSM
extern void HandleMarqueeSelect (WmScreenData *pSD, XEvent *pev);
extern void StartMarqueeSelect(WmScreenData *pSD, XEvent *pev);
extern void UpdateMarqueeSelectData (WmScreenData *pSD);
extern Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev);
extern void WindowOutline (int x, int y, unsigned int width,
unsigned int height);
-#endif /* WSM */
#include "WmOL.h"
#include "WmProperty.h"
#include "WmResource.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
#include "WmWinList.h"
-#ifdef WSM
#include "WmPresence.h"
-#endif /* WSM */
#include "WmXSMP.h"
#include "WmMultiHead.h"
/*
* Global Variables:
*/
-#ifdef WSM
WmWorkspaceData *pIconBoxInitialWS;
-#endif /* WSM */
\f
pCD->clientID = ++(pSD->clientCounter);
pCD->clientFlags = WM_INITIALIZATION;
pCD->iconFlags = 0;
-#ifndef WSM
- pCD->pIconBox = NULL;
-#endif /* WSM */
pCD->thisIconBox = NULL;
pCD->pECD = NULL;
pCD->pPRCD = NULL;
pCD->transientLeader = NULL;
pCD->transientChildren = NULL;
pCD->transientSiblings = NULL;
-#ifdef WSM
pCD->primaryStackPosition = 0;
-#endif /* WSM */
pCD->fullModalCount = 0;
pCD->primaryModalCount = 0;
pCD->focusPriority = 0;
pCD->clientClass = NULL;
pCD->clientName = NULL;
pCD->clientFrameWin = (Window)0L;
-#ifndef WSM
- pCD->iconFrameWin = (Window)0L;
-#endif /* WSM */
pCD->iconWindow = (Window)0L;
pCD->iconPixmap = (Pixmap)0L;
-#ifndef WSM
- pCD->iconPlace = NO_ICON_PLACE;
-#endif /* WSM */
pCD->clientProtocols = NULL;
pCD->clientProtocolCount = 0;
pCD->mwmMessages = NULL;
pCD->clientCmapIndex = 0;
pCD->clientCmapFlagsInitialized = FALSE;
pCD->systemMenuSpec = NULL;
-#ifdef WSM
pCD->putInAll = False;
pCD->pWorkspaceHints = NULL;
pCD->numInhabited = 0;
pCD->dtwmBehaviors = 0L;
pCD->paInitialProperties = NULL;
pCD->numInitialProperties = 0;
-#endif /* WSM */
pCD->decorFlags = 0L;
pCD->pTitleGadgets = NULL;
if (manageFlags & MANAGEW_WM_CLIENTS)
{
-#ifdef WSM
WmWorkspaceData *pWS;
if (manageFlags & MANAGEW_ICON_BOX)
pWS = pSD->pActiveWS;
}
return (GetWmClientInfo (pWS, pCD, manageFlags));
-#else /* WSM */
- return (GetWmClientInfo (pSD->pActiveWS, pCD, manageFlags));
-#endif /* WSM */
}
}
pCD->xBorderWidth = wmGD.windowAttributes.border_width;
-#ifdef WSM
/*
* Get the initial list of properties on this window.
* Save it to optimize subsequent property fetching.
*/
GetInitialPropertyList (pCD);
-#endif /* WSM */
/*
* Retrieve and process WM_CLASS hints client window property info:
ProcessSmClientID (pCD);
ProcessWmSaveHint (pCD);
-#ifdef WSM
/*
* Set client's workspace information. NOTE: this also may
* set the geometry, initial state, etc. For Sm-aware clients,
* (results are used in ProcessMwmHints)
*/
ProcessDtWmHints (pCD);
-#else
-
- /*
- * For Sm-aware clients, retrieve geometry and initial state
- * from private DB.
- */
- FindClientDBMatch(pCD, (char **)NULL);
-
-#endif /* WSM */
/*
* Retrieve and process M_CLIENT_DECOR client window property info:
{
Pixmap iconBitmap;
-#ifdef WSM
-int i;
-#endif /* WSM */
+ int i;
/*
* Set up the client class and name for resource retrieval.
}
}
-#ifdef WSM
/*
* Allocate initial workspace ID list
* fill with NULL IDs
* PutClientIntoWorkspace.
*/
pCD->numInhabited = 0;
-#else /* WSM */
- pCD->iconPlace = NO_ICON_PLACE;
- pCD->iconX = 0;
- pCD->iconY = 0;
-#endif /* WSM */
pCD->windowGroup = 0L;
#ifndef NO_OL_COMPAT
pCD->bPseudoTransient = False;
if (manageFlags & MANAGEW_ICON_BOX)
{
pCD->clientFunctions &= ICON_BOX_FUNCTIONS;
-#ifdef WSM
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
-#endif /* WSM */
if (wmGD.useFrontPanel && pCD->pSD->iconBoxControl)
{
/*
Warning (((char *)GETMESSAGE(70, 3, "Couldn't make icon box")));
return (NULL);
}
-#ifdef WSM
PutClientIntoWorkspace (pWS, pCD);
-#endif /* WSM */
}
else if (manageFlags & MANAGEW_CONFIRM_BOX)
{
pCD->widthInc = 1;
pCD->heightInc = 1;
pCD->clientFlags |= CONFIRM_BOX;
-#ifdef WSM
PutClientIntoWorkspace (ACTIVE_WS, pCD);
-#endif /* WSM */
}
/*
if (manageFlags & MANAGEW_ICON_BOX)
{
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/** BEGIN FIX CR 6941 **/
MenuItem *iconBoxMenuItems, *lastItem;
F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON,
GetIconBoxMenuItems(PSD_FOR_CLIENT(pCD)),
TRUE);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
}
classHint.res_name = "";
XGetClassHint (DISPLAY, pCD->client, &classHint);
#else
-#ifdef WSM
if ((HasProperty (pCD, XA_WM_CLASS)) &&
(XGetClassHint (DISPLAY, pCD->client, &classHint)))
-#else /* WSM */
- if (XGetClassHint (DISPLAY, pCD->client, &classHint))
-#endif /* WSM */
#endif
{
/* the WM_CLASS property exists for the client window */
register long flags;
Pixmap iconPixmap;
Pixmap iconMask;
-#ifdef WSM
WmWorkspaceData *pWsTmp;
WsClientData *pWsc;
int iws;
-#endif /* WSM */
int tmpIconX, tmpIconY;
* since they may be none.
*/
-#ifdef WSM
if (firstTime && !HasProperty (pCD, XA_WM_HINTS))
pXWMHints = NULL;
else
-#endif /* WSM */
- pXWMHints = XGetWMHints (DISPLAY, pCD->client);
+ pXWMHints = XGetWMHints (DISPLAY, pCD->client);
if (pXWMHints)
{
}
-#ifdef WSM
if (!ClientInWorkspace (PSD_FOR_CLIENT(pCD)->pActiveWS, pCD))
{
pCD->clientState |= UNSEEN_STATE;
}
-#endif /* WSM */
/*
{
pCD->iconFlags |= ICON_HINTS_POSITION;
if (wmGD.iconAutoPlace)
-#ifdef WSM
{
/*
* Initialize icon placement data in all inhabited
}
}
}
-#else /* WSM */
- {
- tmpIconX = (pCD->clientFlags & SM_ICON_X) ?
- pCD->iconX : pXWMHints->icon_x;
- tmpIconY = (pCD->clientFlags & SM_ICON_Y) ?
- pCD->iconY : pXWMHints->icon_y;
- pCD->iconPlace =
- FindIconPlace (pCD, &(pCD->pSD->pActiveWS->IPData),
- tmpIconX, tmpIconY);
- if (pCD->iconPlace != NO_ICON_PLACE)
- {
- CvtIconPlaceToPosition (&(pCD->pSD->pActiveWS->IPData),
- pCD->iconPlace, &pCD->iconX, &pCD->iconY);
- }
- }
- else
- {
- if (!(pCD->clientFlags & SM_ICON_X))
- pCD->iconX = pXWMHints->icon_x;
- if (!(pCD->clientFlags & SM_ICON_Y))
- pCD->iconY = pXWMHints->icon_y;
- }
-#endif /* WSM */
}
else
{
if (wmGD.iconAutoPlace)
{
-#ifdef WSM
/*
* Initialize icon placement data in all inhabited
* workspaces
pWsc->iconX = 0;
pWsc->iconY = 0;
}
-#else /* WSM */
- pCD->iconPlace = NO_ICON_PLACE;
- pCD->iconX = 0;
- pCD->iconY = 0;
-#endif /* WSM */
}
}
}
XmString title_xms = NULL;
if ((pCD->clientDecoration & MWM_DECOR_TITLE) &&
-#ifdef WSM
(!firstTime || HasProperty (pCD, XA_WM_NAME)) &&
-#endif /* WSM */
XGetWMName(DISPLAY, pCD->client, &wmNameProp))
{
title_xms = WmICCCMToXmString(&wmNameProp);
if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
(pCD->transientLeader == NULL) &&
-#ifdef WSM
(!firstTime || HasProperty(pCD, XA_WM_ICON_NAME)) &&
-#endif /* WSM */
XGetWMIconName (DISPLAY, pCD->client, &wmIconNameProp))
{
icon_xms = WmICCCMToXmString(&wmIconNameProp);
ClientData *leader;
-#ifdef WSM
if ((HasProperty (pCD, XA_WM_TRANSIENT_FOR)) &&
(XGetTransientForHint (DISPLAY, pCD->client, &window)))
-#else /* WSM */
- if (XGetTransientForHint (DISPLAY, pCD->client, &window))
-#endif /* WSM */
{
pCD->clientFlags |= CLIENT_TRANSIENT;
void
MakeSystemMenu (ClientData *pCD)
{
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
MenuItem *lastItem;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
pCD->mwmMenuItems = GetMwmMenuItems(pCD);
pCD->systemMenuSpec =
* without any documentation.
*/
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
+#if (defined(MWM_QATS_PROTOCOL))
/** BEGIN FIX CR 6941 **/
/* if we still don't have a menu spec, then just abort. */
PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE,
pCD->systemMenuSpec, NULL);
/** END FIX CR 6941 **/
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#endif /* defined(MWM_QATS_PROTOCOL) */
#endif /* defined(MWM_QATS_PROTOCOL) */
} /* END OF FUNCTION MakeSystemMenu */
Boolean rval = False;
int xoff, yoff;
int origX, origY, origWidth, origHeight;
-#ifdef WSM
int iwsc;
-#endif /* WSM */
/*
(manageFlags == MANAGEW_NORMAL) &&
!(pCD->clientFlags & CLIENT_TRANSIENT) &&
(pCD->inputMode != MWM_INPUT_SYSTEM_MODAL) &&
-#ifdef WSM
(ClientInWorkspace(PSD_FOR_CLIENT(pCD)->pActiveWS, pCD)))
-#else /* WSM */
- (PSD_FOR_CLIENT(pCD) == ACTIVE_PSD))
-#endif /* WSM */
{
/*
* Interactively place the window on the screen.
*/
-#ifdef WSM
if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
{
if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUB_RESTORED)
AdjustSlideOutGeometry (pCD);
}
}
- else
-#endif /* WSM */
- if (((wmGD.positionOnScreen) && !interactivelyPlaced) &&
+ else if (((wmGD.positionOnScreen) && !interactivelyPlaced) &&
(!(pCD->clientFlags & (SM_X | SM_Y))))
{
PlaceFrameOnScreen (pCD, &pCD->clientX, &pCD->clientY,
if (!wmGD.iconAutoPlace)
{
-#ifdef WSM
if (!(pCD->iconFlags & ICON_HINTS_POSITION))
{
for (iwsc=0; iwsc<pCD->numInhabited; iwsc++)
&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 */
}
/*
}
#endif /* NO_OL_COMPAT */
-#ifdef WSM
/*
* If primary window can't move between workspaces, then
* secondary window shouldn't either.
{
pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
}
-#endif /* WSM */
/*
* Fix up functions based on system modal settings. System modal
#include "WmMenu.h"
#include "WmResource.h"
#include "WmWinInfo.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
Boolean belowSystemModal = False;
XWindowChanges windowChanges;
WmScreenData *pSD = pWS->pSD;
-#ifdef WSM
WsClientData *pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL)
}
-#ifdef WSM
if (!pWsc->pIconBox && pWsc->iconFrameWin)
-#else /* WSM */
- if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
{
/*
* Put the icon on the bottom of the stack.
if (pSD->lastClient->type == MINIMIZED_STATE)
{
-#ifdef WSM
WsClientData *pWsib;
pWsib = &pSD->lastClient->pCD->pWsList[0];
windowChanges.sibling = pWsib->iconFrameWin;
-#else /* WSM */
- windowChanges.sibling = pSD->lastClient->pCD->iconFrameWin;
-#endif /* WSM */
}
else
{
windowChanges.sibling = pSD->lastClient->pCD->clientFrameWin;
}
windowChanges.stack_mode = Below;
-#ifdef WSM
XConfigureWindow (DISPLAY, pWsc->iconFrameWin,
CWSibling | CWStackMode, &windowChanges);
-#else /* WSM */
- XConfigureWindow (DISPLAY, pCD->iconFrameWin,
- CWSibling | CWStackMode, &windowChanges);
-#endif /* WSM */
pCD->iconEntry.type = MINIMIZED_STATE;
pCD->iconEntry.pCD = pCD;
void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
{
-#ifdef WSM
WsClientData *pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
WmScreenData *pSD = pWS->pSD;
if (pCD->transientLeader)
* Remove the client and icon entries from the window list.
*/
-#ifdef WSM
if (!pWsc->pIconBox && pWsc->iconFrameWin)
-#else /* WSM */
- if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
{
if (pCD->iconEntry.prevSibling)
{
{
restack = True;
}
-#ifdef WSM
if (BumpPrimaryToBottom (pcdLeader))
{
restack = True;
}
-#endif /* WSM */
}
return (restack);
int count;
static int size = 0;
static Window *windows = NULL;
-#ifndef WSM
- Window *nextWindow;
-#endif /* WSM */
XWindowChanges windowChanges;
int i;
int leaderIndex;
size = count + 5;
}
-#ifdef WSM
MakeTransientFamilyStackingList (windows, pcdLeader);
-#else /* WSM */
- nextWindow = MakeTransientWindowList (windows, pcdLeader);
- *nextWindow = pcdLeader->clientFrameWin;
-#endif /* WSM */
/*
* Changes for CDExc19397.
*/
pcd = FindTransientTreeLeader (pcd);
-#ifdef WSM
if (!(pcd->secondariesOnTop) &&
(LeaderOnTop (pcd)))
{
return (pcdSub);
}
}
-#endif /* WSM */
/*
}
else
{
-#ifdef WSM
/*
* Adjust stack entry window if we're stacking below a
* transient tree.
stackWindow = LowestWindowInTransientFamily (pStackEntry->pCD);
}
-#endif /* WSM */
if (stackWindow == 0)
{
if (pSD->lastClient->type == MINIMIZED_STATE)
}
else
{
-#ifdef WSM
if (pSD->lastClient->pCD->transientChildren)
{
stackWindow =
LowestWindowInTransientFamily (pSD->lastClient->pCD);
}
else
-#endif /* WSM */
stackWindow = pSD->lastClient->pCD->clientFrameWin;
}
}
int bY1;
int bY2;
-#ifdef WSM
/*
* For workspace stuff: if either is unseen, then neither
* is obscured.
{
return (False);
}
-#endif /* WSM */
if (pcdA->clientState == NORMAL_STATE)
{
return (pEntry);
} /* END OF FUNCTION FindClientNameMatch */
-#ifdef WSM
-\f
+
/*************************************<->*************************************
*
* BumpPrimaryToTop (pcdLeader)
return (bOnTop);
}
-#endif /* WSM */
extern void AddEntryToList (WmWorkspaceData *pWS, ClientListEntry *pEntry,
Boolean onTop, ClientListEntry *pStackEntry);
extern void AddTransient (WmWorkspaceData *pWS, ClientData *pCD);
-#ifdef WSM
extern Boolean BumpPrimaryToBottom (ClientData *pcdLeader);
extern Boolean BumpPrimaryToTop (ClientData *pcdLeader);
-#endif /* WSM */
extern Boolean CheckIfClientObscuredByAny (ClientData *pcd);
extern Boolean CheckIfClientObscuring (ClientData *pcdTop, ClientData *pcd);
extern Boolean CheckIfClientObscuringAny (ClientData *pcd);
Boolean toNext,
String clientName,
unsigned long types);
-#ifdef WSM
extern ClientData *FindSubLeaderToTop (ClientData *pcd);
-#endif /* WSM */
extern ClientData *FindTransientFocus (ClientData *pcd);
extern ClientData *FindTransientOnTop (ClientData *pcd);
extern ClientData *FindTransientTreeLeader (ClientData *pcd);
extern void FixupFullAppModalCounts (ClientData *pcdLeader,
ClientData *pcdDelete);
-#ifdef WSM
extern Boolean LeaderOnTop (ClientData *pcdLeader);
extern Window LowestWindowInTransientFamily (ClientData *pcdLeader);
extern void MakeTransientFamilyStackingList (Window *windows,
ClientData *pcdLeader);
-#endif /* WSM */
extern Window *MakeTransientWindowList (Window *windows, ClientData *pcd);
extern void MarkModalSubtree (ClientData *pcdTree, ClientData *pcdAvoid);
extern void MarkModalTransient (ClientData *pcdLeader, ClientData *pCD);
extern void MoveEntryInList (WmWorkspaceData *pWS, ClientListEntry *pEntry,
Boolean onTop, ClientListEntry *pStackEntry);
-#ifdef WSM
extern Boolean NormalizeTransientTreeStacking (ClientData *pcdLeader);
-#endif /* WSM */
extern Boolean PutTransientBelowSiblings (ClientData *pcd);
extern Boolean PutTransientOnTop (ClientData *pcd);
extern void RestackTransients (ClientData *pcd);
#include "WmProperty.h"
#include "WmWinInfo.h"
#include "WmWinList.h"
-#ifdef WSM
#include "WmWrkspace.h"
-#endif /* WSM */
/*
ClientData *pcdLeader;
int currentState;
WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
-#ifdef WSM
Boolean notShowing = (newState & UNSEEN_STATE);
-#endif /* WSM */
currentState = pCD->clientState;
if (currentState == newState)
*/
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
-#ifdef WSM
SetClientWsIndex (pCD);
-#endif /* WSM */
if (pCD->transientLeader)
{
(newState != WITHDRAWN_STATE))
{
newState = MINIMIZED_STATE;
-#ifdef WSM
if (notShowing)
{
newState |= UNSEEN_STATE;
}
-#endif /* WSM */
}
else if ((newState == MINIMIZED_STATE) &&
(pcdLeader->clientState != MINIMIZED_STATE))
if (currentState == WITHDRAWN_STATE)
{
newState = NORMAL_STATE;
-#ifdef WSM
if (notShowing)
{
newState |= UNSEEN_STATE;
}
-#endif /* WSM */
}
else
{
newState = currentState;
-#ifdef WSM
if (notShowing)
{
newState |= UNSEEN_STATE;
}
-#endif /* WSM */
}
}
if (newState == currentState)
switch (newState)
{
-#ifdef WSM
case UNSEEN_STATE | WITHDRAWN_STATE:
-#else
- case WITHDRAWN_STATE:
-#endif /* WSM */
{
/*
* Free window manager resources (frame and icon). The
case MAXIMIZED_STATE:
{
SetupWindowStateWithEventMask (pCD, newState, setTime, event_mask);
-#ifdef WSM
XMapWindow (DISPLAY, pCD->client);
XMapWindow (DISPLAY, pCD->clientFrameWin);
WmStopWaiting(); /* in WmIPC.c */
-#endif /* WSM */
break;
}
if (ICON_FRAME_WIN(pCD))
{
-#ifdef WSM
if (pCD->clientState & UNSEEN_STATE)
{
if (pCD->iconWindow)
}
ShowAllIconsForMinimizedClient (pCD);
-#else /* WSM */
- ShowIconForMinimizedClient (pSD->pActiveWS, pCD);
-#endif /* WSM */
}
SetClientWMState (pCD, IconicState, MINIMIZED_STATE);
break;
}
-#ifdef WSM
case UNSEEN_STATE | NORMAL_STATE:
case UNSEEN_STATE | MAXIMIZED_STATE:
}
}
break;
-#endif /* WSM */
}
} /* END OF FUNCTION SetClientStateWithEventMask */
Time setTime, unsigned int event_mask)
{
int currentState;
-#ifdef WSM
int wsI, iplace;
WmWorkspaceData *pWS_i;
-#else /* WSM */
- WmWorkspaceData *pWS = PSD_FOR_CLIENT(pCD)->pActiveWS;
-#endif /* WSM */
WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
currentState = pCD->clientState;
XMaskEvent(DISPLAY, event_mask, &event);
XUngrabPointer(DISPLAY,CurrentTime);
}
-#ifdef WSM
if (wmGD.iconAutoPlace)
{
for (wsI = 0; wsI < pCD->numInhabited; wsI++)
}
}
}
-#else /* WSM */
- if ((wmGD.iconAutoPlace) && (ICON_PLACE(pCD) != NO_ICON_PLACE))
- {
- pWS->IPData.placeList[ICON_PLACE(pCD)].pCD =
- NULL;
- }
-#endif /* WSM */
}
if (clearIconFocus)
*/
pCD->clientState = newState;
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
F_Raise (NULL, pCD, NULL);
-#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
}
if ( (!(pCD->clientFlags & ICON_BOX)) ||
void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
{
ClientData *pNext;
-#ifdef WSM
Boolean bToUnseen;
bToUnseen = (mwmState & UNSEEN_STATE) != 0;
mwmState &= ~UNSEEN_STATE;
-#endif /* WSM */
-#ifdef WSM
SetClientWsIndex (pCD);
-#endif /* WSM */
pNext = pCD->transientChildren;
while (pNext)
{
SetClientWMState (pNext, wmState, mwmState);
}
-#ifdef WSM
SetClientWsIndex (pNext);
-#endif /* WSM */
SetWMState (pNext->client, wmState, ICON_FRAME_WIN(pNext));
if (pNext->maxConfig && mwmState == NORMAL_STATE)
{
pNext->clientState = MAXIMIZED_STATE;
}
-#ifdef WSM
else if (!pNext->maxConfig && mwmState == MAXIMIZED_STATE)
{
pNext->clientState = NORMAL_STATE;
}
-#endif /* WSM */
else
{
pNext->clientState = mwmState;
}
-#ifdef WSM
if (bToUnseen)
pNext->clientState |= UNSEEN_STATE;
-#endif /* WSM */
pNext = pNext->transientSiblings;
}
SetWMState (pCD->client, wmState, ICON_FRAME_WIN(pCD));
pCD->clientState = mwmState;
-#ifdef WSM
if (bToUnseen)
pCD->clientState |= UNSEEN_STATE;
-#endif /* WSM */
} /* END OF FUNCTION SetClientWMState */
CvtIconPlaceToPosition (&pWS->IPData, ICON_PLACE(pCD),
&ICON_X(pCD), &ICON_Y(pCD));
-#ifndef WSM
- XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD),
- ICON_X(pCD), ICON_Y(pCD));
-#endif /* WSM */
-
}
pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = pCD;
}
-#ifdef WSM
/*
* If icon on root window and this workspace is active, the
* make sure it's in the right place.
XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD),
ICON_X(pCD), ICON_Y(pCD));
}
-#endif /* WSM */
+
if (pCD->iconWindow)
{
XMapWindow (DISPLAY, pCD->iconWindow);
&pCD->clientEntry);
}
-#ifdef WSM
if (pWS == pSD->pActiveWS)
{
XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
}
-#else /* WSM */
- XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
-#endif /* WSM */
}
} /* END OF FUNCTION ShowIconForMinimizedClient */
-#ifdef WSM
-\f
/*************************************<->*************************************
*
* ShowAllIconsForMinimizedClient (pCD)
pCD->currentWsc = saveWsc;
} /* END OF FUNCTION ShowAllIconsForMinimizedClient */
-#endif /* WSM */
-\f
extern void SetClientWMState (ClientData *pCD, int wmState, int mwmState);
extern void MapClientWindows (ClientData *pCD);
extern void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD);
-#ifdef WSM
extern void ShowAllIconsForMinimizedClient (ClientData *pCD);
-#endif /* WSM */
extern void SlideSubpanelBackIn (ClientData *pCD, Widget wSubpanel);
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp.
#include <stdio.h>
#include "WmPanelP.h"
#include "WmIPC.h" /* must be after DtP.h */
-#ifdef WSM
#include "WmPresence.h"
-#endif /* WSM */
/* local macros */
#ifndef MIN
} /* END OF FUNCTION PrintWorkspaceList */
#endif /* DEBUG */
-/* DO NOT ADD ANYTHING AFTER THE FOLLOWING #ENDIF !!! */
-#endif /* WSM */
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifdef WSM
/*
* (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp.
WmScreenData *pSD);
/******** End Public Function Declarations ********/
-#endif /* WSM */
-
#include <Xm/XmP.h>
#include "WmGlobal.h"
#include "WmXSMP.h"
-#ifdef WSM
-# include "WmWrkspace.h"
-# include <Dt/Session.h>
-#endif
+#include "WmWrkspace.h"
+#include <Dt/Session.h>
typedef struct _ProxyClientInfo
{
#define MAX_RESOURCE_LEN 1024
-#ifdef WSM
static char *dtwmFileName = "dtwm.db";
-#else
-static char *dtwmFileName = ".mwmclientdb";
-# define EXTRA_FN_CHARS 20
-#endif
/* Fully-qualified resource names/classes. */
static char *xPositionStr = "%s.position.x";
static char *wmCommandStr = "%s.wmCommand";
static char *wmClientMachineStr = "%s.wmClientMachine";
static char *screenStr = "%s.screen";
-#ifdef WSM
static char *workspacesStr = "%s.workspaces";
static char *iconXPosStr = "%s.iconPos.x.%s";
static char *iconYPosStr = "%s.iconPos.y.%s";
-#else
-static char *iconXPosStr = "%s.iconPos.x";
-static char *iconYPosStr = "%s.iconPos.y";
-#endif
/* Header for private database. */
static char *dbHeader = "\
static char *XSMPClientStr = "Client";
static char *proxyClientStr = "ProxyClient";
-#ifndef WSM
-static char *dbFileArgStr = "-session";
-#endif
-
/* Flag to tell us how to treat ProxyClient info. */
static Boolean smClientDBCheckpointed = False;
/* Build client database file name. */
static void buildDBFileName(char [MAXPATHLEN], Boolean);
-#ifndef WSM
-/*
- *Get clientDB name according to argv; set according to dbFileName.
- */
-static void getClientDBName(void);
-static void setClientDBName(void);
-static char **getNewRestartCmd(void);
-static void freeNewRestartCmd(char **);
-#endif /* ! WSM */
-#ifdef WSM
/* Get string of client's workspaces. */
static char *getClientWorkspaces(ClientData *);
-#endif
/* List-of-clients utilities. */
static Boolean addClientToList(ClientData ***, int *, ClientData *);
return;
}
-#ifdef WSM
/* Second phase: all other clients saved; now I can save myself. */
/* Copied from WmEvent.c. */
for (scr = 0; scr < wmGD.numScreens; scr++)
SaveResources(&wmGD.Screens[scr]);
}
}
-#endif
/*
* NEW FOR SESSION MANAGEMENT: Write private client resource database.
wmGD.clientResourceDB = newClientDB;
smClientDBCheckpointed = True;
-#ifndef WSM
- /* Set new session properties if wmGD.dbFileName is valid. */
- if (wmGD.dbFileName != (char *)NULL)
- {
- char **newRestartCmd, **ptr;
- char *newDiscardCmd[4];
- Arg args[10];
- int nargs;
-
- newDiscardCmd[0] = "rm";
- newDiscardCmd[1] = "-f";
- newDiscardCmd[2] = wmGD.dbFileName;
- newDiscardCmd[3] = (char *)NULL;
-
- newRestartCmd = getNewRestartCmd();
-
- nargs = 0;
- XtSetArg(args[nargs], XtNrestartCommand, newRestartCmd); nargs++;
- XtSetArg(args[nargs], XtNdiscardCommand, newDiscardCmd); nargs++;
- XtSetValues(wmGD.topLevelW, args, nargs);
-
- freeNewRestartCmd(newRestartCmd);
- }
-#endif /* ! WSM */
}
}
static void
buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave)
{
-#ifdef WSM
-
char *savePath = (char *)NULL;
fileNameBuf[0] = '\0';
if (fileNameBuf[0] == '\0')
strcpy(fileNameBuf, dtwmFileName);
-#else
-
- strcpy(fileNameBuf, (wmGD.dbFileName == (char *)NULL) ?
- dtwmFileName : wmGD.dbFileName);
-
-#endif
-}
-
-#ifndef WSM
-
-/*
- * See if dbFileArgStr specified on command line. Save subsequent arg;
- * if not, see if resource set; if not, put files in user's home directory.
- * NOTE: we allocate extra space for the filename so we can append numbers
- * without reallocating in setClientDBName.
- */
-static void
-getClientDBName(void)
-{
- char **argP;
-
- /* See if DB filename specified on command line. */
- wmGD.dbFileName = (char *)NULL;
-
- if (wmGD.argv != (char **)NULL)
- {
- for (argP = wmGD.argv; *argP != (char *)NULL; argP++)
- {
- if (strcmp(*argP, dbFileArgStr) == 0)
- {
- if (*(++argP) != (char *)NULL)
- {
- if ((wmGD.dbFileName =
- (char *)XtMalloc((strlen(*argP) + 1 +
- EXTRA_FN_CHARS) *
- sizeof(char)))
- != (char *)NULL)
- strcpy(wmGD.dbFileName, *argP);
- }
- break;
- }
- }
- }
-
- /* Check resource if necessary. */
- if (wmGD.dbFileName == (char *)NULL)
- {
- if (wmGD.sessionClientDB != (String)NULL)
- {
- if ((wmGD.dbFileName =
- (char *)XtMalloc((strlen(wmGD.sessionClientDB) + 1 +
- EXTRA_FN_CHARS) *
- sizeof(char)))
- != (char *)NULL)
- strcpy(wmGD.dbFileName, wmGD.sessionClientDB);
- }
- }
-
- if (wmGD.dbFileName == (char *)NULL)
- {
- char *homeDir = XmeGetHomeDirName();
-
- if ((wmGD.dbFileName =
- (char *)XtMalloc((strlen(homeDir) + strlen(dtwmFileName) + 2 +
- EXTRA_FN_CHARS) * sizeof(char)))
- != (char *)NULL)
- sprintf(wmGD.dbFileName, "%s/%s", homeDir, dtwmFileName);
- }
-}
-
-/*
- * See comments above in getClientDBName.
- */
-static void
-setClientDBName(void)
-{
- char *ptr;
-
- if (wmGD.dbFileName == (char *)NULL)
- return;
-
- /* Change trailing ".<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 *
getClientWorkspaces(ClientData *pCD)
{
return cwsP;
}
-#endif /* WSM */
-
static Boolean
addClientToList(ClientData ***cdList, int *nClients, ClientData *pCD)
{
if ((screenDiff = pCD1->pSD->screen - pCD2->pSD->screen) != 0)
return screenDiff;
-#ifdef WSM
-
/* If same screen, sort by workspace id. */
/* How do we handle clients that live in more than one workspace? */
/* For now, pick the "current" one - if not in active workspace, */
/* this will simply be the first one in the client's list. */
return (int)(pCD1->pWsList[pCD1->currentWsc].wsID -
pCD2->pWsList[pCD2->currentWsc].wsID);
-
-#else
-
- /* If no WSM, must be in same workspace if screen is same! */
- return 0;
-
-#endif
}
/*
pCD->clientFlags |= SM_Y;
}
-#ifndef WSM
- if ((resourcePtr =
- getXSMPResource(pCD, WMSAVE_ICON_X, iconXPosStr))
- != (char *)NULL)
- {
- ICON_X(pCD) = atoi(resourcePtr);
- pCD->clientFlags |= SM_ICON_X;
- }
-
- if ((resourcePtr =
- getXSMPResource(pCD, WMSAVE_ICON_Y, iconYPosStr))
- != (char *)NULL)
- {
- ICON_Y(pCD) = atoi(resourcePtr);
- pCD->clientFlags |= SM_ICON_Y;
- }
-#endif
-
if ((resourcePtr = getXSMPResource(pCD, WMSAVE_WIDTH,
widthSizeStr))
!= (char *)NULL)
pCD->clientFlags |= SM_CLIENT_STATE;
}
-#ifdef WSM
if ((workSpaceNamesP != (char **)NULL) &&
((resourcePtr = getXSMPResource(pCD, WMSAVE_WORKSPACES,
workspacesStr))
{
*workSpaceNamesP = XtNewString(resourcePtr);
}
-#endif
}
/* Always return True for XSMP clients. */
pCD->clientFlags |= SM_Y;
}
-#ifndef WSM
- if ((resourcePtr =
- getClientResource(proxyClientID, iconXPosStr))
- != (char *)NULL)
- {
- ICON_X(pCD) = atoi(resourcePtr);
- pCD->clientFlags |= SM_ICON_X;
- }
-
- if ((resourcePtr =
- getClientResource(proxyClientID, iconYPosStr))
- != (char *)NULL)
- {
- ICON_Y(pCD) = atoi(resourcePtr);
- pCD->clientFlags |= SM_ICON_Y;
- }
-#endif
-
if ((resourcePtr =
getClientResource(proxyClientID, widthSizeStr))
!= (char *)NULL)
pCD->clientFlags |= SM_CLIENT_STATE;
}
-#ifdef WSM
if ((workSpaceNamesP != (char **)NULL) &&
((resourcePtr =
getClientResource(proxyClientID, workspacesStr))
{
*workSpaceNamesP = XtNewString(resourcePtr);
}
-#endif
-
-#ifndef WSM
- /* This is done in LoadClientIconPositions() if WSM defined. */
- dbRemoveProxyClientEntry(proxyClientID);
-#endif
return True;
}
if (!pCD->pSD->useIconBox)
{
-#ifdef WSM
WmScreenData *pSD = pCD->pSD;
WmWorkspaceData *pWS;
int i;
}
}
}
-#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))
{
int clientState;
-#ifdef WSM
clientState = pCD->clientState & ~UNSEEN_STATE;
-#else
- clientState = pCD->clientState;
-#endif
fprintf(fp, initialStateStr, clientID);
fprintf(fp, strArg, (clientState == NORMAL_STATE) ?
normalStateStr : iconicStateStr);
}
-#ifdef WSM
if (SAVE_RESOURCE(pCD, WMSAVE_WORKSPACES))
{
char *clientWorkspaces = getClientWorkspaces(pCD);
XtFree(clientWorkspaces);
}
}
-#endif
return True;
}
ProxyClientInfo proxyClientInfo;
int clientX, clientY;
unsigned int clientWd, clientHt;
-#ifdef WSM
char *clientWorkspaces;
-#endif
if (!getProxyClientInfo(pCD, &proxyClientInfo))
return False;
if (!pCD->pSD->useIconBox)
{
-#ifdef WSM
WmScreenData *pSD = pCD->pSD;
WmWorkspaceData *pWS;
int i;
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, heightSizeStr, clientID);
fprintf(fp, intArg, clientHt);
-#ifdef WSM
clientState = pCD->clientState & ~UNSEEN_STATE;
-#else
- clientState = pCD->clientState;
-#endif
fprintf(fp, initialStateStr, clientID);
fprintf(fp, strArg, (clientState == NORMAL_STATE) ?
normalStateStr : iconicStateStr);
-#ifdef WSM
clientWorkspaces = getClientWorkspaces(pCD);
if (clientWorkspaces != (char *)NULL)
{
fprintf(fp, strArg, clientWorkspaces);
XtFree(clientWorkspaces);
}
-#endif
return True;
}
{
char dbFileName[MAXPATHLEN];
-#ifndef WSM
- getClientDBName();
-#endif
buildDBFileName(dbFileName, False);
return XrmGetFileDatabase(dbFileName);
/* Iterate through client list, saving */
/* appropriate resources for each. */
-#ifndef WSM
- setClientDBName();
-#endif
buildDBFileName(dbFileName, True);
if ((fp = fopen(dbFileName, "w")) == (FILE *)NULL)
return (XrmDatabase)NULL;
}
}
-#ifdef WSM
-/* This needs to be called if WSM defined; if WSM not defined, icon */
-/* positions are read at the same time as other resources. */
void
LoadClientIconPositions(ClientData *pCD)
{
}
}
}
-#endif /* WSM */
#define WMSAVE_WIDTH (1L << 2)
#define WMSAVE_HEIGHT (1L << 3)
#define WMSAVE_STATE (1L << 4)
-#ifdef WSM
-# define WMSAVE_WORKSPACES (1L << 5)
-#endif
+#define WMSAVE_WORKSPACES (1L << 5)
#define WMSAVE_ICON_X (1L << 6)
#define WMSAVE_ICON_Y (1L << 7)
extern Boolean FindClientDBMatch(ClientData *, char **);
extern Boolean GetSmClientIdClientList(ClientData ***, int *);
extern void SortClientListByWorkspace(ClientData **, int);
-#ifdef WSM
extern void LoadClientIconPositions(ClientData *);
-#endif
#endif /* _WmXSMP_h */