Browse Source

Add client_tab_next_opened uicb

Martin Duquesnoy 12 years ago
parent
commit
e484510f52
6 changed files with 20 additions and 1 deletions
  1. 8 0
      src/client.c
  2. 1 0
      src/client.h
  3. 1 0
      src/config.h
  4. 8 0
      src/layout.c
  5. 1 1
      src/systray.c
  6. 1 0
      src/wmfs.h

+ 8 - 0
src/client.c

@@ -1431,6 +1431,14 @@ uicb_client_toggle_free(Uicb cmd)
      }
 }
 
+void
+uicb_client_tab_next_opened(Uicb cmd)
+{
+     (void)cmd;
+
+     W->flags ^= WMFS_TABNOC;
+}
+
 void
 client_free(void)
 {

+ 1 - 0
src/client.h

@@ -58,6 +58,7 @@ void client_update_props(struct client *c, Flags f);
 void client_fac_hint(struct client *c);
 void uicb_client_untab(Uicb cmd);
 void uicb_client_toggle_free(Uicb cmd);
+void uicb_client_tab_next_opened(Uicb cmd);
 
 /* Generated */
 void uicb_client_resize_Right(Uicb);

+ 1 - 0
src/config.h

@@ -78,6 +78,7 @@ static const struct { char *name; void (*func)(Uicb cmd); } uicb_list[] =
      { "client_focus_prev_tab",   uicb_client_focus_prev_tab },
      { "client_focus_click",      uicb_client_focus_click },
      { "client_toggle_free",      uicb_client_toggle_free },
+     { "client_tab_next_opened",  uicb_client_tab_next_opened },
 
      /* Status */
      { "status" , uicb_status },

+ 8 - 0
src/layout.c

@@ -393,6 +393,14 @@ layout_split_integrate(struct client *c, struct client *sc)
           }
      }
 
+     /* Tab Next Opened Client */
+     if(W->flags & WMFS_TABNOC)
+     {
+          W->flags ^= WMFS_TABNOC;
+          _client_tab(c, sc);
+          return;
+     }
+
      c->flags |= CLIENT_TILED;
 
      g = layout_split(sc, (sc->geo.h < sc->geo.w));

+ 1 - 1
src/systray.c

@@ -72,7 +72,7 @@ systray_add(Window win)
      s->geo.h = W->systray.barwin->geo.h;
      s->geo.w = W->systray.barwin->geo.h + SYSTRAY_SPACING;
 
-     ewmh_set_wm_state(s->win, WithdrawnState);
+     ewmh_set_wm_state(s->win, NormalState);
      XSelectInput(W->dpy, s->win, StructureNotifyMask | PropertyChangeMask| EnterWindowMask | FocusChangeMask);
      XReparentWindow(W->dpy, s->win, W->systray.win, 0, 0);
 

+ 1 - 0
src/wmfs.h

@@ -325,6 +325,7 @@ struct wmfs
 #define WMFS_LOG      0x10
 #define WMFS_LAUNCHER 0x20
 #define WMFS_SIGCHLD  0x40
+#define WMFS_TABNOC   0x80 /* tab next opened client */
      Flags flags;
      GC gc, rgc;
      Atom *net_atom;