Remove ancient HP VUE compatibility support
authorwmoxam <wes@wmoxam.com>
Mon, 14 Oct 2019 13:39:50 +0000 (09:39 -0400)
committerJon Trulson <jon@radscan.com>
Wed, 16 Oct 2019 02:32:05 +0000 (20:32 -0600)
cde/lib/DtSvc/DtUtil1/GetVWmHint.c
cde/lib/DtSvc/DtUtil1/WmWsOccupy.c
cde/lib/DtSvc/DtUtil1/WsmP.h
cde/programs/dtwm/README
cde/programs/dtwm/WmBackdrop.c
cde/programs/dtwm/WmInitWs.c
cde/programs/dtwm/WmProperty.c
cde/programs/dtwm/WmProperty.h
cde/programs/dtwm/WmWrkspace.c
cde/programs/dtwm/WmWrkspace.h

index b1701e6ff265f7cd7c8a02ebac43922873f4cef3..0cc7d5c78db87714f6dca1dd6824fe26c6ccf289 100644 (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 */
 
index f2542bb7eb3ac9401d5f9cf5fbd27bf0584df864..c19a91cdc826c23cbe985f480c5bff00c4875b33 100644 (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
-\f
-/*************************************<->*************************************
- *
- *  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 */
-
-\f
 /*************************************<->*************************************
  *
  *  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);
index cbf792d4da397c5eb167ed5af82ac34959823b98..9d32e116b4502a2e89d6d6667c7780a25e6affcb 100644 (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)
index 9365738676cd7ff5354a9d1287b50c3fa9d54211..eb1961fb72136ff1c94dc0edfd5e260900d2fc03 100644 (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.
index 4cdfac56f1429e407c3d0aec9e7d62b4a3e7cfaa..57fa77fdcaf2314c8fe7981698950a3574d061d1 100644 (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);
 }
 
-\f
+
 /******************************<->*************************************
  *
  *  Boolean IsBackdropWindow (pSD, win)
index f902586eb2d6779a73395588c435ef21443d7458..fc3be949a88b748eaf4d94dbda10a5025adfe36e 100644 (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);
 
index 5cde076f5fcd4da80128b5e8d611ec37395d64d6..30a084dde7ff768efddc661ed454536a10bd8251 100644 (file)
@@ -1197,38 +1197,7 @@ void SetEmbeddedClientsProperty (Window propWindow,
 
 } /* END OF FUNCTION SetEmbeddedClientsProperty */
 
-#ifdef HP_VUE
-\f
-/*************************************<->*************************************
- *
- *  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 */
-
-\f
 /*************************************<->*************************************
  *
  *  SetWorkspaceListProperty (pSD)
index a7c24c436e8a8fdac16a1a69422f26a83363db8d..389033cdd95e30f95ede2046cb875696a203cce1 100644 (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);
index 29693dbbbb49b13586dc143427dfefeed3dd284a..38cfd769ad9173716f8b8cd10f048e966fac96b7 100644 (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
-\f
-/*************************************<->*************************************
- *
- *  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 */
-
-\f
 /*************************************<->*************************************
  *
  *  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))
     {
index 183665799307660e89957fd6b2a1c3ebe979e878..ebb5738a2dbe356e52d2276d3472a82dfe449177 100644 (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) ;