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

Remove ancient HP VUE compatibility support

This commit is contained in:
wmoxam 2019-10-14 09:39:50 -04:00 committed by Jon Trulson
parent 4107a1b6be
commit de81a5b518
10 changed files with 2 additions and 404 deletions

View file

@ -86,10 +86,6 @@ _DtWsmGetDtWmHints(
unsigned long leftover, items, length;
int rcode;
Atom property;
#ifdef HP_VUE
unsigned long oldlength;
#endif /* HP_VUE */
property = XmInternAtom(display, _XA_DT_WM_HINTS, False);
length = sizeof (DtWmHints) / sizeof (long);
@ -121,69 +117,6 @@ _DtWsmGetDtWmHints(
*ppDtWmHints = NULL;
}
}
#ifdef HP_VUE
else {
/*
* Didn't get the Dt hints, try to get the Vue hints.
* Not that the Vue hints had the same structure, just
* under a different property name.
*/
property = XmInternAtom(display, _XA_VUE_WM_HINTS, False);
/*
* Property previously existed without attachWindow.
*/
oldlength = length - (sizeof(Window)/sizeof(long));
*ppDtWmHints = NULL;
if ((rcode=XGetWindowProperty(
display,
window,
property,
0L, /* offset */
length,
False, /* delete */
property, /* req_type */
&actualType,
&actualFormat,
&items, /* items returned */
&leftover,
(unsigned char **)ppDtWmHints))==Success)
{
if ((actualType != property) ||
(items < oldlength))
{
/* wrong type, force failure */
rcode = BadValue;
if (actualType != None)
{
XFree ((char *)*ppDtWmHints);
}
*ppDtWmHints = NULL;
}
if (*ppDtWmHints && (items < length))
{
DtWmHints *pvh;
/* assume old property, return full sized
property with empty values */
pvh = (DtWmHints *) malloc (length * sizeof (long));
pvh->flags = (*ppDtWmHints)->flags;
pvh->functions = (*ppDtWmHints)->functions;
pvh->behaviors = (*ppDtWmHints)->behaviors;
pvh->attachWindow = NULL;
XFree ((char *) *ppDtWmHints);
*ppDtWmHints = pvh;
}
}
}
#endif /* HP_VUE */
return(rcode);
} /* END OF FUNCTION _DtWsmGetDtWmHints */

View file

@ -77,14 +77,6 @@ static int _GetWorkspacesOccupied(
Atom **ppaWs,
unsigned long *pNumWs,
Atom property) ;
#ifdef HP_VUE
static int _GetWorkspacePresence(
Display *display,
Window window,
Atom **ppWsPresence,
unsigned long *pNumPresence,
Atom property ) ;
#endif /* HP_VUE */
/******** End Static Function Declarations ********/
@ -159,79 +151,7 @@ _GetWorkspacesOccupied(
} /* END OF FUNCTION GetWorkspacesOccupied */
#ifdef HP_VUE
/*************************************<->*************************************
*
* int _GetWorkspacePresence (display, window, ppWsPresence,
* pNumPresence, property)
*
*
* Description:
* -----------
* Get the contents of the _DT_WORKSPACE_PRESENCE property on a window
*
*
* Inputs:
* ------
* display - display
* window - window to get hints from
* ppWsPresence - pointer to a pointer to return
* pNumPresence - pointer to a number to return
* property - the property atom
*
* Outputs:
* --------
* *ppWsPresence - points to the list of workspace info structures
* (NOTE: This should be freed using XFree)
* *pNumPresence - the number of workspace info structure in the list
* Return - status from XGetWindowProperty
*
* Comments:
* ---------
* Assumes that less than BUFSIZ bytes will be returned. This code
* won't work for very large amounts of info (lots of workspaces).
*
*************************************<->***********************************/
static int
_GetWorkspacePresence(
Display *display,
Window window,
Atom **ppWsPresence,
unsigned long *pNumPresence,
Atom property )
{
Atom actualType;
int actualFormat;
unsigned long leftover;
int rcode;
*ppWsPresence = NULL;
if ((rcode=XGetWindowProperty(display,window,
property,0L, (long)BUFSIZ,
False,property,
&actualType,&actualFormat,
pNumPresence,&leftover,(unsigned char **)ppWsPresence))==Success)
{
if (actualType != property)
{
/* wrong type, force failure */
*pNumPresence = 0;
rcode = BadValue;
if (actualType != None)
{
XFree ((char *)*ppWsPresence);
}
}
}
return(rcode);
} /* END OF FUNCTION GetWorkspacePresence */
#endif /* HP_VUE */
/*************************************<->*************************************
*
* int DtWsmGetWorkspacesOccupied (display, window, ppaWs, pNumWs)
@ -277,18 +197,6 @@ DtWsmGetWorkspacesOccupied(
pNumWs,
XmInternAtom(display, _XA_DT_WORKSPACE_PRESENCE,
False));
#ifdef HP_VUE
/*
* Be compatible with HP VUE
*/
if (rcode != Success)
{
rcode = _GetWorkspacePresence (display, window, ppaWs,
pNumWs,
XmInternAtom(display, _XA_VUE_WORKSPACE_PRESENCE,
False));
}
#endif /* HP_VUE */
_DtSvcAppUnlock(app);
return (rcode);

