mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtwm: Remove define MWM_QATS_PROTOCOL that has to be always off for dtwm, obsolete, unavailable mwm test suite support
This commit is contained in:
parent
d5273f121b
commit
de7e0dfcdd
16 changed files with 11 additions and 4638 deletions
|
@ -1210,9 +1210,6 @@ Boolean HandleKeyPress (XKeyEvent *keyEvent,
|
|||
}
|
||||
|
||||
if ((keySpecs->wmFunction == F_Menu) ||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
(keySpecs->wmFunction == F_Post_RMenu) ||
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
(keySpecs->wmFunction == F_Post_SMenu))
|
||||
{
|
||||
wmGD.menuUnpostKeySpec = keySpecs; /* menu unpost key spec */
|
||||
|
@ -2556,41 +2553,6 @@ Time GetTimestamp (void)
|
|||
|
||||
} /* END OF FUNCTION GetTimestamp */
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* LastTime ()
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* This function is used to provide a timestamp for use with X calls that
|
||||
* require a timestamp. It returns the last timestamp processed if one
|
||||
* exists or it generates a new one.
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* none
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
* Return = a timestamp value - NOT CurrentTime
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
Time LastTime ()
|
||||
{
|
||||
Time evTime;
|
||||
|
||||
if (! (evTime = XtLastTimestampProcessed(DISPLAY)) )
|
||||
evTime = GetTimestamp();
|
||||
|
||||
return (evTime);
|
||||
}
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* PullExposureEvents ()
|
||||
|
|
|
@ -38,9 +38,6 @@ extern Boolean CheckForButtonAction (XButtonEvent *buttonEvent,
|
|||
Context context, Context subContext,
|
||||
ClientData *pCD);
|
||||
extern Time GetTimestamp (void);
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
extern Time LastTime (void);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
extern Boolean HandleKeyPress (XKeyEvent *keyEvent, KeySpec *keySpecs,
|
||||
Boolean checkContext, Context context,
|
||||
Boolean onlyFirst, ClientData *pCD);
|
||||
|
|
|
@ -2791,64 +2791,6 @@ Boolean F_Pack_Icons (String args, ClientData *pCD, XEvent *event)
|
|||
|
||||
} /* END OF FUNCTION F_Pack_Icons */
|
||||
|
||||
|
||||
#if (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(MWM_QATS_PROTOCOL) */
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* F_Post_SMenu (args, pCD, event)
|
||||
|
@ -4352,41 +4294,6 @@ Boolean F_Screen (String args, ClientData *pCD, XEvent *event)
|
|||
}
|
||||
|
||||
|
||||
|
||||
#if (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(MWM_QATS_PROTOCOL) */
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* GetFunctionTimestamp (pEvent)
|
||||
|
|
|
@ -96,10 +96,6 @@ extern Boolean F_Workspace_Presence (String args, ClientData *pCD,
|
|||
#if defined(DEBUG)
|
||||
extern Boolean F_ZZ_Debug (String, ClientData *, XEvent *);
|
||||
#endif /* DEBUG */
|
||||
#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(MWM_QATS_PROTOCOL) */
|
||||
extern Time GetFunctionTimestamp (XButtonEvent *pEvent);
|
||||
extern void ReBorderClient (ClientData *pCD, Boolean reMapClient);
|
||||
extern void ClearDirtyStackEntry (ClientData *pCD); /* Fix for 5325 */
|
||||
|
|
|
@ -111,12 +111,6 @@ extern Pixel FPselectcolor;
|
|||
|
||||
/* ICCC atom names: */
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# define _XA_TARGETS "TARGETS"
|
||||
# define _XA_MULTIPLE "MULTIPLE"
|
||||
# define _XA_TIMESTAMP "TIMESTAMP"
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
#define _XA_WM_STATE "WM_STATE"
|
||||
#define _XA_WM_PROTOCOLS "WM_PROTOCOLS"
|
||||
#define _XA_WM_CHANGE_STATE "WM_CHANGE_STATE"
|
||||
|
@ -125,27 +119,6 @@ extern Pixel FPselectcolor;
|
|||
#define _XA_WM_TAKE_FOCUS "WM_TAKE_FOCUS"
|
||||
#define _XA_WM_COLORMAP_WINDOWS "WM_COLORMAP_WINDOWS"
|
||||
|
||||
#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"
|
||||
# define _XA_MOTIF_WM_ALL_CLIENTS "_MOTIF_WM_ALL_CLIENTS"
|
||||
|
||||
/* menu command interface support */
|
||||
# define _XA_MOTIF_WM_DEFINE_COMMAND "_MOTIF_WM_DEFINE_COMMAND"
|
||||
# define _XA_MOTIF_WM_INCLUDE_COMMAND "_MOTIF_WM_INCLUDE_COMMAND"
|
||||
# define _XA_MOTIF_WM_REMOVE_COMMAND "_MOTIF_WM_REMOVE_COMMAND"
|
||||
# define _XA_MOTIF_WM_ENABLE_COMMAND "_MOTIF_WM_ENABLE_COMMAND"
|
||||
# define _XA_MOTIF_WM_DISABLE_COMMAND "_MOTIF_WM_DISABLE_COMMAND"
|
||||
# define _XA_MOTIF_WM_RENAME_COMMAND "_MOTIF_WM_RENAME_COMMAND"
|
||||
# define _XA_MOTIF_WM_INVOKE_COMMAND "_MOTIF_WM_INVOKE_COMMAND"
|
||||
# define _XA_MOTIF_WM_REQUEST_COMMAND "_MOTIF_WM_REQUEST_COMMAND"
|
||||
# define _XA_MOTIF_WM_WINDOW_FLAGS "_MOTIF_WM_WINDOW_FLAGS"
|
||||
|
||||
/* automation support */
|
||||
# define _XA_MOTIF_WM_AUTOMATION "_MOTIF_WM_AUTOMATION"
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
/* window manager exit value on fatal errors: */
|
||||
#define WM_ERROR_EXIT_VALUE 1
|
||||
|
||||
|
@ -759,20 +732,6 @@ typedef struct _SessionGeom
|
|||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/*
|
||||
* Used to denote where the separators belong in a pair of separators
|
||||
* used to surround a client command.
|
||||
*/
|
||||
|
||||
enum { TOP_SEPARATOR, BOTTOM_SEPARATOR };
|
||||
|
||||
/*
|
||||
* Used to denote what kind of change to make to a client command.
|
||||
*/
|
||||
typedef enum { ENABLE, DISABLE, REMOVE, RENAME } CmdModifier;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
typedef struct _MenuItem
|
||||
{
|
||||
int labelType;
|
||||
|
@ -786,11 +745,6 @@ typedef struct _MenuItem
|
|||
String wmFuncArgs;
|
||||
Context greyedContext;
|
||||
long mgtMask;
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
String clientCommandName; /* as specified by the user in
|
||||
his .mwmrc file. */
|
||||
CARD32 clientCommandID;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
struct _MenuItem *nextMenuItem;
|
||||
|
||||
} MenuItem;
|
||||
|
@ -814,14 +768,6 @@ typedef struct _MenuButton
|
|||
|
||||
} MenuButton;
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
typedef struct _MenuExclusion
|
||||
{
|
||||
String command_string;
|
||||
struct _MenuExclusion *nextExclusion;
|
||||
} MenuExclusion;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
typedef struct _MenuSpec
|
||||
{
|
||||
String name;
|
||||
|
@ -835,49 +781,10 @@ typedef struct _MenuSpec
|
|||
unsigned int menuButtonCount; /* number of menuButtons elements in use */
|
||||
Context accelContext; /* accelerator context */
|
||||
KeySpec *accelKeySpecs; /* list of accelerator KeySpecs */
|
||||
|
||||
#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(MWM_QATS_PROTOCOL) */
|
||||
|
||||
struct _MenuSpec *nextMenuSpec;
|
||||
|
||||
} MenuSpec;
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/* The range to which a client command operation should apply. */
|
||||
typedef enum { SINGLE, ROOT, ALL } OpRange;
|
||||
|
||||
typedef struct _CmdTree {
|
||||
CARD32 commandID; /* unique identifier for this command. */
|
||||
CARD32 notifyWindow;/* window to receive InvokeCommand request. */
|
||||
char *name; /* name of command referred to in .mwmrc. */
|
||||
char *defaultName; /* default label of menu. */
|
||||
struct _CmdTree *subTrees; /* list of child commands or command sets. */
|
||||
struct _CmdTree *next;
|
||||
|
||||
} CmdTree;
|
||||
|
||||
|
||||
typedef struct _matchlist {
|
||||
MenuSpec *menuspec;
|
||||
MenuItem *menuitem;
|
||||
String command_string;
|
||||
CmdTree *treenode;
|
||||
WmFunction function;
|
||||
String funcargs;
|
||||
Context greyed_context;
|
||||
struct _matchlist *next;
|
||||
|
||||
} MatchList;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* Window and function specification data structures ...
|
||||
|
@ -1225,9 +1132,6 @@ typedef struct _WmScreenData
|
|||
Window rootWindow;
|
||||
Widget screenTopLevelW;
|
||||
Widget screenTopLevelW1; /* for internal WM components */
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
Widget utmShell; /* DrawingArea used for UTM */
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
Widget confirmboxW[4];
|
||||
Widget wPanelist; /* panel object */
|
||||
WsPresenceData presence; /* workspace presence dialog*/
|
||||
|
@ -1254,9 +1158,6 @@ typedef struct _WmScreenData
|
|||
Colormap lastInstalledColormap;
|
||||
struct _WmWorkspaceData *pActiveWS; /* for this screen */
|
||||
struct _WmWorkspaceData *pLastWS; /* previously active WS */
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
CmdTree *cciTree; /* pointer to cci definitions */
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
/* per screen caches */
|
||||
BitmapCache *bitmapCache;
|
||||
|
@ -1304,9 +1205,6 @@ typedef struct _WmScreenData
|
|||
int actionNbr;
|
||||
|
||||
/* resource description file data: */
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
String rootMenu; /* resource */
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
String buttonBindings; /* resource */
|
||||
ButtonSpec *buttonSpecs;
|
||||
String keyBindings; /* resource */
|
||||
|
@ -1823,12 +1721,6 @@ typedef struct _ClientData *PtrClientData;
|
|||
#define MAXIMIZED_STATE 3
|
||||
#define UNSEEN_STATE 8
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# define NO_CHANGE -1
|
||||
# define UNSET 0
|
||||
# define SET 1
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
/* clientFlags field values: */
|
||||
#define CLIENT_HINTS_TITLE (1L << 0)
|
||||
#define CLIENT_REPARENTED (1L << 1)
|
||||
|
@ -2040,33 +1932,6 @@ typedef struct _WmGlobalData
|
|||
Atom xa_MWM_INFO;
|
||||
Atom xa_MWM_OFFSET;
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
Atom *xa_WM;
|
||||
|
||||
Atom xa_TARGETS;
|
||||
Atom xa_MULTIPLE;
|
||||
Atom xa_TIMESTAMP;
|
||||
|
||||
/* original set of query targets */
|
||||
Atom _MOTIF_WM_CLIENT_WINDOW;
|
||||
Atom _MOTIF_WM_POINTER_WINDOW;
|
||||
Atom _MOTIF_WM_ALL_CLIENTS ;
|
||||
|
||||
/* menu command interface support */
|
||||
Atom _MOTIF_WM_DEFINE_COMMAND;
|
||||
Atom _MOTIF_WM_INCLUDE_COMMAND;
|
||||
Atom _MOTIF_WM_REMOVE_COMMAND;
|
||||
Atom _MOTIF_WM_ENABLE_COMMAND;
|
||||
Atom _MOTIF_WM_DISABLE_COMMAND;
|
||||
Atom _MOTIF_WM_RENAME_COMMAND;
|
||||
Atom _MOTIF_WM_INVOKE_COMMAND;
|
||||
Atom _MOTIF_WM_REQUEST_COMMAND;
|
||||
Atom _MOTIF_WM_WINDOW_FLAGS;
|
||||
|
||||
/* automation support */
|
||||
Atom _MOTIF_WM_AUTOMATION;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
Atom xa_MOTIF_BINDINGS;
|
||||
Atom xa_COMPOUND_TEXT;
|
||||
Atom xa_SM_CLIENT_ID;
|
||||
|
|
|
@ -57,10 +57,6 @@
|
|||
#ifndef NO_HP_KEY_REMAP
|
||||
#include <Xm/VirtKeysP.h>
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# include <Xm/DrawingA.h>
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
String default_name ;
|
||||
|
@ -121,11 +117,6 @@ typedef struct
|
|||
|
||||
#include "WmInitWs.h"
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# include "WmWsmLib/wsm_proto.h"
|
||||
# include "WmWsmLib/utm_send.h"
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
static void InsureDefaultBackdropDir(char **ppchBackdropDirs);
|
||||
void InitWmDisplayEnv (void);
|
||||
#ifndef NO_MESSAGE_CATALOG
|
||||
|
@ -1263,9 +1254,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
|
|||
pSD->bitmapCacheCount = 0;
|
||||
pSD->dataType = SCREEN_DATA_TYPE;
|
||||
pSD->managed = False;
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
pSD->cciTree = NULL;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
pSD->initialWorkspace=NULL;
|
||||
pSD->presence.shellW = NULL;
|
||||
|
@ -1358,28 +1346,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
|
|||
args,
|
||||
argnum);
|
||||
|
||||
#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
|
||||
* against Mwm and the requests Mwm makes against other clients.
|
||||
*/
|
||||
pSD->utmShell = XmCreateDrawingArea(pSD->screenTopLevelW, "UTM_Shell",
|
||||
NULL, 0);
|
||||
XtManageChild(pSD->utmShell);
|
||||
|
||||
/*
|
||||
* Setup the destinationCallback handler to handle conversion
|
||||
* requests made by Mwm against other clients.
|
||||
*/
|
||||
XtAddCallback(pSD->utmShell, XmNdestinationCallback, UTMDestinationProc,
|
||||
NULL);
|
||||
|
||||
/* Must realize to own WM_i if unmapped, causes mwm to
|
||||
freeze when menu is displayed. */
|
||||
XtPopup(pSD->screenTopLevelW, XtGrabNone);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
argnum = 0;
|
||||
XtSetArg (args[argnum], XtNgeometry, NULL); argnum++;
|
||||
XtSetArg (args[argnum], XtNx, 10000); argnum++;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -33,33 +33,20 @@
|
|||
/*
|
||||
* (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
|
||||
|
||||
#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) \
|
||||
CreateMenuWidget(pSD, pCD, mName, parent, fTLP, tSpec, moreItems)
|
||||
#else
|
||||
# define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
|
||||
#define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
|
||||
MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu)
|
||||
# define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
|
||||
#define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
|
||||
CreateMenuWidget(pSD, mName, parent, fTLP, tSpec, moreItems)
|
||||
#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(MWM_QATS_PROTOCOL))
|
||||
ClientData *pCD,
|
||||
#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(MWM_QATS_PROTOCOL))
|
||||
ClientData *pCD,
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
String menuName,
|
||||
Context initialContext, Context accelContext,
|
||||
MenuItem *moreMenuItems, Boolean fSystemMenu);
|
||||
|
@ -69,24 +56,6 @@ extern void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y,
|
|||
extern void TraversalOff (MenuSpec *menuSpec);
|
||||
extern void TraversalOn (MenuSpec *menuSpec);
|
||||
extern void UnpostMenu (MenuSpec *menuSpec);
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree,
|
||||
Atom selection, Context active_context,
|
||||
Boolean in_line);
|
||||
extern void InsertTreeOnSingleClient (WmScreenData *pSD, ClientData *pCD,
|
||||
CmdTree *tree, Atom selection,
|
||||
Context active_context, Boolean in_line);
|
||||
extern void InsertTreeOnRootMenu (WmScreenData *pSD, CmdTree *tree,
|
||||
Atom selection, Boolean in_line);
|
||||
extern void ModifyClientCommandTree (WmScreenData *pSD, ClientData *pCD,
|
||||
OpRange range, CmdTree *tree,
|
||||
CmdModifier modifier, Context context,
|
||||
String newname);
|
||||
extern void DestroyMenuSpecWidgets (MenuSpec *menuspec);
|
||||
extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec);
|
||||
|
||||
#endif /* _WM_MENU_H */
|
||||
|
|
|
@ -51,11 +51,6 @@
|
|||
#endif /* NO_WMQUERY */
|
||||
#include "WmPanelP.h"
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# include "WmCmd.h"
|
||||
# include "WmDebug.h"
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
/*
|
||||
* Function Declarations:
|
||||
*/
|
||||
|
@ -75,13 +70,6 @@ static void wmq_lose (Widget w, Atom *pSelection);
|
|||
static void wmq_bump_xids(void);
|
||||
#endif /* NO_WMQUERY */
|
||||
|
||||
#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(MWM_QATS_PROTOCOL) */
|
||||
|
||||
/*
|
||||
* Global Variables:
|
||||
|
@ -118,35 +106,22 @@ int curXids = 0;
|
|||
void SetupWmICCC (void)
|
||||
{
|
||||
enum {
|
||||
#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(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
|
||||
#if !defined(NO_WMQUERY)
|
||||
XA_MOTIF_WM_CLIENT_WINDOW, XA_MOTIF_WM_POINTER_WINDOW,
|
||||
XA_MOTIF_WM_ALL_CLIENTS,
|
||||
#endif
|
||||
#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_MOTIF_WM_INVOKE_COMMAND, XA_MOTIF_WM_REQUEST_COMMAND,
|
||||
XA_MOTIF_WM_WINDOW_FLAGS, XA_MOTIF_WM_AUTOMATION,
|
||||
#endif
|
||||
XA_COMPOUND_TEXT, NUM_ATOMS };
|
||||
|
||||
static char *atom_names[] = {
|
||||
#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(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
|
||||
#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,
|
||||
|
@ -154,13 +129,6 @@ void SetupWmICCC (void)
|
|||
"_MOTIF_WM_CLIENT_WINDOW", "_MOTIF_WM_POINTER_WINDOW",
|
||||
"_MOTIF_WM_ALL_CLIENTS"
|
||||
# endif
|
||||
#endif
|
||||
#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_MOTIF_WM_INVOKE_COMMAND, _XA_MOTIF_WM_REQUEST_COMMAND,
|
||||
_XA_MOTIF_WM_WINDOW_FLAGS, _XA_MOTIF_WM_AUTOMATION,
|
||||
#endif
|
||||
"COMPOUND_TEXT"
|
||||
};
|
||||
|
@ -175,14 +143,6 @@ void SetupWmICCC (void)
|
|||
*/
|
||||
XInternAtoms(DISPLAY, atom_names, XtNumber(atom_names), False, atoms);
|
||||
|
||||
|
||||
#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(MWM_QATS_PROTOCOL) */
|
||||
|
||||
wmGD.xa_WM_STATE = atoms[XA_WM_STATE];
|
||||
wmGD.xa_WM_PROTOCOLS = atoms[XA_WM_PROTOCOLS];
|
||||
wmGD.xa_WM_CHANGE_STATE = atoms[XA_WM_CHANGE_STATE];
|
||||
|
@ -195,36 +155,6 @@ void SetupWmICCC (void)
|
|||
wmGD.xa_MWM_MESSAGES = atoms[XA_MWM_MESSAGES];
|
||||
wmGD.xa_MWM_OFFSET = atoms[XA_MOTIF_WM_OFFSET];
|
||||
|
||||
#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_ALL_CLIENTS = atoms[XA_MOTIF_WM_ALL_CLIENTS];
|
||||
|
||||
/* intern atoms for Client-Commmand Interface protocol. */
|
||||
wmGD._MOTIF_WM_DEFINE_COMMAND = atoms[XA_MOTIF_WM_DEFINE_COMMAND];
|
||||
wmGD._MOTIF_WM_INCLUDE_COMMAND= atoms[XA_MOTIF_WM_INCLUDE_COMMAND];
|
||||
wmGD._MOTIF_WM_REMOVE_COMMAND = atoms[XA_MOTIF_WM_REMOVE_COMMAND];
|
||||
wmGD._MOTIF_WM_ENABLE_COMMAND = atoms[XA_MOTIF_WM_ENABLE_COMMAND];
|
||||
wmGD._MOTIF_WM_DISABLE_COMMAND= atoms[XA_MOTIF_WM_DISABLE_COMMAND];
|
||||
wmGD._MOTIF_WM_RENAME_COMMAND = atoms[XA_MOTIF_WM_RENAME_COMMAND];
|
||||
wmGD._MOTIF_WM_INVOKE_COMMAND = atoms[XA_MOTIF_WM_INVOKE_COMMAND];
|
||||
wmGD._MOTIF_WM_REQUEST_COMMAND= atoms[XA_MOTIF_WM_REQUEST_COMMAND];
|
||||
wmGD._MOTIF_WM_WINDOW_FLAGS = atoms[XA_MOTIF_WM_WINDOW_FLAGS];
|
||||
|
||||
wmGD._MOTIF_WM_AUTOMATION = atoms[XA_MOTIF_WM_AUTOMATION];
|
||||
#endif /* 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(MWM_QATS_PROTOCOL) */
|
||||
|
||||
wmGD.xa_COMPOUND_TEXT = atoms[XA_COMPOUND_TEXT];
|
||||
|
||||
#ifndef NO_WMQUERY
|
||||
|
@ -1141,367 +1071,3 @@ wmq_bump_xids ( void )
|
|||
}
|
||||
|
||||
#endif /* NO_WMQUERY */
|
||||
|
||||
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* static void OwnWMSelections ()
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Get the selection ownership for each managed screen. The selection mwm
|
||||
* will own is WM_Si.
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* Outputs:
|
||||
* ------
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
*
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
static void
|
||||
OwnWMSelections ( Time timestamp )
|
||||
{
|
||||
int scr;
|
||||
|
||||
|
||||
wmGD.xa_WM = (Atom *) XtMalloc (wmGD.numScreens * (sizeof (Atom)));
|
||||
|
||||
for (scr = 0; scr < wmGD.numScreens; scr++)
|
||||
{
|
||||
if (wmGD.Screens[scr].managed)
|
||||
{
|
||||
char wm_scr[8];
|
||||
|
||||
sprintf(wm_scr, "WM_S%d", DefaultScreen(DISPLAY));
|
||||
wmGD.xa_WM[scr] = XInternAtom (DISPLAY, wm_scr, False);
|
||||
|
||||
#ifdef MWM_WSM
|
||||
/*
|
||||
* This registers the callback to be invoked when a request
|
||||
* is made against a WSM Protocol target. The request
|
||||
* callback is stored by the WSM Protocol code and is
|
||||
* invoked in the convert routine (WMiConvert) below.
|
||||
* See WSMProcessProtoTargets().
|
||||
*/
|
||||
|
||||
WSMRegisterRequestCallback(DISPLAY, scr, HandleWsmConvertRequest,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Own the selection through UTM. This sets-up a convert function
|
||||
* that is invoked when a convert request is made on this selection.
|
||||
* The convert function is specified in the drawing area's
|
||||
* XmNconvertCallback resource.
|
||||
*/
|
||||
|
||||
XtAddCallback(wmGD.Screens[scr].utmShell, XmNconvertCallback,
|
||||
WMiConvertCB, NULL);
|
||||
|
||||
if (! XmeNamedSource(wmGD.Screens[scr].utmShell,
|
||||
wmGD.xa_WM[scr], timestamp))
|
||||
{
|
||||
Warning (((char *)GETMESSAGE(56, 6,
|
||||
"Failed to own WM_nn selection")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PRINT("Owning selection %s\n", wm_scr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* Boolean WMiConvert ( )
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* This function converts WM_Si selections using the new param selections
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
/*ARGSUSED*/
|
||||
static Boolean
|
||||
WMiConvert (
|
||||
Widget w,
|
||||
Atom selection,
|
||||
Atom target,
|
||||
XtPointer input,
|
||||
unsigned long inputLen,
|
||||
int inputFmt,
|
||||
Atom *outputType,
|
||||
XtPointer *output,
|
||||
unsigned long *outputLen,
|
||||
int *outputFmt)
|
||||
{
|
||||
int scr;
|
||||
Boolean found = False;
|
||||
|
||||
|
||||
/* set up some defaults. selection code doesn't like garbage! */
|
||||
*outputLen = 0;
|
||||
*output = NULL;
|
||||
*outputFmt = 8;
|
||||
|
||||
scr = XScreenNumberOfScreen(XtScreen(w));
|
||||
if (!wmGD.Screens[scr].managed)
|
||||
{
|
||||
Warning (((char *)GETMESSAGE(56, 7,
|
||||
"Got convert request from unmanaged screen")));
|
||||
found = False;
|
||||
}
|
||||
|
||||
else {
|
||||
if (target == wmGD.xa_TARGETS) {
|
||||
Atom *targs = (Atom *)XtMalloc((unsigned) (28 * sizeof(Atom)));
|
||||
int targetCount = 0;
|
||||
|
||||
*output = (XtPointer) targs;
|
||||
|
||||
/* required targets */
|
||||
*targs++ = wmGD.xa_TARGETS; targetCount++;
|
||||
*targs++ = wmGD.xa_MULTIPLE; targetCount++;
|
||||
*targs++ = wmGD.xa_TIMESTAMP; targetCount++;
|
||||
|
||||
#ifdef MWM_WSM
|
||||
/* other targets */
|
||||
*targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_CONNECT); targetCount++;
|
||||
*targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_EXTENSIONS); targetCount++;
|
||||
*targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_CONFIG_FMT); targetCount++;
|
||||
*targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_GET_STATE); targetCount++;
|
||||
*targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_SET_STATE); targetCount++;
|
||||
*targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_REG_WINDOW); targetCount++;
|
||||
#endif
|
||||
|
||||
/* menu command interface support */
|
||||
*targs++ = wmGD._MOTIF_WM_DEFINE_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_INCLUDE_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_REMOVE_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_ENABLE_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_DISABLE_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_RENAME_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_INVOKE_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_REQUEST_COMMAND; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_WINDOW_FLAGS; targetCount++;
|
||||
|
||||
#ifdef MWM_WSM
|
||||
/* virtual screen support */
|
||||
*targs++ = wmGD._MOTIF_WM_PAN; targetCount++;
|
||||
*targs++ = wmGD._MOTIF_WM_GOTO; targetCount++;
|
||||
#endif
|
||||
|
||||
/* automation support */
|
||||
|
||||
*targs++ = wmGD._MOTIF_WM_AUTOMATION; targetCount++;
|
||||
|
||||
*outputType = XA_ATOM;
|
||||
*outputLen = (targetCount * sizeof(Atom)) >> 2;
|
||||
*outputFmt = 32;
|
||||
|
||||
found = True;
|
||||
}
|
||||
|
||||
#ifdef MWM_WSM
|
||||
/* virtual screen support */
|
||||
else if (target == wmGD._MOTIF_WM_PAN)
|
||||
{
|
||||
int dx, dy;
|
||||
Boolean config;
|
||||
|
||||
dx = (int) UnpackCARD32(&input);
|
||||
dy = (int) UnpackCARD32(&input);
|
||||
config = (Boolean) UnpackCARD8(&input);
|
||||
|
||||
PanRoot(dx, dy, config);
|
||||
|
||||
/*
|
||||
* Update the root property
|
||||
*/
|
||||
|
||||
SetPanPosition (ACTIVE_PSD->panDx, ACTIVE_PSD->panDy);
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_GOTO)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
x = (int) UnpackCARD32(&input);
|
||||
y = (int) UnpackCARD32(&input);
|
||||
|
||||
PanRoot(x - ACTIVE_PSD->panDx, y - ACTIVE_PSD->panDy, 1);
|
||||
|
||||
found = True;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle the workspace manager protocol targets...
|
||||
*/
|
||||
|
||||
else if (WSMIsKnownTarget(w, target))
|
||||
{
|
||||
/*
|
||||
* Unpack data send in request and invoke CB specified
|
||||
* in WSMRegisterRequestCallback.
|
||||
*/
|
||||
found = WSMProcessProtoTarget
|
||||
(w, target,
|
||||
input, inputLen, inputFmt,
|
||||
outputType, output, outputLen, outputFmt);
|
||||
}
|
||||
#endif /* MWM_WSM */
|
||||
|
||||
/*
|
||||
* Handle client-command interface targets.
|
||||
*/
|
||||
|
||||
else if (target == wmGD._MOTIF_WM_DEFINE_COMMAND)
|
||||
{
|
||||
PRINT("Convert request made for _MOTIF_WM_DEFINE_COMMAND.\n");
|
||||
DefineCommand(w, target, (MessageData)input, inputLen, inputFmt);
|
||||
PRINT("Returning from _MOTIF_WM_DEFINE_COMMAND.\n");
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_INCLUDE_COMMAND)
|
||||
{
|
||||
PRINT("Convert request made for _MOTIF_WM_INCLUDE_COMMAND.\n");
|
||||
IncludeCommand(w, target, (MessageData)input, inputLen, inputFmt);
|
||||
PRINT("Returning from _MOTIF_WM_INCLUDE_COMMAND.\n");
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_REMOVE_COMMAND)
|
||||
{
|
||||
PRINT("Convert request made for _MOTIF_WM_REMOVE_COMMAND.\n");
|
||||
RemoveCommand(w, target, (MessageData)input, inputLen, inputFmt);
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_ENABLE_COMMAND)
|
||||
{
|
||||
PRINT("Convert request made for _MOTIF_WM_ENABLE_COMMAND.\n");
|
||||
EnableCommand(w, target, (MessageData)input, inputLen, inputFmt);
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_DISABLE_COMMAND)
|
||||
{
|
||||
PRINT("Convert request made for _MOTIF_WM_DISABLE_COMMAND.\n");
|
||||
DisableCommand(w, target, (MessageData)input, inputLen, inputFmt);
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_RENAME_COMMAND)
|
||||
{
|
||||
PRINT("Convert request made for _MOTIF_WM_RENAME_COMMAND.\n");
|
||||
RenameCommand(w, target, (MessageData)input, inputLen, inputFmt);
|
||||
|
||||
found = True;
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_INVOKE_COMMAND)
|
||||
{
|
||||
/* Shouldn't get here! */
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_REQUEST_COMMAND)
|
||||
{
|
||||
}
|
||||
else if (target == wmGD._MOTIF_WM_WINDOW_FLAGS)
|
||||
{
|
||||
}
|
||||
|
||||
else if (target == wmGD._MOTIF_WM_AUTOMATION)
|
||||
{
|
||||
/*
|
||||
* This function needs to pack the necessary info into the
|
||||
* output data variable to send back to the requesting
|
||||
*/
|
||||
|
||||
GetAutomationData(input,outputType,output,outputLen,outputFmt);
|
||||
found = True;
|
||||
}
|
||||
|
||||
else
|
||||
Warning (((char *)GETMESSAGE(56, 8,
|
||||
"Conversion request made for unknown target type")));
|
||||
}
|
||||
|
||||
|
||||
return (found);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* void WMiConvertCB ( )
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* This function is invoked by UTM to handle the convert request
|
||||
* made by a requesting application.
|
||||
*
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
* This function is set-up as a callback on a drawing area kept on each
|
||||
* screen. This is done in WmInitWs.c
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
WMiConvertCB (
|
||||
Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData)
|
||||
{
|
||||
XmConvertCallbackStruct *cnv = (XmConvertCallbackStruct *)callData;
|
||||
Atom _MOTIF_LOSE_SELECTION =
|
||||
XInternAtom(DISPLAY, "_MOTIF_LOSE_SELECTION", False);
|
||||
int scr = XScreenNumberOfScreen(XtScreen(w));
|
||||
|
||||
|
||||
/* Check to make sure we're dealing with the right selection.
|
||||
*/
|
||||
if (cnv->selection != wmGD.xa_WM[scr])
|
||||
{
|
||||
Warning (((char *)GETMESSAGE(56, 9,
|
||||
"Conversion request received for unknown selection")));
|
||||
return;
|
||||
}
|
||||
|
||||
if (cnv->target == _MOTIF_LOSE_SELECTION)
|
||||
{
|
||||
/* Done with the conversion - free any data used. */
|
||||
}
|
||||
|
||||
/* Handle a conversion request with parameter data.
|
||||
*/
|
||||
else
|
||||
{
|
||||
WMiConvert (w, cnv->selection, cnv->target,
|
||||
cnv->parm, cnv->parm_length, cnv->parm_format,
|
||||
&(cnv->type), &(cnv->value), &(cnv->length), &(cnv->format));
|
||||
}
|
||||
}
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
|
|
@ -109,9 +109,6 @@
|
|||
#define WmNrefreshByClearing "refreshByClearing"
|
||||
#define WmNresizeBorderWidth "resizeBorderWidth"
|
||||
#define WmNresizeCursors "resizeCursors"
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# define WmNrootMenu "rootMenu"
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
#define WmNrootButtonClick "rootButtonClick"
|
||||
#define WmNsecondariesOnTop "secondariesOnTop"
|
||||
#define WmNsessionVersion "sessionVersion"
|
||||
|
@ -273,9 +270,6 @@
|
|||
#define WmCRefreshByClearing "RefreshByClearing"
|
||||
#define WmCResizeBorderWidth "ResizeBorderWidth"
|
||||
#define WmCResizeCursors "ResizeCursors"
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
# define WmCRootMenu "RootMenu"
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
#define WmCRootButtonClick "RootButtonClick"
|
||||
#define WmCSecondariesOnTop "SecondariesOnTop"
|
||||
#define WmCSessionVersion "SessionVersion"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -106,8 +106,3 @@ extern Boolean ParseWmFuncActionArg (unsigned char **linePP,
|
|||
#define GetString(s) (_DtWmParseNextTokenC (s, False))
|
||||
#define ScanWhitespace(s) (_DtWmParseSkipWhitespaceC (s))
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
extern Boolean IsClientCommand (String);
|
||||
extern Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem,
|
||||
WmFunction wmFunction);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
|
|
@ -510,21 +510,12 @@ char behaviorKeyBindings[];
|
|||
char defaultButtonBindingsName[] = "DefaultButtonBindings";
|
||||
char builtinButtonBindingsName[] = "_MwmButtonBindings_";
|
||||
#ifndef MCCABE
|
||||
# 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 %s\n\
|
||||
}";
|
||||
# else
|
||||
# define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
|
||||
# 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(MWM_QATS_PROTOCOL) */
|
||||
char builtinButtonBindings[] = BUILTINBUTTONBINDINGS
|
||||
|
||||
#else
|
||||
|
@ -1338,18 +1329,6 @@ XtResource wmScreenResources[] =
|
|||
(XtPointer)True
|
||||
},
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
{
|
||||
WmNrootMenu,
|
||||
WmCRootMenu,
|
||||
XtRString,
|
||||
sizeof (String),
|
||||
XtOffsetOf (WmScreenData, rootMenu),
|
||||
XtRString,
|
||||
(XtPointer)builtinRootMenuName
|
||||
},
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
{
|
||||
WmNtransientDecoration,
|
||||
WmCTransientDecoration,
|
||||
|
@ -5585,9 +5564,6 @@ SetStdClientResourceValues (ClientData *pCD)
|
|||
void
|
||||
SetStdScreenResourceValues (WmScreenData *pSD)
|
||||
{
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
pSD->rootMenu = builtinRootMenuName;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
pSD->buttonBindings = builtinButtonBindingsName;
|
||||
pSD->cleanText = True;
|
||||
pSD->iconDecoration =
|
||||
|
@ -6157,23 +6133,7 @@ WmScreenData *pSD;
|
|||
* set.
|
||||
*/
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/*
|
||||
* Before parsing the string, substitute the real name for
|
||||
* the default rootmenu using the resource rootMenu
|
||||
* for the %s in the string.
|
||||
*/
|
||||
|
||||
char *buffer;
|
||||
|
||||
buffer = (char *) XtMalloc(strlen(builtinKeyBindings) +
|
||||
strlen(pSD->rootMenu) + 1);
|
||||
sprintf(buffer, builtinKeyBindings, pSD->rootMenu);
|
||||
|
||||
ParseKeyStr (pSD, (unsigned char *)buffer);
|
||||
#else
|
||||
ParseKeyStr (pSD, (unsigned char *)builtinKeyBindings);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6209,23 +6169,7 @@ WmScreenData *pSD;
|
|||
* set.
|
||||
*/
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/*
|
||||
* Before parsing the string, substitute the real name for
|
||||
* the default rootmenu using the resource rootMenu
|
||||
* for the %s in the string.
|
||||
*/
|
||||
|
||||
char *buffer;
|
||||
|
||||
buffer = (char *) XtMalloc(strlen(builtinButtonBindings) +
|
||||
strlen(pSD->rootMenu) + 1);
|
||||
sprintf(buffer, builtinButtonBindings, pSD->rootMenu);
|
||||
|
||||
ParseButtonStr (pSD, (unsigned char *)buffer);
|
||||
#else
|
||||
ParseButtonStr (pSD, (unsigned char *)builtinButtonBindings);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
}
|
||||
|
||||
#ifdef NO_MESSAGE_CATALOG
|
||||
|
|
|
@ -129,9 +129,6 @@ static int moveLastPointerY= 0;
|
|||
|
||||
static Boolean anyMotion = FALSE;
|
||||
static Boolean configGrab = FALSE;
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
static Boolean grabServer = TRUE;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
Dimension clipWidth = 0;
|
||||
Dimension clipHeight = 0;
|
||||
|
@ -2572,38 +2569,6 @@ Boolean StartClientMove (ClientData *pcd, XEvent *pev)
|
|||
} /* END OF FUNCTION StartClientMove */
|
||||
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* SetGrabServer ()
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Sets Boolean grabServer to False
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* None
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
* None
|
||||
*
|
||||
* Comments
|
||||
* -------
|
||||
* This will only get called when an automated test is running. The
|
||||
* purpose of this is to prevent mwm from grbbing the server, since
|
||||
* this confuses the automation input synthesis code
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
void SetGrabServer (void)
|
||||
{
|
||||
grabServer = FALSE;
|
||||
}
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* DoGrabs (grab_win, cursor, pmask, grabTime, alwaysGrab)
|
||||
|
@ -2697,14 +2662,6 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* If running automation version of mwm, do not grab the server, since
|
||||
* this will confuse the automation input synthesis code.
|
||||
*/
|
||||
# if (defined(MWM_QATS_PROTOCOL))
|
||||
if (grabServer == TRUE)
|
||||
# endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
if (wmGD.freezeOnConfig)
|
||||
|
||||
{
|
||||
|
|
|
@ -71,9 +71,6 @@ extern void ProcessNewConfiguration (ClientData *pCD, int x, int y,
|
|||
unsigned int width, unsigned int height,
|
||||
Boolean clientRequest);
|
||||
extern void ReGrabPointer (Window grab_win, Time grabTime);
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
extern void SetGrabServer (void);
|
||||
#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,
|
||||
|
|
|
@ -740,45 +740,11 @@ GetWmClientInfo (WmWorkspaceData *pWS,
|
|||
|
||||
if (manageFlags & MANAGEW_ICON_BOX)
|
||||
{
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/** BEGIN FIX CR 6941 **/
|
||||
MenuItem *iconBoxMenuItems, *lastItem;
|
||||
|
||||
/* This MenuSpec is not added to pSD->acceleratorMenuSpecs */
|
||||
pCD->systemMenuSpec =
|
||||
MAKE_MENU (PSD_FOR_CLIENT(pCD), pCD, pCD->systemMenu,
|
||||
F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON,
|
||||
NULL, TRUE);
|
||||
if (pCD->systemMenuSpec != (MenuSpec *) NULL)
|
||||
{
|
||||
pCD->systemMenuSpec = DuplicateMenuSpec(pCD->systemMenuSpec);
|
||||
XtFree(pCD->systemMenuSpec->name);
|
||||
pCD->systemMenuSpec->name = XtNewString("IconBoxMenu");
|
||||
iconBoxMenuItems = GetIconBoxMenuItems (PSD_FOR_CLIENT(pCD));
|
||||
|
||||
/* Find the last menu item in the menu spec's list. */
|
||||
for (lastItem = pCD->systemMenuSpec->menuItems;
|
||||
lastItem->nextMenuItem != (MenuItem *) NULL;
|
||||
lastItem = lastItem->nextMenuItem)
|
||||
/*EMPTY*/;
|
||||
lastItem->nextMenuItem = iconBoxMenuItems;
|
||||
|
||||
/* Now recreate the menu widgets since we've appended the
|
||||
icon box menu items */
|
||||
DestroyMenuSpecWidgets(pCD->systemMenuSpec);
|
||||
pCD->systemMenuSpec->menuWidget =
|
||||
CreateMenuWidget (PSD_FOR_CLIENT(pCD), pCD, "IconBoxMenu",
|
||||
PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE,
|
||||
pCD->systemMenuSpec, NULL);
|
||||
}
|
||||
/** END FIX CR 6941 **/
|
||||
#else
|
||||
pCD->systemMenuSpec =
|
||||
MAKE_MENU (PSD_FOR_CLIENT(pCD), pCD, pCD->systemMenu,
|
||||
F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON,
|
||||
GetIconBoxMenuItems(PSD_FOR_CLIENT(pCD)),
|
||||
TRUE);
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
}
|
||||
|
||||
|
||||
|
@ -2556,10 +2522,6 @@ ProcessWmTransientFor (ClientData *pCD)
|
|||
void
|
||||
MakeSystemMenu (ClientData *pCD)
|
||||
{
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
MenuItem *lastItem;
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
pCD->mwmMenuItems = GetMwmMenuItems(pCD);
|
||||
pCD->systemMenuSpec =
|
||||
MAKE_MENU (PSD_FOR_CLIENT(pCD), pCD, pCD->systemMenu, F_CONTEXT_WINDOW,
|
||||
|
@ -2580,48 +2542,6 @@ MakeSystemMenu (ClientData *pCD)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(MWM_QATS_PROTOCOL)
|
||||
/* Added to fix CDExc23338
|
||||
* Not sure what the MWM_QATS_PROTOCOL is trying to accomplish here,
|
||||
* but this code is causing the system menu to loose it's default
|
||||
* actions whenever client defined actions are added. I thought
|
||||
* it prudent to minimize the changes. It could be that the
|
||||
* #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
|
||||
* should be
|
||||
* #if ((!defined(WSM)) && defined(MWM_QATS_PROTOCOL))
|
||||
* throughout the wm code, but I am loath to make such a change
|
||||
* without any documentation.
|
||||
*/
|
||||
|
||||
#if (defined(MWM_QATS_PROTOCOL))
|
||||
/** BEGIN FIX CR 6941 **/
|
||||
|
||||
/* if we still don't have a menu spec, then just abort. */
|
||||
if (pCD->systemMenuSpec == NULL)
|
||||
return;
|
||||
|
||||
pCD->systemMenuSpec = DuplicateMenuSpec(pCD->systemMenuSpec);
|
||||
XtFree(pCD->systemMenuSpec->name);
|
||||
pCD->systemMenuSpec->name = XtNewString("ProtocolsMenu");
|
||||
|
||||
/* Find the last menu item in the menu spec's list. */
|
||||
for (lastItem = pCD->systemMenuSpec->menuItems;
|
||||
lastItem->nextMenuItem != (MenuItem *) NULL;
|
||||
lastItem = lastItem->nextMenuItem)
|
||||
/*EMPTY*/;
|
||||
lastItem->nextMenuItem = pCD->mwmMenuItems;
|
||||
|
||||
/* Now recreate the menu widgets since we've appended the
|
||||
protocol menu items */
|
||||
DestroyMenuSpecWidgets(pCD->systemMenuSpec);
|
||||
pCD->systemMenuSpec->menuWidget =
|
||||
CreateMenuWidget (PSD_FOR_CLIENT(pCD), pCD, "ProtocolsMenu",
|
||||
PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE,
|
||||
pCD->systemMenuSpec, NULL);
|
||||
/** END FIX CR 6941 **/
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||
|
||||
} /* END OF FUNCTION MakeSystemMenu */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue