dtcm: Coverity 89287
[oweals/cde.git] / cde / programs / dtwm / WmWinList.c
index c970664de981485dba1a7a6b8c0adac16eb7af4f..e6909c66bbeba3c5efb54042ecdbec8873637373 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmWinList.c /main/8 1997/06/10 15:50:50 samborn $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 Hewlett-Packard Company
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -60,9 +55,7 @@ static char rcsid[] = "$TOG: WmWinList.c /main/8 1997/06/10 15:50:50 samborn $"
 #include "WmMenu.h"
 #include "WmResource.h"
 #include "WmWinInfo.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 
@@ -109,9 +102,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
     Boolean belowSystemModal = False;
     XWindowChanges windowChanges;
     WmScreenData *pSD = pWS->pSD;
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
 
 
     if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL)
@@ -175,11 +166,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
        }
 
 
-#ifdef WSM
        if (!pWsc->pIconBox && pWsc->iconFrameWin)
-#else /* WSM */
-       if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
        {
            /*
             * Put the icon on the bottom of the stack.
@@ -187,27 +174,18 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
 
            if (pSD->lastClient->type == MINIMIZED_STATE)
            {
-#ifdef WSM
                WsClientData *pWsib;
 
                pWsib = &pSD->lastClient->pCD->pWsList[0];
                windowChanges.sibling = pWsib->iconFrameWin;
-#else /* WSM */
-               windowChanges.sibling = pSD->lastClient->pCD->iconFrameWin;
-#endif /* WSM */
            }
            else
            {
                windowChanges.sibling = pSD->lastClient->pCD->clientFrameWin;
            }
            windowChanges.stack_mode = Below;
-#ifdef WSM
            XConfigureWindow (DISPLAY, pWsc->iconFrameWin,
                CWSibling | CWStackMode, &windowChanges);
-#else /* WSM */
-           XConfigureWindow (DISPLAY, pCD->iconFrameWin,
-               CWSibling | CWStackMode, &windowChanges);
-#endif /* WSM */
 
            pCD->iconEntry.type = MINIMIZED_STATE;
            pCD->iconEntry.pCD = pCD;
@@ -449,9 +427,7 @@ void DeleteEntryFromList (WmWorkspaceData *pWS, ClientListEntry *pListEntry)
 
 void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
 {
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
     WmScreenData *pSD = pWS->pSD;
 
     if (pCD->transientLeader)
@@ -474,11 +450,7 @@ void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
         * Remove the client and icon entries from the window list.
         */
 
-#ifdef WSM
        if (!pWsc->pIconBox && pWsc->iconFrameWin)
-#else /* WSM */
-       if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
        {
            if (pCD->iconEntry.prevSibling)
            {
@@ -1017,12 +989,10 @@ Boolean PutTransientOnTop (ClientData *pcd)
        {
            restack = True;
        }
-#ifdef WSM
        if (BumpPrimaryToBottom (pcdLeader))
        {
            restack = True;
        }
-#endif /* WSM */
     }
 
     return (restack);
@@ -1121,9 +1091,6 @@ void RestackTransients (ClientData *pcd)
     int count;
     static int size = 0;
     static Window *windows = NULL;
-#ifndef WSM
-    Window *nextWindow;
-#endif /* WSM */
     XWindowChanges windowChanges;
     int i;
     int leaderIndex;
@@ -1155,12 +1122,7 @@ void RestackTransients (ClientData *pcd)
        size = count + 5;
     }
 
-#ifdef WSM
     MakeTransientFamilyStackingList (windows, pcdLeader);
-#else /* WSM */
-    nextWindow = MakeTransientWindowList (windows, pcdLeader);
-    *nextWindow = pcdLeader->clientFrameWin;
-#endif /* WSM */
 
     /*
      *  Changes for CDExc19397.
@@ -1476,7 +1438,6 @@ ClientData * FindTransientOnTop (ClientData *pcd)
      */
 
     pcd = FindTransientTreeLeader (pcd);
-#ifdef WSM
     if (!(pcd->secondariesOnTop) &&
        (LeaderOnTop (pcd)))
     {
@@ -1494,7 +1455,6 @@ ClientData * FindTransientOnTop (ClientData *pcd)
                return (pcdSub);
        }
     }
-#endif /* WSM */
 
 
     /*
@@ -1660,7 +1620,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
     }
     else
     {
-#ifdef WSM
        /*
         * Adjust stack entry window if we're stacking below a
         * transient tree.
@@ -1670,7 +1629,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
            stackWindow = LowestWindowInTransientFamily (pStackEntry->pCD);
        }
 
-#endif /* WSM */
        if (stackWindow == 0)
        {
            if (pSD->lastClient->type == MINIMIZED_STATE)
@@ -1679,14 +1637,12 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
            }
            else
            {
-#ifdef WSM
                if (pSD->lastClient->pCD->transientChildren)
                {
                    stackWindow = 
                        LowestWindowInTransientFamily (pSD->lastClient->pCD);
                }
                else
-#endif /* WSM */
                stackWindow = pSD->lastClient->pCD->clientFrameWin;
            }
        }
@@ -1887,7 +1843,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB)
     int bY1;
     int bY2;
 
-#ifdef WSM
     /*
      * For workspace stuff: if either is unseen, then neither
      * is obscured.
@@ -1897,7 +1852,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB)
     {
        return (False);
     }
-#endif /* WSM */
 
     if (pcdA->clientState == NORMAL_STATE)
     {
@@ -2428,8 +2382,7 @@ ClientListEntry * FindClientNameMatch (ClientListEntry *pEntry,
     return (pEntry);
 
 } /* END OF FUNCTION FindClientNameMatch */
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  BumpPrimaryToTop (pcdLeader)
@@ -2671,7 +2624,7 @@ MakeTransientFamilyStackingList (
     ClientData *pcdSub;
     Window *nextWindow, wSave, wTemp, wTop;
     int count = CountTransientChildren (pcdLeader);
-    register int i, j;
+    int i, j;
 
     /*
      * Construct the transient stacking list according to
@@ -2826,4 +2779,3 @@ LeaderOnTop (
     return (bOnTop);
 }
 
-#endif /* WSM */