dtwm: Remove WSM define, that is always on for CDE

This commit is contained in:
Peter Howkins
2018-06-20 00:46:58 +01:00
parent 5dc05eaeb4
commit 9a551dd8a6
57 changed files with 237 additions and 2797 deletions

View File

@@ -56,9 +56,7 @@
#include "WmProperty.h"
#include "WmWinInfo.h"
#include "WmWinList.h"
#ifdef WSM
#include "WmWrkspace.h"
#endif /* WSM */
/*
@@ -117,9 +115,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
ClientData *pcdLeader;
int currentState;
WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
#ifdef WSM
Boolean notShowing = (newState & UNSEEN_STATE);
#endif /* WSM */
currentState = pCD->clientState;
if (currentState == newState)
@@ -136,9 +132,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
*/
pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
#ifdef WSM
SetClientWsIndex (pCD);
#endif /* WSM */
if (pCD->transientLeader)
{
@@ -146,12 +140,10 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
(newState != WITHDRAWN_STATE))
{
newState = MINIMIZED_STATE;
#ifdef WSM
if (notShowing)
{
newState |= UNSEEN_STATE;
}
#endif /* WSM */
}
else if ((newState == MINIMIZED_STATE) &&
(pcdLeader->clientState != MINIMIZED_STATE))
@@ -159,22 +151,18 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
if (currentState == WITHDRAWN_STATE)
{
newState = NORMAL_STATE;
#ifdef WSM
if (notShowing)
{
newState |= UNSEEN_STATE;
}
#endif /* WSM */
}
else
{
newState = currentState;
#ifdef WSM
if (notShowing)
{
newState |= UNSEEN_STATE;
}
#endif /* WSM */
}
}
if (newState == currentState)
@@ -186,11 +174,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
switch (newState)
{
#ifdef WSM
case UNSEEN_STATE | WITHDRAWN_STATE:
#else
case WITHDRAWN_STATE:
#endif /* WSM */
{
/*
* Free window manager resources (frame and icon). The
@@ -205,11 +189,9 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
case MAXIMIZED_STATE:
{
SetupWindowStateWithEventMask (pCD, newState, setTime, event_mask);
#ifdef WSM
XMapWindow (DISPLAY, pCD->client);
XMapWindow (DISPLAY, pCD->clientFrameWin);
WmStopWaiting(); /* in WmIPC.c */
#endif /* WSM */
break;
}
@@ -275,7 +257,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
if (ICON_FRAME_WIN(pCD))
{
#ifdef WSM
if (pCD->clientState & UNSEEN_STATE)
{
if (pCD->iconWindow)
@@ -286,9 +267,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
}
ShowAllIconsForMinimizedClient (pCD);
#else /* WSM */
ShowIconForMinimizedClient (pSD->pActiveWS, pCD);
#endif /* WSM */
}
SetClientWMState (pCD, IconicState, MINIMIZED_STATE);
@@ -317,7 +295,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
break;
}
#ifdef WSM
case UNSEEN_STATE | NORMAL_STATE:
case UNSEEN_STATE | MAXIMIZED_STATE:
@@ -369,7 +346,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
}
}
break;
#endif /* WSM */
}
} /* END OF FUNCTION SetClientStateWithEventMask */
@@ -408,12 +384,8 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
Time setTime, unsigned int event_mask)
{
int currentState;
#ifdef WSM
int wsI, iplace;
WmWorkspaceData *pWS_i;
#else /* WSM */
WmWorkspaceData *pWS = PSD_FOR_CLIENT(pCD)->pActiveWS;
#endif /* WSM */
WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
currentState = pCD->clientState;
@@ -500,7 +472,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
XMaskEvent(DISPLAY, event_mask, &event);
XUngrabPointer(DISPLAY,CurrentTime);
}
#ifdef WSM
if (wmGD.iconAutoPlace)
{
for (wsI = 0; wsI < pCD->numInhabited; wsI++)
@@ -515,13 +486,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
}
}
}
#else /* WSM */
if ((wmGD.iconAutoPlace) && (ICON_PLACE(pCD) != NO_ICON_PLACE))
{
pWS->IPData.placeList[ICON_PLACE(pCD)].pCD =
NULL;
}
#endif /* WSM */
}
if (clearIconFocus)
@@ -546,13 +510,9 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
*/
pCD->clientState = newState;
#ifdef WSM
wmGD.bSuspendSecondaryRestack = True;
#endif /* WSM */
F_Raise (NULL, pCD, NULL);
#ifdef WSM
wmGD.bSuspendSecondaryRestack = False;
#endif /* WSM */
}
if ( (!(pCD->clientFlags & ICON_BOX)) ||
@@ -774,16 +734,12 @@ static void UnmapClients (ClientData *pCD, unsigned int event_mask)
void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
{
ClientData *pNext;
#ifdef WSM
Boolean bToUnseen;
bToUnseen = (mwmState & UNSEEN_STATE) != 0;
mwmState &= ~UNSEEN_STATE;
#endif /* WSM */
#ifdef WSM
SetClientWsIndex (pCD);
#endif /* WSM */
pNext = pCD->transientChildren;
while (pNext)
{
@@ -792,37 +748,29 @@ void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
SetClientWMState (pNext, wmState, mwmState);
}
#ifdef WSM
SetClientWsIndex (pNext);
#endif /* WSM */
SetWMState (pNext->client, wmState, ICON_FRAME_WIN(pNext));
if (pNext->maxConfig && mwmState == NORMAL_STATE)
{
pNext->clientState = MAXIMIZED_STATE;
}
#ifdef WSM
else if (!pNext->maxConfig && mwmState == MAXIMIZED_STATE)
{
pNext->clientState = NORMAL_STATE;
}
#endif /* WSM */
else
{
pNext->clientState = mwmState;
}
#ifdef WSM
if (bToUnseen)
pNext->clientState |= UNSEEN_STATE;
#endif /* WSM */
pNext = pNext->transientSiblings;
}
SetWMState (pCD->client, wmState, ICON_FRAME_WIN(pCD));
pCD->clientState = mwmState;
#ifdef WSM
if (bToUnseen)
pCD->clientState |= UNSEEN_STATE;
#endif /* WSM */
} /* END OF FUNCTION SetClientWMState */
@@ -1389,17 +1337,11 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
CvtIconPlaceToPosition (&pWS->IPData, ICON_PLACE(pCD),
&ICON_X(pCD), &ICON_Y(pCD));
#ifndef WSM
XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD),
ICON_X(pCD), ICON_Y(pCD));
#endif /* WSM */
}
pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = pCD;
}
#ifdef WSM
/*
* If icon on root window and this workspace is active, the
* make sure it's in the right place.
@@ -1409,7 +1351,7 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD),
ICON_X(pCD), ICON_Y(pCD));
}
#endif /* WSM */
if (pCD->iconWindow)
{
XMapWindow (DISPLAY, pCD->iconWindow);
@@ -1460,20 +1402,14 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
&pCD->clientEntry);
}
#ifdef WSM
if (pWS == pSD->pActiveWS)
{
XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
}
#else /* WSM */
XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
#endif /* WSM */
}
} /* END OF FUNCTION ShowIconForMinimizedClient */
#ifdef WSM
/*************************************<->*************************************
*
* ShowAllIconsForMinimizedClient (pCD)
@@ -1516,5 +1452,3 @@ void ShowAllIconsForMinimizedClient (ClientData *pCD)
pCD->currentWsc = saveWsc;
} /* END OF FUNCTION ShowAllIconsForMinimizedClient */
#endif /* WSM */