Browse Source

dtwm: fix compiler warnings.

hyousatsu 1 year ago
parent
commit
69d47966ad

+ 3 - 1
cde/programs/dtwm/WmCEvent.c

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

+ 7 - 7
cde/programs/dtwm/WmEwmh.c

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

+ 1 - 1
cde/programs/dtwm/WmGlobal.h

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

+ 1 - 1
cde/programs/dtwm/WmWinInfo.c

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

+ 5 - 6
cde/programs/dtwm/WmWinState.c

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