Client: Fix flag set and manage

This commit is contained in:
Martin Duquesnoy 2011-06-02 14:38:10 +02:00
parent 34d94335f2
commit 0b94f5496e
2 changed files with 12 additions and 10 deletions

View File

@ -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++)

View File

@ -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))