From c5acc8f613f1b6344148869ffef5ef5b0bd110c4 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 21 Sep 2009 15:01:36 +0200 Subject: [PATCH] client: remove banning_refresh (FS#631) Signed-off-by: Julien Danjou --- client.c | 9 +++------ client.h | 6 ------ tag.c | 5 ++--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/client.c b/client.c index f3934c66b..c02b492dd 100644 --- a/client.c +++ b/client.c @@ -931,9 +931,8 @@ client_set_minimized(lua_State *L, int cidx, bool s) if(c->minimized != s) { - client_need_reban(c); c->minimized = s; - client_need_reban(c); + banning_refresh((c)->screen); if(s) window_state_set(c->window, XCB_WM_STATE_ICONIC); else @@ -959,9 +958,8 @@ client_set_sticky(lua_State *L, int cidx, bool s) if(c->sticky != s) { - client_need_reban(c); c->sticky = s; - client_need_reban(c); + banning_refresh((c)->screen); ewmh_client_update_hints(c); hook_property(c, "sticky"); luaA_object_emit_signal(L, cidx, "property::sticky", 0); @@ -1675,9 +1673,8 @@ luaA_client_set_hidden(lua_State *L, client_t *c) bool b = luaA_checkboolean(L, -1); if(b != c->hidden) { - client_need_reban(c); c->hidden = b; - client_need_reban(c); + banning_refresh((c)->screen); hook_property(c, "hidden"); if(strut_has_value(&c->strut)) screen_emit_signal(globalconf.L, c->screen, "property::workarea", 0); diff --git a/client.h b/client.h index b29b5311b..39d20fa0c 100644 --- a/client.h +++ b/client.h @@ -160,12 +160,6 @@ lua_class_t client_class; LUA_OBJECT_FUNCS(client_class, client_t, client) -#define client_need_reban(c) \ - do { \ - if(client_isvisible(c, (c)->screen)) \ - banning_refresh((c)->screen); \ - } while(0) - bool client_maybevisible(client_t *, screen_t *); client_t * client_getbywin(xcb_window_t); void client_ban(client_t *); diff --git a/tag.c b/tag.c index 8895882d2..22ded392e 100644 --- a/tag.c +++ b/tag.c @@ -226,7 +226,7 @@ tag_client(client_t *c) client_array_append(&t->clients, c); ewmh_client_update_desktop(c); - client_need_reban(c); + banning_refresh((c)->screen); /* call hook */ if(globalconf.hooks.tagged != LUA_REFNIL) @@ -248,9 +248,8 @@ untag_client(client_t *c, tag_t *t) for(int i = 0; i < t->clients.len; i++) if(t->clients.tab[i] == c) { - client_need_reban(c); client_array_take(&t->clients, i); - client_need_reban(c); + banning_refresh((c)->screen); ewmh_client_update_desktop(c); /* call hook */ if(globalconf.hooks.tagged != LUA_REFNIL)