* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
*/
/*
* Motif Release 1.2.4
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmFunction.c /main/19 1998/04/20 13:00:48 mgreess $"
-#endif
-#endif
+*/
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 HEWLETT-PACKARD COMPANY
* (c) Copyright 1993, 1994 International Business Machines Corp.
*/
#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 */
-#ifdef PANELIST
#include <Dt/DtStrDefs.h>
#include "WmPanelP.h"
#include "WmSignal.h"
-#endif /* PANELIST */
+#include "WmManage.h"
/*
* include extern functions
*/
#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(USL) || defined(__uxp__) || defined(linux)) && !defined(_NFILE)
+#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)
* is to restack the dirty transient relative to the second to the
* top transient. This function is used to support freeFamily stacking.
*/
-ClientData * FindSecondToTopTransient (pcd)
-ClientData *pcd;
+ClientData * FindSecondToTopTransient (ClientData *pcd)
{
ClientData *pcdNext;
static ClientData *second;
#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 */
-#ifdef PANELIST
if (pCD->pECD)
{
/*
return;
}
else
-#else /* PANELIST */
-#endif /* PANELIST */
-#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 status;
int pid;
- int w;
-#ifndef WSM
- void (*intStat) ();
- void (*quitStat) ();
-#endif /* WSM */
char *shell;
char *shellname;
putenv(wmGD.pActiveSD->displayString);
}
-#ifdef PANELIST
if (wmGD.dtSD)
{
/*
*/
WmFrontPanelSetBusy (True);
}
-#endif /* PANELIST */
/*
* Fork a process to exec a shell to run the specified command:
{
#ifndef NO_SETPGRP
-#if defined(SVR4) || defined(__OSF1__) || defined(__osf__) || defined(linux)
+#if defined(SVR4) || defined(__linux__)
setsid();
#else
#ifdef SYSV
#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
directory, then we must call execlp and not execl
*/
shellname = shell;
- execlp (shell, shellname, "-c", args, 0);
+ execlp (shell, shellname, "-c", args, NULL);
}
else
{
shellname++;
- execl (shell, shellname, "-c", args, 0);
+ execl (shell, shellname, "-c", args, NULL);
}
}
* Try /bin/sh .
*/
#ifdef SVR4
- execl ("/usr/bin/sh", "sh", "-c", args, 0);
+ execl ("/usr/bin/sh", "sh", "-c", args, NULL);
#else
- execl ("/bin/sh", "sh", "-c", args, 0);
+ execl ("/bin/sh", "sh", "-c", args, NULL);
#endif
* 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)
{
}
pNextEntry = pNextEntry->prevSibling;
}
-#if defined(PANELIST)
UnParentControls (&wmGD.Screens[scr], False);
-#endif /* PANELIST */
-#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)
Boolean
F_Help (String args, ClientData *pCD, XEvent *event)
{
-#ifdef PANELIST
Boolean rval;
rval = WmDtHelp(args);
return (rval);
-#endif /* PANELIST */
-
-
} /* END OF FUNCTION F_Help */
\f
Boolean
F_Help_Mode (String args, ClientData *pCD, XEvent *event)
{
-#ifdef PANELIST
/*
* Help mode event processing interferes
* with slide up windows. Don't continue
(void) WmDtHelpMode();
}
return (False);
-#endif /* PANELIST */
-
} /* END OF FUNCTION F_Help_Mode */
-#endif /* WSM */
-\f
+
/******************************<->*************************************
*
* F_Next_Key (args, pCD, event)
} /* END OF FUNCTION F_Prev_Key */
-#ifdef PANELIST
-\f
/***********************<->*************************************
*
* F_Post_FpMenu (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
{
if (!bWaiting)
{
- long clientTimeout;
+ long clientTimeout = 0;
Arg al[5];
int ac;
WmPanelistObject pPanelist;
return (True);
} /* END OF FUNCTION F_Push_Recall */
-#endif /* PANELIST */
\f
/*************************************<->*************************************
*
*************************************<->***********************************/
-Boolean F_Pass_Key (args, pCD, event)
- String args;
- ClientData *pCD;
- XEvent *event;
-
+Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event)
{
if (wmGD.passKeysActive)
{
{
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)))
Boolean F_Normalize_And_Raise (String args, ClientData *pCD, XEvent *event)
{
-#ifdef PANELIST
WmScreenData *pSD;
WmWorkspaceData *pWS;
return (False);
}
}
-#endif /* PANELIST */
+
if (pCD)
{
if (pCD->clientState == MINIMIZED_STATE)
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))
-/*************************************<->*************************************
- *
- * F_Post_RMenu (args, pCD, event)
- *
- *
- * Description:
- * -----------
- * This is the window manager function handler for posting the
- * root window menu.
- * This function can only be invoked by a key event.
- *
- *************************************<->***********************************/
-
-Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event)
-{
- MenuSpec *rootMenu;
- unsigned int button = NoButton;
- int x, y;
- long flags = POST_AT_XY;
- Window rwin, cwin;
- int winx, winy;
- unsigned int mask;
-
-
- if ((event->type == KeyPress) || (event->type == KeyRelease))
- {
-
- /* Find the root menu spec */
- for (rootMenu = ACTIVE_PSD->menuSpecs;
- rootMenu != (MenuSpec *) NULL;
- rootMenu = rootMenu->nextMenuSpec)
- {
- if (strcmp(rootMenu->name, ACTIVE_PSD->rootMenu) == 0)
- break;
- }
-
- /* If we couldn't find the root menu, then do nothing. */
- if (rootMenu == (MenuSpec *) NULL)
- return (False);
-
- else
- {
- XQueryPointer(DISPLAY, ACTIVE_ROOT,
- &rwin, &cwin, &x, &y, &winx, &winy, &mask);
-
- PostMenu (rootMenu, NULL, x, y, NoButton, F_CONTEXT_ROOT,
- flags, event);
- }
- }
-
- return (False);
-
-} /* END OF FUNCTION F_Post_RMenu */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
/*************************************<->*************************************
*
* F_Post_SMenu (args, pCD, event)
}
else if (event->type == ButtonPress)
{
-#ifdef WSM
/*
* Root menu, if posted with button press, then
* set up to handle root menu click to make the menu
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);
Boolean do_save_yourself =
pCD->protocolFlags & PROTOCOL_WM_SAVE_YOURSELF;
-#ifdef PANELIST
if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
{
Widget wPanel;
IconBoxPopUp (pCD->pSD->pActiveWS, False);
}
}
- else
-#endif /* PANELIST */
- if (!do_delete_window && !do_save_yourself)
+ else if (!do_delete_window && !do_save_yourself)
{
XKillClient (DISPLAY, pCD->client);
}
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.
*/
}
pNextEntry = pNextEntry->prevSibling;
}
-#if defined(PANELIST)
UnParentControls (&wmGD.Screens[scr], True);
-#endif /* PANELIST */
}
}
-#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)
} /* END OF FUNCTION DeFrameClient */
-#if defined(PANELIST)
-\f
/******************************<->*************************************
*
* F_Toggle_Front_Panel (args, pCD, event)
return (True);
} /* END OF FUNCTION F_Version */
-#endif /* PANELIST */
\f
/******************************<->*************************************
Boolean F_Send_Msg (String args, ClientData *pCD, XEvent *event)
{
- register int i;
+ int i;
if (pCD && pCD->mwmMessagesCount)
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 */
-#ifdef PANELIST
if (pCD->pECD)
{
/*
*/
return;
}
- else
-#else /* PANELIST */
-#endif /* PANELIST */
-#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))
-/*************************************<->*************************************
- *
- * F_InvokeCommand (args, pCD, event)
- *
- *
- * Description:
- * -----------
- * This is the window manager function for invoking client inserted menu
- * commands.
- *
- *************************************<->***********************************/
-
-Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event)
-{
- CARD32 commandID, clientWindow;
- Atom notifySelection;
-
- if (args == (String) NULL) return(FALSE);
-
- if (sscanf(args, "%d %d %ld", &commandID, &clientWindow,
- ¬ifySelection) != 3)
- return(FALSE);
-
- SendInvokeMessage(commandID,
- (pCD == (ClientData *) NULL ? 0 : pCD->client),
- notifySelection,
- LastTime());
-
- return (True);
-} /* END OF FUNCTION F_InvokeCommand */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
/*************************************<->*************************************
*
* GetFunctionTimestamp (pEvent)
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 */
-
-
-