diff --git a/client.c b/client.c index 33ec4a43a..3d887d56e 100644 --- a/client.c +++ b/client.c @@ -336,9 +336,6 @@ client_manage(Window w, XWindowAttributes *wa, int screen) widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS); ewmh_update_net_client_list(phys_screen); - - /* rearrange to display new window */ - globalconf.screens[c->screen].need_arrange = True; } /** Resize client window @@ -450,7 +447,8 @@ client_setfloating(Client *c, Bool floating) { if((c->isfloating = floating)) client_resize(c, c->f_geometry, False); - globalconf.screens[c->screen].need_arrange = True; + if(client_isvisible(c, c->screen)) + globalconf.screens[c->screen].need_arrange = True; widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS); } } @@ -520,8 +518,6 @@ client_unmanage(Client *c) XSync(globalconf.display, False); XUngrabServer(globalconf.display); - globalconf.screens[c->screen].need_arrange = True; - p_delete(&c); } diff --git a/event.c b/event.c index c031a5a3d..ade35c46b 100644 --- a/event.c +++ b/event.c @@ -165,14 +165,6 @@ handle_event_configurerequest(XEvent * e) client_resize(c, geometry, False); tag_client_with_rule(c, rule_matching_client(c)); - - if(old_screen != c->screen) - { - widget_invalidate_cache(old_screen, WIDGET_CACHE_CLIENTS); - globalconf.screens[old_screen].need_arrange = True; - } - widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS); - globalconf.screens[c->screen].need_arrange = True; } else window_configure(c->win, geometry, c->border); diff --git a/statusbar.c b/statusbar.c index 50f9d51c9..07ab62803 100644 --- a/statusbar.c +++ b/statusbar.c @@ -321,6 +321,7 @@ statusbar_toggle(Statusbar *statusbar) statusbar->position = Off; statusbar_update_position(statusbar); + globalconf.screens[statusbar->screen].need_arrange = True; } /** Toggle statusbar @@ -338,8 +339,6 @@ uicb_statusbar_toggle(int screen, char *arg) else for(sb = globalconf.screens[screen].statusbar; sb; sb = sb->next) statusbar_toggle(sb); - - globalconf.screens[screen].need_arrange = True; } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80