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

dtwm: fix compiler warnings.

This commit is contained in:
hyousatsu 2022-07-14 06:24:11 +00:00 committed by Jon Trulson
parent bba694f5f2
commit 69d47966ad
5 changed files with 17 additions and 16 deletions

View file

@ -611,7 +611,9 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
case ClientMessage: case ClientMessage:
{ {
if (pCD = InitClientData (pEvent->xclient.window)) { if (pCD = InitClientData (pEvent->xclient.window)) {
XClientMessageEvent *clientEvent = pEvent; XClientMessageEvent *clientEvent;
clientEvent = (XClientMessageEvent *) pEvent;
if (clientEvent->message_type == if (clientEvent->message_type ==
wmGD.xa__NET_WM_FULLSCREEN_MONITORS) wmGD.xa__NET_WM_FULLSCREEN_MONITORS)

View file

@ -76,7 +76,7 @@ static void UpdateNetWmState (ClientData *pCD)
if (pCD->maxConfig) if (pCD->maxConfig)
{ {
if (pCD->isFullscreen) if (pCD->fullscreen)
{ {
atoms[natoms++] = wmGD.xa__NET_WM_STATE_FULLSCREEN; atoms[natoms++] = wmGD.xa__NET_WM_STATE_FULLSCREEN;
} }
@ -100,15 +100,15 @@ static void ProcessNetWmStateFullscreen (ClientData *pCD, long action)
switch (action) switch (action)
{ {
case _NET_WM_STATE_REMOVE: case _NET_WM_STATE_REMOVE:
if (!pCD->isFullscreen) return; if (!pCD->fullscreen) return;
pCD->isFullscreen = False; pCD->fullscreen = False;
break; break;
case _NET_WM_STATE_ADD: case _NET_WM_STATE_ADD:
if (pCD->isFullscreen) return; if (pCD->fullscreen) return;
pCD->isFullscreen = True; pCD->fullscreen = True;
break; break;
case _NET_WM_STATE_TOGGLE: case _NET_WM_STATE_TOGGLE:
pCD->isFullscreen = !pCD->isFullscreen; pCD->fullscreen = !pCD->fullscreen;
break; break;
default: default:
return; return;
@ -116,7 +116,7 @@ static void ProcessNetWmStateFullscreen (ClientData *pCD, long action)
SetClientState (pCD, NORMAL_STATE, GetTimestamp ()); SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
if (pCD->isFullscreen) if (pCD->fullscreen)
SetClientState (pCD, MAXIMIZED_STATE, GetTimestamp ()); SetClientState (pCD, MAXIMIZED_STATE, GetTimestamp ());
} }

View file

@ -1630,7 +1630,7 @@ typedef struct _ClientData
Window clientBaseWin; /* for matte & reparenting */ Window clientBaseWin; /* for matte & reparenting */
int xBorderWidth; /* original X border width */ int xBorderWidth; /* original X border width */
FrameInfo frameInfo; /* frame geometry data */ FrameInfo frameInfo; /* frame geometry data */
Boolean isFullscreen; /* True => fullscreen */ Boolean fullscreen; /* fullscreen flag */
Boolean monitorSizeIsSet; /* True => X, Y, W, H is set */ Boolean monitorSizeIsSet; /* True => X, Y, W, H is set */
int monitorX; /* monitor X loc */ int monitorX; /* monitor X loc */
int monitorY; /* monitor Y loc */ int monitorY; /* monitor Y loc */

View file

@ -219,7 +219,7 @@ InitClientData (Window clientWindow)
pCD->smClientID = (String)NULL; pCD->smClientID = (String)NULL;
pCD->isFullscreen = False; pCD->fullscreen = False;
pCD->monitorSizeIsSet = False; pCD->monitorSizeIsSet = False;
for (i = 0; i < STRETCH_COUNT; ++i) pCD->clientStretchWin[i] = (Window)0L; for (i = 0; i < STRETCH_COUNT; ++i) pCD->clientStretchWin[i] = (Window)0L;

View file

@ -604,7 +604,7 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
void ConfigureNewState (ClientData *pcd) void ConfigureNewState (ClientData *pcd)
{ {
if (pcd->maxConfig && !pcd->isFullscreen) if (pcd->maxConfig && !pcd->fullscreen)
{ {
pcd->maxConfig = FALSE; pcd->maxConfig = FALSE;
RegenerateClientFrame(pcd); RegenerateClientFrame(pcd);
@ -614,17 +614,16 @@ void ConfigureNewState (ClientData *pcd)
} }
else else
{ {
long decor = WM_DECOR_DEFAULT; long decor = pcd->decor;
WmHeadInfo_t *WmHI; WmHeadInfo_t *WmHI;
if (pcd->isFullscreen) if (pcd->fullscreen)
{ {
decor = pcd->decor;
pcd->decor = WM_DECOR_NONE; pcd->decor = WM_DECOR_NONE;
SetClientOffset (pcd); SetClientOffset (pcd);
} }
if (pcd->isFullscreen && pcd->monitorSizeIsSet) if (pcd->fullscreen && pcd->monitorSizeIsSet)
{ {
pcd->maxX = pcd->monitorX; pcd->maxX = pcd->monitorX;
pcd->maxY = pcd->monitorY; pcd->maxY = pcd->monitorY;
@ -654,7 +653,7 @@ void ConfigureNewState (ClientData *pcd)
pcd->maxConfig = TRUE; pcd->maxConfig = TRUE;
RegenerateClientFrame(pcd); RegenerateClientFrame(pcd);
if (pcd->isFullscreen) if (pcd->fullscreen)
{ {
pcd->decor = decor; pcd->decor = decor;
SetClientOffset (pcd); SetClientOffset (pcd);