Browse Source

Fix warnings

Martin Duquesnoy 12 years ago
parent
commit
b7b0577aa9
3 changed files with 7 additions and 13 deletions
  1. 0 9
      src/client.h
  2. 5 3
      src/infobar.c
  3. 2 1
      src/layout.c

+ 0 - 9
src/client.h

@@ -214,13 +214,4 @@ client_get_larger(struct tag *t, bool ignoring_tag)
      return lc;
 }
 
-static inline void
-clients_layout_refresh(void)
-{
-     struct client *c;
-
-     SLIST_FOREACH(c, &W->h.client, next)
-          layout_fix_hole(c);
-}
-
 #endif /* CLIENT_H */

+ 5 - 3
src/infobar.c

@@ -11,6 +11,7 @@
 #include "tag.h"
 #include "status.h"
 #include "systray.h"
+#include "client.h"
 
 #define ELEM_FREE_BARWIN(e)                     \
      while(!SLIST_EMPTY(&e->bars))              \
@@ -518,9 +519,10 @@ infobar_free(struct screen *s)
 void
 uicb_infobar_toggle_hide(Uicb iname)
 {
+     struct client *c;
      struct infobar *i;
 
-     if (iname)
+     if(iname)
           i = infobar_gb_name(iname);
      else
           i = SLIST_FIRST(&W->screen->infobars);
@@ -557,6 +559,6 @@ uicb_infobar_toggle_hide(Uicb iname)
           }
      }
 
-     clients_layout_refresh();
+     SLIST_FOREACH(c, &W->h.client, next)
+          layout_fix_hole(c);
 }
-

+ 2 - 1
src/layout.c

@@ -4,6 +4,7 @@
  */
 
 #include <X11/Xutil.h>
+#include <X11/XKBlib.h>
 
 #include "layout.h"
 #include "config.h"
@@ -152,7 +153,7 @@ _historic_set(struct tag *t, bool prev)
           if(ev.type == KeyPress)
           {
                XKeyPressedEvent *ke = &ev.xkey;
-               keysym = XKeycodeToKeysym(W->dpy, (KeyCode)ke->keycode, 0);
+               keysym = XkbKeycodeToKeysym(W->dpy, (KeyCode)ke->keycode, 0, 0);
 
                _REV_BORDER();