41fdcebf01af — Chris Cannam 5 years ago
Fix some compiler warnings
5 files changed, 10 insertions(+), 15 deletions(-)

M Border.C
M Client.C
M Client.h
M Config.C
M Session.C
M Border.C +0 -4
@@ 33,13 33,9 @@ Pixmap Border::m_backgroundPixmap = None
 class BorderRectangle // must resemble XRectangle in storage
 {
 public:
-    BorderRectangle() { }
     BorderRectangle(int xx, int yy, int ww, int hh) {
 	x = xx; y = yy; width = ww; height = hh;
     }
-    BorderRectangle(const BorderRectangle &b) {
-	x = b.x; y = b.y; width = b.width; height = b.height;
-    }
 
     XRectangle *xrectangle() { return (XRectangle *)this; }
 

          
M Client.C +5 -5
@@ 660,25 660,25 @@ void Client::deactivate()	// called from
 void Client::setSticky(Boolean sticky) 
 {    
     m_sticky = sticky;
-    setNetwmProperty(Atoms::netwm_winState, WIN_STATE_STICKY, sticky);
+//    setNetwmProperty(Atoms::netwm_winState, WIN_STATE_STICKY, sticky);
 }
 
 void Client::setMovable(Boolean movable) 
 { 
-    setNetwmProperty(Atoms::netwm_winState, WIN_STATE_FIXED_POSITION, !movable);
+//    setNetwmProperty(Atoms::netwm_winState, WIN_STATE_FIXED_POSITION, !movable);
     m_movable = movable;
 }
 
 void Client::setSkipFocus(Boolean skipFocus) 
 { 
-    setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_SKIP_FOCUS, skipFocus);      
+//    setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_SKIP_FOCUS, skipFocus);      
     m_skipFocus = skipFocus;
     fprintf(stderr, "Setting \"%s\" to %sskip focus\n", name(), skipFocus?"":"not ");
 }
 
 void Client::setFocusOnClick(Boolean focusOnClick) 
 { 
-    setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_FOCUS_ON_CLICK, focusOnClick);      
+//    setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_FOCUS_ON_CLICK, focusOnClick);      
     m_focusOnClick = focusOnClick;
 }
 

          
@@ 1614,7 1614,7 @@ void Client::updateFromNetwmProperty(Ato
             if(!m_isFullHeight)
                 maximise(Vertical);
         } else {
-            if(m_isFullHeight);
+            if(m_isFullHeight)
                 unmaximise(Vertical);
         }
         

          
M Client.h +0 -1
@@ 10,7 10,6 @@ 
 class EdgeRect {
 public:
     EdgeRect() : left(0), right(0), top(0), bottom(0) { }
-    ~EdgeRect() { }
     int left, right, top, bottom;
 };
 

          
M Config.C +3 -3
@@ 173,19 173,19 @@ void DynamicConfig::update(char *string)
 	}
   
 	if (OPTION("tabfg:")) {
-	    strncpy(m_impl->tabfg, s, COLOR_LEN);
+	    strncpy(m_impl->tabfg, s, COLOR_LEN-1);
 	    m_impl->tabfg[COLOR_LEN-1] = '\0';	// prevent unterminated string
 	    s += strlen(m_impl->tabfg);		// avoid error message below
 	}
 
 	if (OPTION("tabbg:")) {
-	    strncpy(m_impl->tabbg, s, COLOR_LEN);
+	    strncpy(m_impl->tabbg, s, COLOR_LEN-1);
 	    m_impl->tabbg[COLOR_LEN-1] = '\0';
 	    s += strlen(m_impl->tabbg);
 	}
 
 	if (OPTION("framebg:")) {
-	    strncpy(m_impl->framebg, s, COLOR_LEN);
+	    strncpy(m_impl->framebg, s, COLOR_LEN-1);
 	    m_impl->framebg[COLOR_LEN-1] = '\0';
 	    s += strlen(m_impl->framebg);
 	}

          
M Session.C +2 -2
@@ 132,8 132,8 @@ void WindowManager::setSessionProperties
     programVal.length = strlen(m_sessionProgram);
     programVal.value = m_sessionProgram;
 
-    userIDVal.length = user ? 7 : strlen(user);
-    userIDVal.value = user ? (SmPointer)"unknown" : (SmPointer)user;
+    userIDVal.length = user ? strlen(user) : 7;
+    userIDVal.value = user ? (SmPointer)user : (SmPointer)"unknown";
 
     restartVal[0].length = strlen(m_sessionProgram);
     restartVal[0].value = m_sessionProgram;