# define XmDefines /**/
#endif
-/* To compile without SHAPE extension, set this to -DNO_SHAPE */
#ifndef MwmDefines
# define MwmDefines /**/
#endif
are "not obvious." Excluded are hardware or OS identifiers (e.g. __ultrix),
header file include flags, and macros (e.g. ABS).
- ALTERNATE_POSTMENU
- This turns on menu posting by a simple call to XtManageChild.
- Normally, some underbar routines are called.
-
- DT_LEFT_JUSTIFY_TITLE
- This causes the text in the window titles to be left justified
- instead of centered. NOTE that WSM must also be turned on for
- this to take effect.
-
- CONCAT_TEXTLIST
- If turned on, then all members of compound text window
- properties (WM_NAME, WM_ICON_NAME) are converted to XmStrings
- and concatenated together. Normally, only the first member
- is taken.
-
- CONFIG_RELATIVE_TO_CLIENT
- If defined, then programmatic window configurations are
- absolute. Normally, the window frame offset is taken into
- account if it would have been during a user-driven config.
-
DEBUG
Turns on code that prints out error messages (specifically
protocol errors).
If defined, the session hints property is left on the root
window after being read. Normally, it is deleted.
- DISALLOW_DEEP_ICONS
- Turns off code that allows icon pixmaps of depth greater than
- one.
-
- DONT_FILTER_ICON_WINDOWS
- This disables code that tries to prevent an icon window from being
- managed as a normal toplevel window.
-
- FUTURE
- This appears to enable code that will allow item help to work
- over window icons. I suspect that this is not completely
- implemented.
-
ICCC_COMPLIANT
This enables stricter ICCCM compliance. Specifically, some
clients didn't get WM_PROTOCOLS quite right.
LARGECURSORS
Allows cursors larger than 16x16.
- MCCABE
- Conditional compile for McCabe complexity metrics.
-
MESSAGE_CAT
Enables message catalog code for local language support.
MOTIF_DEFAULT_ICON
Enables the default window icon with four buttons.
- NO
- Vestigal/experimental code for position help dialog (WmHelp.c).
-
- NO_OL_COMPAT
- If defined, then code to read and interpret Open Look window
- manager hints is removed.
-
- NO_SETPGRP
- If defined, then child processes started by f.exec are not
- put into their own process group.
-
- NO_SHAPE
- If defined, then the shape extension is not supported.
-
- NO_WMQUERY
- If defined, the code to provide the WM_QUERY functionality is
- removed.
-
- NO_DT
- If defined, then code that references the Dt library is removed.
-
- OLD
- Vestigal code in WmHelp.c
-
OLD_CODE
Vestigal code.
- OLD_COLORMAP
- Vestigal code.
-
- OLD_TAKE_FOCUS
- Vestigal code.
-
- PANACOMM
- HP Panacom division modification to support clients running
- in their X terminals.
-
- PARANOID
- If enabled, the a server grab is done around a property read.
- (This is probably not necessary.)
-
PORT_NOVFORK
Enable for systems that don't have the vfork() call.
- PORT_OLDXLIB
- Enables code that works around an old bug in XGetClassHint().
-
R2_COMPAT
Enables support for old clients that still pass window geometry
hint information in WM_NORMAL_HINTS.
- ROOT_ICON_MENU
- Experimental code to provide MS Windows-like traversal of focus
- between root icons with menus posted.
-
- SGI_FOCUS_PATCH
- Fixes a specific window focus problem.
-
UNMAP_ON_RESTART
All windows are unmapped on restart.
- _BMS
- Formerly used to denote code that interfaced to the HP Broadcast
- message server. This code has been switched over to ICCC
- messaging. The ifdef's should be removed, the code should stay.
-
- _CMDINV
- The #ifdef is somewhat vestigal--it's not even put in
- correctly. This brackets code that is partly used to send the
- ready message. It should be removed, the code should stay.
-
- _NO_PROTO
- If turned on, then pre-ANSI function prototypes are used.
-
- _NO_WM
- Enables testing code in WmPanel.c that allows it to be compiled
- with a test program outside of the window manager.
AdoptClient(pcd); /* reparent the window */
-#ifndef NO_SHAPE
/* shape the frame */
if (wmGD.hasShape && pcd->wShaped)
{
SetFrameShape (pcd);
}
-#endif /* NO_SHAPE */
return(TRUE);
XConfigureWindow (DISPLAY, pcd->client, mask, &windowChanges);
-#ifndef NO_SHAPE
/* shape our frame to match that of the client's window */
if (wmGD.hasShape)
{
&clipShaped, &xbs, &ybs, &wbs, &hbs);
pcd->wShaped = boundingShaped;
}
-#endif /* NO_SHAPE */
/* reparent the window to the base window */
XReparentWindow (DISPLAY, pcd->client, pcd->clientBaseWin,
/* regenerate the graphics */
GenerateFrameDisplayLists (pcd);
-#ifndef NO_SHAPE
if (wmGD.hasShape && pcd->wShaped)
{
SetFrameShape (pcd);
}
-#endif /* NO_SHAPE */
} /* END OF FUNCTION RegenerateClientFrame */
wmGD.gadgetDepressed = 0;
} /* END OF FUNCTION PopGadgetOut */
-#ifndef NO_SHAPE
-\f
/*************************************<->*************************************
*
* SetFrameShape (pcd)
None, ShapeSet);
}
} /* END OF FUNCTION SetFrameShape */
-#endif /* NO_SHAPE */
-\f
{
Boolean doXtDispatchEvent = True;
-#ifndef NO_SHAPE
if (pEvent->type == (wmGD.shapeEventBase+ShapeNotify))
{
HandleCShapeNotify (pCD, (XShapeEvent *)pEvent);
}
else
-#endif /* NO_SHAPE */
switch (pEvent->type)
{
case ColormapNotify:
* The client window has the colormap focus, install the
* colormap.
*/
-#ifndef OLD_COLORMAP /* colormap */
/*
* We just changed the colormaps list,
* so we need to re-run the whole thing.
*/
pCD->clientCmapFlagsInitialized = 0;
ProcessColormapList (ACTIVE_PSD, pCD);
-#else /* OSF original */
- WmInstallColormap (ACTIVE_PSD, pCD->clientColormap);
-#endif
}
}
break;
* * the menu comes unposted, the new window has input focus, but no
* client active decorations are changed.
*/
-#ifdef SGI_FOCUS_PATCH
- SetKeyboardFocus (pCD, REFRESH_LAST_FOCUS);
-#endif
}
}
if (wmGD.colormapFocusPolicy == CMAP_FOCUS_POINTER)
} /* END OF FUNCTION HandleClientMessage */
-#ifndef NO_SHAPE
-\f
/*************************************<->*************************************
*
* HandleCShapeNotify (pCD, shapeEvent)
SetFrameShape (pCD);
}
} /* END OF FUNCTION HandleCShapeNotify */
-#endif /* NO_SHAPE */
-\f
/*************************************<->*************************************
*
* GetParentWindow (window)
extern void HandleCMotionNotify (ClientData *pCD, XMotionEvent *motionEvent);
extern void HandleCPropertyNotify (ClientData *pCD,
XPropertyEvent *propertyEvent);
-#ifndef NO_SHAPE
extern void HandleCShapeNotify (ClientData *pCD, XShapeEvent *shapeEvent);
-#endif /* NO_SHAPE */
extern Boolean HandleEventsOnClientWindow (ClientData *pCD, XEvent *pEvent);
extern Boolean HandleEventsOnSpecialWindows (XEvent *pEvent);
} /* END OF FUNCTION InitColormapFocus */
-\f
-#ifndef OLD_COLORMAP
/*************************************<->*************************************
*
* ForceColormapFocus (pSD, pCD)
(pCD->clientState == MAXIMIZED_STATE)))
{
pSD->colormapFocus = pCD;
-#ifndef OLD_COLORMAP /* colormaps */
ProcessColormapList (pSD, pCD);
-#else /* OSF original */
- WmInstallColormap (pSD, pCD->clientColormap);
-#endif
}
else
{
}
} /* END OF FUNCTION ForceColormapFocus */
-#endif
-\f
/*************************************<->*************************************
*
* SetColormapFocus (pSD, pCD)
return;
}
-#ifndef OLD_COLORMAP
ForceColormapFocus (pSD, pCD);
-#else /* OSF original */
-
- if (pCD && ((pCD->clientState == NORMAL_STATE) ||
- (pCD->clientState == MAXIMIZED_STATE)))
- {
- pSD->colormapFocus = pCD;
-#ifndef OLD_COLORMAP /* colormaps */
- ProcessColormapList (pSD, pCD);
-#else /* OSF original */
- WmInstallColormap (pSD, pCD->clientColormap);
-#endif
- }
- else
- {
- /*
- * The default colormap is installed for minimized windows that have
- * the colormap focus.
- * !!! should colormaps be installed for icons with client !!!
- * !!! icon windows? should the client colormap be installed ? !!!
- */
-
- pSD->colormapFocus = NULL;
- WmInstallColormap (pSD, pSD->workspaceColormap);
- }
-#endif
-
} /* END OF FUNCTION SetColormapFocus */
-\f
/*************************************<->*************************************
*
* WmInstallColormap (pSD, colormap)
XtFree ((char *)(pCD->cmapWindows));
XtFree ((char *)(pCD->clientCmapList));
pCD->clientCmapCount = 0;
-#ifndef OLD_COLORMAP /* colormap */
XtFree ((char *)(pCD->clientCmapFlags));
pCD->clientCmapFlags = 0; /* DEBUG: */
pCD->clientCmapFlagsInitialized = 0;
-#endif
}
if (count)
extern void InitWorkspaceColormap (WmScreenData *pSD);
extern void InitColormapFocus (WmScreenData *pSD);
-#ifndef OLD_COLORMAP
extern void ForceColormapFocus (WmScreenData *pSD, ClientData *pCD);
-#endif
extern void SetColormapFocus (WmScreenData *pSD, ClientData *pCD);
extern void WmInstallColormap (WmScreenData *pSD, Colormap colormap);
extern void ResetColormapData (ClientData *pCD, Window *pWindows, int count);
doXtDispatchEvent = False;
}
}
-#ifdef ROOT_ICON_MENU
- if (wmGD.menuActive && wmGD.F_NextKeySpec)
- {
- if (((wmGD.F_NextKeySpec->state == event->state) ||
- (wmGD.F_NextKeySpec->state == NOLOCKMOD(event->state))) &&
- (wmGD.F_NextKeySpec->keycode == event->button))
- {
- /*
- * This is a key spec to traverse to the next window
- * via the keyboard.
- */
-
- UnpostMenu (wmGD.menuActive);
- doXtDispatchEvent = False;
- }
- }
- if (wmGD.menuActive && wmGD.F_PrevKeySpec)
- {
- if (((wmGD.F_PrevKeySpec->state == event->state) ||
- (wmGD.F_PrevKeySpec->state == NOLOCKMOD(event->state))) &&
- (wmGD.F_PrevKeySpec->keycode == event->button))
- {
- /*
- * This is a key spec to traverse to the previous window
- * via the keyboard.
- */
-
- UnpostMenu (wmGD.menuActive);
- doXtDispatchEvent = False;
- }
- }
-#endif /* ROOT_ICON_MENU */
}
else if (wmGD.checkHotspot &&
{
wmGD.passKeysKeySpec = keySpecs;
}
-#ifdef ROOT_ICON_MENU
- else if (keySpecs->wmFunction == F_Next_Key)
- {
- wmGD.F_NextKeySpec = keySpecs;
- }
- else if (keySpecs->wmFunction == F_Prev_Key)
- {
- wmGD.F_PrevKeySpec = keySpecs;
- }
-#endif /* ROOT_ICON_MENU */
if (!(keySpecs->wmFunction (keySpecs->wmFuncArgs,
functionClient, keyEvent)))
{
if (pSD->feedbackWin)
{
XUnmapWindow (DISPLAY, pSD->feedbackWin);
-#ifndef OLD_COLORMAP
ForceColormapFocus (ACTIVE_PSD, ACTIVE_PSD->colormapFocus);
-#endif
}
pSD->fbStyle = FB_OFF;
}
#endif
{
-#ifndef NO_SETPGRP
#if defined(SVR4) || defined(__linux__)
setsid();
#else
setpgrp(tpid, tpid);
#endif /* SYSV */
#endif /* SVR4 */
-#endif /* NO_SETPGRP */
/*
* Clean up window manager resources.
Boolean F_Next_Key (String args, ClientData *pCD, XEvent *event)
{
-#ifdef ROOT_ICON_MENU
- Boolean focused = False;
-#endif /* ROOT_ICON_MENU */
if (wmGD.keyboardFocusPolicy == KEYBOARD_FOCUS_EXPLICIT)
{
-#ifdef ROOT_ICON_MENU
- focused =
-#endif /* ROOT_ICON_MENU */
FocusNextWindow ((unsigned long)args,
GetFunctionTimestamp ((XButtonEvent *)event));
-#ifdef ROOT_ICON_MENU
- if (focused && wmGD.iconClick &&
- event && event->type == KeyPress &&
- wmGD.nextKeyboardFocus &&
- wmGD.nextKeyboardFocus->clientState == MINIMIZED_STATE &&
- !P_ICON_BOX(wmGD.nextKeyboardFocus))
- {
- /*
- * Post system menu from the icon
- */
- F_Post_SMenu (args, wmGD.nextKeyboardFocus, event);
- return (False);
- }
-#endif /* ROOT_ICON_MENU */
}
return (True);
pCD->clientColormap = pCD->clientCmapList[pCD->clientCmapIndex];
if (ACTIVE_PSD->colormapFocus == pCD)
{
-#ifndef OLD_COLORMAP /* colormap */
/*
* We just re-ordered the colormaps list,
* so we need to re-run the whole thing.
*/
pCD->clientCmapFlagsInitialized = 0;
ProcessColormapList (ACTIVE_PSD, pCD);
-#else /* OSF original */
- WmInstallColormap (ACTIVE_PSD, pCD->clientColormap);
-#endif
}
}
Boolean F_Prev_Key (String args, ClientData *pCD, XEvent *event)
{
-#ifdef ROOT_ICON_MENU
- Boolean focused = False;
-#endif /* ROOT_ICON_MENU */
if (wmGD.keyboardFocusPolicy == KEYBOARD_FOCUS_EXPLICIT)
{
-#ifdef ROOT_ICON_MENU
- focused =
-#endif /* ROOT_ICON_MENU */
FocusPrevWindow ((unsigned long)args,
GetFunctionTimestamp ((XButtonEvent *)event));
-#ifdef ROOT_ICON_MENU
- if (focused && wmGD.iconClick &&
- event && event->type == KeyPress &&
- wmGD.nextKeyboardFocus &&
- wmGD.nextKeyboardFocus->clientState == MINIMIZED_STATE &&
- !P_ICON_BOX(wmGD.nextKeyboardFocus))
- {
- /*
- * Post system menu from the icon
- */
- F_Post_SMenu (args, wmGD.nextKeyboardFocus, event);
- return (False);
- }
-#endif /* ROOT_ICON_MENU */
-
}
return (True);
pCD->clientColormap = pCD->clientCmapList[pCD->clientCmapIndex];
if (ACTIVE_PSD->colormapFocus == pCD)
{
-#ifndef OLD_COLORMAP /* colormap */
/*
* We just re-ordered the colormaps list,
* so we need to re-run the whole thing.
*/
pCD->clientCmapFlagsInitialized = 0;
ProcessColormapList (ACTIVE_PSD, pCD);
-#else /* OSF original */
- WmInstallColormap (ACTIVE_PSD, pCD->clientColormap);
-#endif
}
}
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#ifndef NO_SHAPE
#include <X11/extensions/shape.h>
-#endif /* NO_SHAPE */
#include <X11/IntrinsicP.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
Colormap *clientCmapList;
int clientCmapCount; /* len of clientCmapList */
int clientCmapIndex; /* current cmap in list */
-#ifndef OLD_COLORMAP /* colormap */
int *clientCmapFlags; /* installed, uninstalled */
Bool clientCmapFlagsInitialized; /* Are clientCmapFlags valid? */
-#endif
/* associated window data: */
ClientListEntry clientEntry;
ClientListEntry iconEntry;
XID windowGroup; /* WM_HINTS field */
-#ifndef NO_OL_COMPAT
Boolean bPseudoTransient; /* transientFor window group */
-#endif /* NO_OL_COMPAT */
IconBoxData *thisIconBox; /* icon box data for self */
/* if this is an icon box */
Context grabContext; /* used to support icon box */
Window attachWindow; /* _DT_WM_HINTS */
SlideDirection slideDirection; /* slide-up direction */
SlideOutRec *pSOR; /* slide-out record */
-#ifndef NO_SHAPE
short wShaped; /* this window has a bounding shape */
-#endif /* NO_SHAPE */
int usePPosition; /* indicate whether to use PPosition */
Atom xa_DT_WM_LOCK_DISPLAY;
Atom xa_DT_WM_READY;
-#ifndef NO_OL_COMPAT
Atom xa_OL_WIN_ATTR;
Atom xa_OL_DECOR_RESIZE;
Atom xa_OL_DECOR_HEADER;
Atom xa_OL_PIN_OUT;
Atom xa_OL_MENU_LIMITED;
Atom xa_OL_MENU_FULL;
-#endif /* NO_OL_COMPAT */
/* mwm specific appearance and behavior resources and data: */
Window attributesWindow;
XWindowAttributes windowAttributes;
-#ifndef NO_SHAPE
Boolean hasShape; /* server supports Shape extension */
int shapeEventBase, shapeErrorBase;
-#endif /* NO_SHAPE */
/* Need to replay enter notify events on windows with the
pointer that used to be modalized. This is for pointer focus. */
int replayEnterEvent;
char * theHelpString = (char *)client_data;
pSD = WmScreenDataFromWidget(theWidget);
-#ifdef OLD
- if (XtDisplay(theWidget) == DISPLAY)
- {
- WmDtDisplayTopic(pSD->screenTopLevelW1,
- NULL, theHelpString,
- DtHELP_TYPE_STRING, theWidget, True,
- NULL, 0, NULL, False, NULL);
- }
- else
- {
- WmDtDisplayTopic(theWidget, NULL, theHelpString,
- DtHELP_TYPE_STRING, theWidget, True,
- NULL, 0, NULL, False, NULL);
-
- }
-#endif /* OLD */
WmDtDisplayTopic(pSD->screenTopLevelW1,
NULL, theHelpString,
DtHELP_TYPE_DYNAMIC_STRING, theWidget, True,
if (w)
{
-#ifdef OLD
- n = 0;
- XtSetArg (setArgs[n], XmNx, 0); n++;
- XtSetArg (setArgs[n], XmNy, 0); n++;
-#endif /* OLD */
-
/*
* Center the Version Dialog on the screen
*/
Widget parent)
{
-#ifndef NO_DT
Arg setArgs[10];
Arg setArgs2[5];
XtSetValues(versionWidget, setArgs, n);
}
XtManageChild(versionWidget);
-
-#endif /* NO_DT */
-
} /* END OF FUNCTION WmDtHelpOnVersion */
DisplayTopicInfo *displayTopicInfo)
{
-#ifndef NO_DT
Arg setArgs[10];
Arg smallArgs[2];
ArgList argsNew;
}
} /* if n is still 0, we did not find a useful help type */
-#endif /* NO_DT */
} /* END OF FUNCTION WmDtDisplayTopic */
RestoreHelpDialogs(
WmScreenData *pSD)
{
-#ifndef NO_DT
XrmDatabase db;
XrmName xrm_name[5];
XrmRepresentation rep_type;
XrmDestroyDatabase(db);
}
-#endif /* NO_DT */
-
return True;
} /* END OF FUNCTION RestoreHelpDialogs */
SaveHelpResources(
WmScreenData *pSD)
{
-#ifndef NO_DT
PtrWsDtHelpData pHelp;
CacheListStruct *pTemp;
Arg getArgs[20];
_DtAddToResource (DISPLAY, data);
XtFree(data);
}
-#endif /* NO_DT */
} /* END OF FUNCTION SaveHelpResources */
GetSystemMenuPosition (pHelp->pCDforClient,
&x, &y, height,
(Context)0);
-#ifdef NO
- if(y < pHelp->pCDforClient->frameInfo.y)
- {
- if (!XFindContext (DISPLAY, XtWindow(pHelp->shell),
- wmGD.windowContextType,
- (caddr_t *)&pCDforHelp))
- {
- if (wmGD.positionIsFrame)
- {
-/* x = x - pCDforHelp->clientOffset.x;*/
- y = y - pCDforHelp->clientOffset.x;
- }
- }
- else
- {
- y = y - (2 * pSD->frameBorderWidth);
- }
- }
-#endif
}
else
{
XtSetArg (al[ac], XmNwindowGroup, &wGroup); ac++;
XtGetValues (pHelp->shell, al, ac);
-#ifdef FUTURE
- if (pHelp->contextForClient != F_CONTEXT_ICON)
- {
- XtSetArg (args[n], XmNwindowGroup,
- pHelp->pCDforClient->client);
- n++;
- }
- else if (pSD->useIconBox && P_ICON_BOX(pHelp->pCDforClient))
- {
- XtSetArg (args[n], XmNwindowGroup,
- P_ICON_BOX(pHelp->pCDforClient)->pCD_iconBox->client);
- n++;
- }
- else
- {
- XtSetArg (args[n], XmNwindowGroup, 0); n++;
- }
-#else /* FUTURE */
if (wGroup != pHelp->pCDforClient->client)
{
/*
}
XtSetArg (args[n], XmNwindowGroup, pHelp->pCDforClient->client); n++;
-#endif /* FUTURE */
}
else
{
return ((Pixmap)NULL);
}
-#ifdef DISALLOW_DEEP_ICONS
- if (depth != 1)
- {
- Warning (((char *)GETMESSAGE(38, 10, "Color icon pixmap not supported")));
- return ((Pixmap)NULL);
- }
-#endif
-
/*
* Color the bitmap, center it in a pixmap ....
*/
XChangeGC (DISPLAY, imageGC, gc_mask, &gcv);
/* copy the bitmap to the pixmap */
-#ifndef DISALLOW_DEEP_ICONS
if ((depth > 1) &&
(depth == DefaultDepth(DISPLAY, pSD->screen)))
{
#endif /* NO_CLIP_CENTER */
}
else
-#endif /* DISALLOW_DEEP_ICONS */
#ifndef NO_CLIP_CENTER
XCopyPlane (DISPLAY, bitmap, iconPixmap, imageGC, src_x, src_y, width,
height, dest_x, dest_y, 1L);
#include "WmICCC.h"
#define DTWM_NEED_FNTPL
#include "WmIBitmap.h"
-#ifndef NO_OL_COMPAT
#include "WmOL.h"
-#endif /* NO_OL_COMPAT */
#include <X11/Xos.h>
#include <X11/cursorfont.h>
#include <Xm/Xm.h>
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];
-#ifndef NO_OL_COMPAT
InitOLCompat();
-#endif /* NO_OL_COMPAT */
-#ifndef NO_SHAPE
wmGD.hasShape = XShapeQueryExtension (DISPLAY,
&wmGD.shapeEventBase,
&wmGD.shapeErrorBase);
-#endif /* NO_SHAPE */
wmGD.replayEnterEvent = False;
wmGD.menuActive = NULL;
_DtGetSmWindow(DISPLAY,
RootWindow(DISPLAY, 0),
&wmGD.dtSmWindow) ;
-#ifdef PANACOMM
- /*
- * If this is the first screen we've managed,
- * tell the session manager we're ready
- */
- if (!processedGlobalResources)
- {
- SendClientMsg( wmGD.dtSmWindow,
- (long) wmGD.xa_DT_SM_WM_PROTOCOL,
- (long) wmGD.xa_DT_WM_READY,
- CurrentTime, NULL, 0);
- }
-#endif /* PANACOMM */
/* create topmost shell (application shell) */
argnum = 0;
if (XQueryTree (DISPLAY, pSD->rootWindow, &root, &parent, &clients,
&nclients))
{
-#ifndef DONT_FILTER_ICON_WINDOWS
/*
* Filter out icon windows so they don't get managed as a client
* window. Icon windows will be process in SetupClientIconWindow().
}
}
}
-#endif
for (i = 0; i < nclients; i++)
{
}
XtFree ((char *) (pCD->cmapWindows));
XtFree ((char *) (pCD->clientCmapList));
-#ifndef OLD_COLORMAP /* colormap */
XtFree ((char *) (pCD->clientCmapFlags));
-#endif
}
/*
passedInEvent->xbutton.time);
}
-#ifndef ALTERNATE_POSTMENU
-
XtManageChild (menuSpec->menuWidget);
-#else
- if (flags & POST_STICKY)
- {
- _XmSetPopupMenuClick(menuSpec->menuWidget, True);
- }
- else
- {
- _XmSetPopupMenuClick(menuSpec->menuWidget, False);
- }
-
- /*
- * Post the menu by calling the convenience routine that verifies
- * the button event, updates the Xt timestamp, and finally manages
- * the pane.
- */
-
- _XmPostPopupMenu( menuSpec->menuWidget, passedInEvent);
-#endif
-
-
/*
* set the traversal state.
*/
*/
{
XtUnmanageChild (menuSpec->menuWidget);
-#ifndef OLD_COLORMAP
ForceColormapFocus (ACTIVE_PSD, ACTIVE_PSD->colormapFocus);
-#endif
}
} /* END OF FUNCTION UnpostMenu */
PopGadgetOut(wmGD.gadgetClient, FRAME_SYSTEM);
}
-#ifndef OLD_COLORMAP
ForceColormapFocus (ACTIVE_PSD, ACTIVE_PSD->colormapFocus);
-#endif
PullExposureEvents();
} /* END OF FUNCTION UnmapCallback */
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-#ifndef NO_OL_COMPAT
/*
* (c) Copyright 1989 Sun Microsystems, Inc.
* (c) Copyright 1993 HEWLETT-PACKARD COMPANY
} /* END OF FUNCTION ProcessOLDecoration */
-#endif /* NO_OL_COMPAT */
#ifndef _WM_OL_H
#define _WM_OL_H
-#ifndef NO_OL_COMPAT
/*
* Property Names
#define GetOLDecorDel(pcd,ptr) (GetOLDecorFlags(pcd,wmGD.xa_OL_DECOR_DEL,ptr))
-#endif /* NO_OL_COMPAT */
/* Do not add anything after the following #endif */
#endif /* _WM_OL_H */
XWindowAttributes wAttributes;
ClientData *pcd;
XSetWindowAttributes sAttributes;
-#ifndef OLD_COLORMAP /* colormaps */
int *pCmapFlags;
-#endif
/*
XtFree ((char *)pWindows);
}
}
-#ifndef OLD_COLORMAP /* colormap */
/* Is the above OSF code a bug -- allocates one extra byte, rather */
/* than one extra element, for the top window if needed? */
else if ( ! (pCmapFlags = (int *)XtCalloc(nitems+1,sizeof(int)))) {
Warning (((char *)GETMESSAGE(54, 4, "Insufficient memory for window manager flags")));
XtFree ((char *)pWindows); XtFree ((char *)pColormaps);
}
-#endif
else
{
/*
pCD->cmapWindows = pWindows;
pCD->clientCmapList = pColormaps;
pCD->clientCmapIndex = 0;
-#ifndef OLD_COLORMAP /* colormap */
pCD->clientCmapFlags = pCmapFlags;
-#endif
}
else
{
pCD->clientCmapCount = 0;
XtFree ((char *)pWindows);
XtFree ((char *)pColormaps);
-#ifndef OLD_COLORMAP /* colormap */
XtFree((char *)pCmapFlags);
-#endif
}
}
}
*/
if (property == NULL)
{
-#ifdef PARANOID
- /*
- * Lock down the server to prevent changes to this
- * property while we "edit" it.
- */
- XGrabServer(DISPLAY);
-#endif /* PARANOID */
-
/*
* Read the property and delete it.
*/
&actualType, &actualFormat, &nitems,
&leftover, (unsigned char **)&property);
-#ifdef PARANOID
- /* Give the server back */
- XUngrabServer(DISPLAY);
-#endif /* PARANOID */
-
/*
* Validate the property that we've read
*/
#include "WmKeyFocus.h"
#include "WmMenu.h"
#include "WmWinInfo.h"
-#ifndef NO_WMQUERY
#include "WmEvent.h"
-#endif /* NO_WMQUERY */
#include "WmPanelP.h"
/*
*/
#include "WmProtocol.h"
-#ifndef NO_WMQUERY
static Boolean wmq_convert (Widget w, Atom *pSelection, Atom *pTarget,
Atom *pType_return, XtPointer *pValue_return, unsigned long *pLength_return,
int *pFormat_return);
static void wmq_done (Widget w, Atom *pSelection, Atom *pTarget);
static void wmq_lose (Widget w, Atom *pSelection);
static void wmq_bump_xids(void);
-#endif /* NO_WMQUERY */
/*
* Global Variables:
*/
-#ifndef NO_WMQUERY
Atom *xa_WM_QUERY = NULL;
Atom xa_WM_POINTER_WINDOW;
Atom xa_WM_CLIENT_WINDOW;
XID *pXids = NULL;
int numXids = -1;
int curXids = 0;
-#endif /* NO_WMQUERY */
\f
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(NO_WMQUERY)
XA_MOTIF_WM_CLIENT_WINDOW, XA_MOTIF_WM_POINTER_WINDOW,
XA_MOTIF_WM_ALL_CLIENTS,
-#endif
XA_COMPOUND_TEXT, NUM_ATOMS };
static char *atom_names[] = {
_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(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_CLIENT_WINDOW", "_MOTIF_WM_POINTER_WINDOW",
"_MOTIF_WM_ALL_CLIENTS",
# endif
-#endif
"COMPOUND_TEXT"
};
wmGD.xa_COMPOUND_TEXT = atoms[XA_COMPOUND_TEXT];
-#ifndef NO_WMQUERY
if (!(xa_WM_QUERY = (Atom *) XtMalloc (wmGD.numScreens * (sizeof (Atom)))))
{
Warning (((char *)GETMESSAGE(56, 2, "Insufficient memory to XInternAtom _MOTIF_WM_QUERY_nn")));
xa_WM_CLIENT_WINDOW = atoms[XA_MOTIF_WM_CLIENT_WINDOW];
xa_WM_POINTER_WINDOW = atoms[XA_MOTIF_WM_POINTER_WINDOW];
xa_WM_ALL_CLIENTS = atoms[XA_MOTIF_WM_ALL_CLIENTS];
-#endif /* NO_WMQUERY */
-
/*
* Setup the icon size property on the root window.
}
}
-#ifndef NO_WMQUERY
/*
* Assert ownership of the WM_QUERY selection
*/
}
}
}
-#endif /* NO_WMQUERY */
-
-
} /* END OF FUNCTION SetupWmICCC */
} /* END OF FUNCTION TimeoutProc */
-#ifndef NO_WMQUERY
-\f
/*************************************<->*************************************
*
* Boolean wmq_convert (w, pSelection, pTarget, pType_return,
}
}
-#endif /* NO_WMQUERY */
char defaultSystemMenuName[] = "DefaultWindowMenu";
#endif /* NO_MESSAGE_CATALOG */
char builtinSystemMenuName[] = "_MwmWindowMenu_";
-#ifndef MCCABE
#define BUILTINSYSTEMMENU "_MwmWindowMenu_\n\
{\n\
Restore _R Alt<Key>F5 f.restore\n\
} /* END OF FUNCTION InitBuiltinSystemMenu */
#endif /* NO_MESSAGE_CATALOG */
-#else /* MCCABE */
-char builtinSystemMenu[];
-#endif /* MCCABE */
#define HARD_CODED_PRIMARY 3
char defaultRootMenuName[] = "DefaultRootMenu";
char builtinRootMenuName[] = "_MwmRootMenu_";
-#ifndef MCCABE
#define BUILTINROOTMENU "DefaultRootMenu\n\
{\n\
\"Root Menu\" f.title\n\
\"Restart...\" f.restart\n\
}";
char builtinRootMenu[] = BUILTINROOTMENU
-#else /* MCCABE */
-char builtinRootMenu[];
-#endif /* MCCABE */
/* builtin key bindings specification */
char defaultKeyBindingsName[] = "DefaultKeyBindings";
char builtinKeyBindingsName[] = "_MwmKeyBindings_";
-#ifndef MCCABE
#define BUILTINKEYBINDINGS "_MwmKeyBindings_\n\
{\n\
Shift<Key>Escape window|icon f.post_wmenu\n\
}";
char builtinKeyBindings[] = BUILTINKEYBINDINGS
-#else
-char builtinKeyBindings[];
-#endif
-
/*
* NOTE: Default Toggle Behavior key bindings. There are TWO key bindings as
* of 1.1.4 and 1.2. Make sure you make any modify builtinKeyBindings (above)
*/
char behaviorKeyBindingName[] = "_MwmBehaviorKey_";
-#ifndef MCCABE
#define BEHAVIORKEYBINDINGS "_MwmBehaviorKey_\n\
{\n\
Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior\n\
}";
char behaviorKeyBindings[] = BEHAVIORKEYBINDINGS
-#else
-char behaviorKeyBindings[];
-#endif
-
-
/* default button bindings specification */
/* note - the %s will be replaced by the real DefaultRootMenu */
char defaultButtonBindingsName[] = "DefaultButtonBindings";
char builtinButtonBindingsName[] = "_MwmButtonBindings_";
-#ifndef MCCABE
# define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
{\n\
<Btn1Down> icon|frame f.raise\n\
}";
char builtinButtonBindings[] = BUILTINBUTTONBINDINGS
-#else
-char builtinButtonBindings[];
-#endif
-
-
static ClientData *_pCD;
static String _defaultBackground;
static String _defaultActiveBackground;
* unexpectedly.
*/
-#ifndef CONFIG_RELATIVE_TO_CLIENT
-
tmpX = resizeX;
tmpY = resizeY;
/* Use dummy x,y so we don't add frame offset to client location */
FrameToClient (pcd, &tmpX, &tmpY, &resizeWidth, &resizeHeight);
-#else
- FrameToClient (pcd, &resizeX, &resizeY, &resizeWidth, &resizeHeight);
-#endif
tmpWidth = resizeWidth;
tmpHeight = resizeHeight;
else { /* assume normal window frame */
/* reconfigure the window(s) */
ProcessNewConfiguration (pcd,
-#ifndef CONFIG_RELATIVE_TO_CLIENT
moveX,
moveY,
-#else
- moveX + offsetX,
- moveY + offsetY,
-#endif
(unsigned int)
(moveWidth - 2*offsetX),
(unsigned int)
}
}
-#ifndef CONFIG_RELATIVE_TO_CLIENT
/*
* If positionIsFrame or user initiated configuration request,
* then adjust client position to by frame_width and frame_height.
xoff = pCD->clientOffset.x;
yoff = pCD->clientOffset.y;
}
-#endif
/*
* Changes in position update maximum geometry on maximized windows
pCD->piconBottomShadows = NULL;
pCD->internalBevel = (wmGD.frameStyle == WmSLAB) ? 0 :
FRAME_INTERNAL_SHADOW_WIDTH;
-#ifndef NO_OL_COMPAT
pCD->bPseudoTransient = False;
-#endif /* NO_OL_COMPAT */
pCD->maxWidth = pCD->maxWidthLimit = BIGSIZE;
pCD->maxHeight = pCD->maxHeightLimit = BIGSIZE;
*/
pCD->numInhabited = 0;
pCD->windowGroup = 0L;
-#ifndef NO_OL_COMPAT
pCD->bPseudoTransient = False;
-#endif /* NO_OL_COMPAT */
-
/*
* Set up _MWM_HINTS data.
XClassHint classHint;
-#ifdef PORT_OLDXLIB
- classHint.res_class = "";
- classHint.res_name = "";
- XGetClassHint (DISPLAY, pCD->client, &classHint);
-#else
if ((HasProperty (pCD, XA_WM_CLASS)) &&
(XGetClassHint (DISPLAY, pCD->client, &classHint)))
-#endif
{
/* the WM_CLASS property exists for the client window */
pCD->clientClass = classHint.res_class;
if (firstTime)
{
-#ifndef NO_OL_COMPAT
ClientData *leader;
Atom *pIDs;
unsigned int numIDs = 0;
{
pCD->windowGroup = 0L;
}
-#endif /* NO_OL_COMPAT */
/*
* The window manger does not do anything with the input hint. Input
* always goes to the selected window.
}
}
}
-
-#ifdef NO_OL_COMPAT
- /*
- * Save the window group.
- */
-
- if (flags & WindowGroupHint)
- {
- pCD->windowGroup = pXWMHints->window_group;
- }
- else
- {
- pCD->windowGroup = 0L;
- }
-#endif /* NO_OL_COMPAT */
}
else /* not the first time the hints are processed */
{
xms_return = xmsTable[0];
for (i = 1; i < nStrings; i++)
{
-#ifdef CONCAT_TEXTLIST
- xms_return = XmStringConcatAndFree(xms_return, xmsTable[i]);
-#else
XmStringFree(xmsTable[i]);
-#endif /* CONCAT_TEXTLIST */
}
XtFree((char *)xmsTable);
XFree ((char*)pHints);
}
-#ifndef NO_OL_COMPAT
else
{
ProcessOLDecoration (pCD);
}
-#endif /* NO_OL_COMPAT */
/*
* If primary window can't move between workspaces, then