From 0b94f5496e48aa37f890e75f79a71c0c586db064 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 2 Jun 2011 14:38:10 +0200 Subject: [PATCH] Client: Fix flag set and manage --- src/client.c | 21 +++++++++++---------- src/structs.h | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/client.c b/src/client.c index 03ee26b..db9c556 100644 --- a/src/client.c +++ b/src/client.c @@ -864,35 +864,33 @@ client_manage(Window w, XWindowAttributes *wa, Bool ar) c->flags |= FreeFlag; free(t); - /* Handle client from here */ client_attach(c); - client_get_name(c); - tags[c->screen][c->tag].flags |= CleanFactFlag;; - client_set_rules(c); + client_get_name(c); + tags[c->screen][c->tag].flags |= CleanFactFlag; - client_update_attributes(c); - - /* If client will be visible soon so.. */ if(c->tag == (uint)seltag[selscreen]) { - setwinstate(c->win, NormalState); client_raise(c); client_map(c); - client_focus(c); + setwinstate(c->win, NormalState); } else client_hide(c); + client_update_attributes(c); + ewmh_get_client_list(); ewmh_manage_window_type(c); - /* Need arrange for dynamic layouts */ if(ar) arrange(c->screen, True); if(!conf.client.set_new_win_master) layout_set_client_master(c); + if(c->tag == (uint)seltag[selscreen]) + client_focus(c); + if(conf.client.new_client_get_mouse) { /* Move pointer on client */ @@ -1279,6 +1277,9 @@ client_unmanage(Client *c) XUngrabServer(dpy); ewmh_get_client_list(); + if(c->flags & TileFlag) + tags[c->screen][c->tag].flags |= CleanFactFlag; + if(c->tag == MAXTAG + 1) { for(i = 0; i < conf.ntag[c->screen]; i++) diff --git a/src/structs.h b/src/structs.h index ebbb52a..7e151ba 100644 --- a/src/structs.h +++ b/src/structs.h @@ -61,6 +61,7 @@ #define AboveFCFlag (1 << 4) #define CleanFactFlag (1 << 5) #define StayLastFlag (1 << 6) +#define SplitFlag (1 << 7) #define TagFlag(t) (1 << (t))