View file

@ -31,8 +31,7 @@
**
** Description: Defines PRIVATE properties, structures, and
** parameters used for communication with the
** workspace manager. This also includes some
** backward compatibility stuff for HP_VUE.
** workspace manager.
**
** (c) Copyright 1996 Digital Equipment Corporation.
** (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
@ -162,19 +161,6 @@ typedef struct _DtWmHints
#define DtWM_BEHAVIOR_SUBPANEL (1L << 2)
#define DtWM_BEHAVIOR_SUB_RESTORED (1L << 3)
#ifdef HP_VUE
/*
* For Compatibility with some old HP VUE clients
*/
#define _XA_VUE_WORKSPACE_INFO "_VUE_WORKSPACE_INFO"
#define _XA_VUE_WORKSPACE_HINTS "_VUE_WORKSPACE_HINTS"
#define _XA_VUE_WORKSPACE_PRESENCE "_VUE_WORKSPACE_PRESENCE"
#define _XA_VUE_WM_REQUEST "_VUE_WM_REQUEST"
#define _XA_VUE_WM_HINTS "_VUE_WM_HINTS"
#endif /* HP_VUE */
/**********************************************************************
* Session atom names
**********************************************************************/
@ -261,29 +247,6 @@ typedef void (*DtWsmMarqueeSelectionProc) ();
* NOTE: The "(client -> dtwm)" indication calls out the direction
* of information flow. In this case, the client writes the
* property and dtwm reads the property.
*
*/
#ifdef HP_VUE
/*
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* % _VUE_WORKSPACE_INFO is obsolete, but maintained for %
* % backward compatiblity. Its function has been %
* % replaced by %
* % _DT_WORKSPACE_LIST %
* % _DT_WORKSPACE_INFO_<name> %
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* _VUE_WORKSPACE_INFO (dtwm -> client)
*
* This property is a list of structures that contain information
* on each workspace. Each structure contains the atom representing
* the workspace string name and the window id of the background
* window for the workspace (if any). The first workspace in the
* list is the "active" workspace for the screen. This property is
* placed on the window identified by the "wmWindow" member of
* the _MOTIF_WM_INFO property.
*/
#endif /* HP_VUE */
/*
*
* _DT_WM_REQUEST (client -> dtwm)
*
@ -329,21 +292,6 @@ typedef struct _DtWorkspaceHints
/* DtWorkspaceHints "wsflags" definitions */
#define DT_WORKSPACE_FLAGS_OCCUPY_ALL (1L << 0)
#ifdef HP_VUE
/*
* Obsolete WorkspaceInfo structure
*/
typedef struct _WorkspaceInfo
{
Atom workspace; /* workspace "name" */
Window backgroundWindow; /* backdrop window ID (if any) */
unsigned long bg; /* backdrop background pixel */
unsigned long fg; /* backdrop foreground pixel */
Atom backdropName; /* atomized name for backdrop */
} WorkspaceInfo;
#endif /* HP_VUE */
/**********************************************************************
* Marquee Selection Structures
**********************************************************************/
@ -390,41 +338,6 @@ struct _DtWsmCBContext
* Convenience Routines
**********************************************************************/
#ifdef HP_VUE
/*************************************<->*************************************
*
* Status DtGetWorkspaceInfo (display, root, ppWsInfo, pNumInfo)
*
*
* Description:
* -----------
* Get the contents of the _DT_WORKSPACE_INFO property on a window
*
*
* Inputs:
* ------
* display - display
* root - root window of screen being managed
* ppWsInfo - pointer to a pointer (to be returned)
* pNumInfo - pointer to a number (to be returned)
*
* Outputs:
* -------
* *ppWsInfo - pointer to a list of workspace info structures
* *pNumInfo - number of workspace info structures in list
* Return - Success if property fetched ok.
* Failure returns are from XGetWindowProperty
*
*************************************<->***********************************/
extern Status
DtGetWorkspaceInfo(
Display *display,
Window root,
WorkspaceInfo **ppWsInfo,
unsigned long *pNumInfo) ;
#endif /* HP_VUE */
/*************************************<->*************************************
*
* int _DtGetMwmWindow (display, root, pMwmWindow)

View file

@ -57,9 +57,6 @@ header file include flags, and macros (e.g. ABS).
over window icons. I suspect that this is not completely
implemented.
HP_VUE
This enables code that provides compatibility with HP_VUE.
ICCC_COMPLIANT
This enables stricter ICCCM compliance. Specifically, some
clients didn't get WM_PROTOCOLS quite right.

View file

@ -615,9 +615,6 @@ SetNewBackdrop(
ChangeBackdrop (pWS);
SaveWorkspaceResources (pWS, WM_RES_BACKDROP_IMAGE);
#ifdef HP_VUE
UpdateWorkspaceInfoProperty (pWS->pSD); /* to be backward compatible */
#endif /* HP_VUE */
SetWorkspaceInfoProperty (pWS);
/*
@ -627,7 +624,7 @@ SetNewBackdrop(
DtWSM_REASON_BACKDROP);
}
/******************************<->*************************************
*
* Boolean IsBackdropWindow (pSD, win)

View file

@ -1079,11 +1079,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
MapIconBoxes (pSD->pActiveWS);
ChangeBackdrop (pSD->pActiveWS);
#ifdef HP_VUE
UpdateWorkspaceInfoProperty (pSD); /* backward compatible */
#endif /* HP_VUE */
SetCurrentWorkspaceProperty (pSD);
SetWorkspaceListProperty (pSD);

View file

@ -1197,38 +1197,7 @@ void SetEmbeddedClientsProperty (Window propWindow,
} /* END OF FUNCTION SetEmbeddedClientsProperty */
#ifdef HP_VUE
/*************************************<->*************************************
*
* SetWorkspaceInfo (propWindow, pWsInfo, cInfo)
*
*
* Description:
* -----------
* This function sets up the _DT_WORKSPACE_INFO property
*
*
* Inputs:
* ------
* propWindow = window on which the _DT_WORKSPACE_INFO property is to be set
* pWsInfo = pointer to workspace info data
* cInfo = size of workspace info data
*
*
*************************************<->***********************************/
void SetWorkspaceInfo (Window propWindow, WorkspaceInfo *pWsInfo, unsigned long cInfo)
{
XChangeProperty (DISPLAY, propWindow, wmGD.xa_DT_WORKSPACE_INFO,
wmGD.xa_DT_WORKSPACE_INFO,
32, PropModeReplace, (unsigned char *)pWsInfo,
(cInfo * sizeof(WorkspaceInfo))/sizeof(long));
} /* END OF FUNCTION SetWorkspaceInfo */
#endif /* HP_VUE */
/*************************************<->*************************************
*
* SetWorkspaceListProperty (pSD)

View file

@ -49,9 +49,6 @@ extern MenuItem * GetMwmMenuItems (ClientData *pCD);
extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients);
extern void GetInitialPropertyList (ClientData *pCD);
extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll);
#ifdef HP_VUE
extern void SetWorkspaceInfo (Window propWindow, WorkspaceInfo *pWsInfo, unsigned long cInfo);
#endif /* HP_VUE */
extern void SetWorkspacePresence (Window propWindow, Atom *pWsPresence, unsigned long cPresence);
extern Boolean HasProperty(ClientData *pCD, Atom property);
extern void DiscardInitialPropertyList (ClientData *pCD);

View file

@ -240,10 +240,6 @@ ChangeToWorkspace(
ShowPresenceBox(pSD->presence.pCDforClient, F_CONTEXT_ICON);
}
#ifdef HP_VUE
/* sync up workspace info property with current state */
UpdateWorkspaceInfoProperty (pSD);
#endif /* HP_VUE */
SetCurrentWorkspaceProperty (pSD);
/* send workspace change broadcast message */
@ -305,9 +301,6 @@ ChangeWorkspaceTitle(
* Replace old workspace in info property
*/
SetWorkspaceInfoProperty (pWS);
#ifdef HP_VUE
UpdateWorkspaceInfoProperty (pWS->pSD);
#endif /* HP_VUE */
XFlush (DISPLAY);
/*
@ -391,83 +384,7 @@ UpdateWorkspacePresenceProperty(
} /* END OF FUNCTION UpdateWorkspacePresenceProperty */
#ifdef HP_VUE
/*************************************<->*************************************
*
* UpdateWorkspaceInfoProperty (pSD)
*
*
* Description:
* -----------
* This function updates the _DT_WORKSPACE_INFO property for the
* screen
*
* Inputs:
* ------
* pSD = pointer to screen data
*
*
*************************************<->***********************************/
void
UpdateWorkspaceInfoProperty(
WmScreenData *pSD )
{
WorkspaceInfo *pWsInfo;
WmWorkspaceData *pws;
int count;
if (wmGD.useStandardBehavior)
{
/*
* Don't change any workspace properties in standard behavior
* mode.
*/
return;
}
if (pWsInfo = (WorkspaceInfo *)
XtMalloc (pSD->numWorkspaces * sizeof(WorkspaceInfo)))
{
/* put current workspace at top of list */
pWsInfo[0].workspace = pSD->pActiveWS->id;
pWsInfo[0].backgroundWindow = pSD->pActiveWS->backdrop.window;
pWsInfo[0].bg = pSD->pActiveWS->backdrop.background;
pWsInfo[0].fg = pSD->pActiveWS->backdrop.foreground;
pWsInfo[0].backdropName = pSD->pActiveWS->backdrop.nameAtom;
/* add in the rest of the workspaces */
pws = pSD->pWS;
for (count = 1; count < pSD->numWorkspaces; count++)
{
if (pWsInfo[0].workspace == pws->id)
pws++; /* already at top, skip this one */
pWsInfo[count].workspace = pws->id;
pWsInfo[count].backgroundWindow = pws->backdrop.window;
pWsInfo[count].bg = pws->backdrop.background;
pWsInfo[count].fg = pws->backdrop.foreground;
pWsInfo[count].backdropName = pws->backdrop.nameAtom;
pws++;
}
/* set the property */
SetWorkspaceInfo (pSD->wmWorkspaceWin, pWsInfo,
pSD->numWorkspaces);
XtFree ((char *)pWsInfo);
}
else
{
Warning (((char *)GETMESSAGE(76, 3, "Insufficient memory to update workspace info")));
}
} /* END OF FUNCTION UpdateWorkspaceInfoProperty */
#endif /* HP_VUE */
/*************************************<->*************************************
*
* AddPersistentWindow (pWS)
@ -848,9 +765,6 @@ ProcessDtWmHints (ClientData *pCD)
{
DtWmHints *pHints;
Atom property;
#ifdef HP_VUE
Atom propertyVUE;
#endif /* HP_VUE */
long saveFunctions;
/*
@ -858,16 +772,9 @@ ProcessDtWmHints (ClientData *pCD)
*/
property = XmInternAtom(DISPLAY, _XA_DT_WM_HINTS, False);
#ifdef HP_VUE
propertyVUE = XmInternAtom(DISPLAY, _XA_VUE_WM_HINTS, False);
#endif /* HP_VUE */
if (
#ifdef HP_VUE
((HasProperty (pCD, property)) || (HasProperty (pCD, propertyVUE)))
#else /* HP_VUE */
(HasProperty (pCD, property))
#endif /* HP_VUE */
&& (_DtWsmGetDtWmHints (DISPLAY, pCD->client, &pHints) == Success))
{
pCD->clientFlags |= GOT_DT_WM_HINTS;
@ -997,14 +904,7 @@ GetClientWorkspaceInfo(
GetMyOwnPresence (pCD, &pIDs, &numIDs)) ||
(WorkspaceIsInCommand (DISPLAY, pCD, &pIDs, &numIDs)) ||
(
#ifdef HP_VUE
(HasProperty (pCD, wmGD.xa_DT_WORKSPACE_HINTS) ||
HasProperty (pCD,
XmInternAtom (DISPLAY, _XA_VUE_WORKSPACE_HINTS,
False)))
#else /* HP_VUE */
HasProperty (pCD, wmGD.xa_DT_WORKSPACE_HINTS)
#endif /* HP_VUE */
&& (GetWorkspaceHints (DISPLAY, pCD->client, &pIDs, &numIDs, &bAll) ==
Success))) &&
numIDs)
@ -3306,14 +3206,7 @@ GetMyOwnPresence(
* Get the workspace presence property
*/
if (
#ifdef HP_VUE
(HasProperty (pCD, wmGD.xa_DT_WORKSPACE_PRESENCE) ||
HasProperty (pCD,
XmInternAtom (DISPLAY, _XA_VUE_WORKSPACE_PRESENCE,
False)))
#else /* HP_VUE */
HasProperty (pCD, wmGD.xa_DT_WORKSPACE_PRESENCE)
#endif /* HP_VUE */
&& (DtWsmGetWorkspacesOccupied (DISPLAY, pCD->client, ppIDs,
&nIDs) == Success))
{

View file

@ -39,10 +39,6 @@ extern Boolean DuplicateWorkspaceName (
int num);
extern void UpdateWorkspacePresenceProperty(
ClientData *pCD) ;
#ifdef HP_VUE
extern void UpdateWorkspaceInfoProperty(
WmScreenData *pSD) ;
#endif /* HP_VUE */
extern WmWorkspaceData * CreateWorkspace(
WmScreenData *pSD,
unsigned char *name) ;