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:
parent
3fc3fd9623
commit
7c122e00ac
2
client.c
2
client.c
|
@ -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);
|
||||
|
||||
|
|
2
config.h
2
config.h
|
@ -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;
|
||||
|
|
10
layout.c
10
layout.c
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue