Fix for windows showing up in tile-mode and not before already floated (FS#22)

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Nikos Ntarmos 2008-01-16 19:01:30 +01:00 committed by Julien Danjou
parent 3fc3fd9623
commit 7c122e00ac
3 changed files with 11 additions and 3 deletions

View File

@ -313,7 +313,6 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
Rule *rule;
int phys_screen = get_phys_screen(screen);
XLowerWindow(globalconf.display, w);
area = get_screen_area(screen, NULL, NULL);
c = p_new(Client, 1);
@ -324,6 +323,7 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
c->geometry.width = c->f_geometry.width = c->m_geometry.width = wa->width;
c->geometry.height = c->f_geometry.height = c->m_geometry.height = wa->height;
c->oldborder = wa->border_width;
c->newcomer = True;
c->screen = get_screen_bycoord(c->geometry.x, c->geometry.y);

View File

@ -187,6 +187,8 @@ struct Client
Window win;
/** Client logical screen */
int screen;
/** True if the client is a new one */
Bool newcomer;
};
typedef struct FocusList FocusList;

View File

@ -63,14 +63,20 @@ arrange(int screen)
for(c = globalconf.clients; c; c = c->next)
{
if(client_isvisible(c, screen))
if(client_isvisible(c, screen) && !c->newcomer)
client_unban(c);
/* we don't touch other screens windows */
else if(c->screen == screen)
else if(c->screen == screen || c->newcomer)
client_ban(c);
}
curtags[0]->layout->arrange(screen);
for(c = globalconf.clients; c; c = c->next)
if(c->newcomer && client_isvisible(c, screen))
{
c->newcomer = False;
client_unban(c);
}
c = focus_get_current_client(screen);
focus(c, True, screen);
if(c && XQueryPointer(globalconf.display, RootWindow(globalconf.display, get_phys_screen(screen)),