From 6bffb904efcdfc91a19fe1e52750ce2ddf323e26 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 25 Aug 2009 11:02:36 +0200 Subject: [PATCH] wibox: activate BMA when mapping/unmapping Signed-off-by: Julien Danjou --- wibox.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/wibox.c b/wibox.c index ca9f9a2c..5e788ee8 100644 --- a/wibox.c +++ b/wibox.c @@ -258,9 +258,15 @@ wibox_moveresize(lua_State *L, int udx, area_t geometry) wibox_draw_context_update(w, s); } + /* Activatate BMA */ + client_ignore_enterleave_events(); + if(mask_vals) xcb_configure_window(globalconf.connection, w->window, mask_vals, moveresize_win_vals); + /* Deactivatate BMA */ + client_restore_enterleave_events(); + w->screen = screen_getbycoord(w->screen, w->geometry.x, w->geometry.y); if(mask_vals & XCB_CONFIG_WINDOW_X) @@ -359,7 +365,12 @@ wibox_set_orientation(lua_State *L, int udx, orientation_t o) static void wibox_map(wibox_t *wibox) { + /* Activate BMA */ + client_ignore_enterleave_events(); + /* Map the wibox */ xcb_map_window(globalconf.connection, wibox->window); + /* Deactivatate BMA */ + client_restore_enterleave_events(); /* We must make sure the wibox does not display garbage */ wibox_need_update(wibox); /* Stack this wibox correctly */ @@ -624,7 +635,14 @@ wibox_set_visible(lua_State *L, int udx, bool v) if(wibox->visible) wibox_map(wibox); else + { + /* Active BMA */ + client_ignore_enterleave_events(); + /* Unmap window */ xcb_unmap_window(globalconf.connection, wibox->window); + /* Active BMA */ + client_restore_enterleave_events(); + } /* kick out systray if needed */ wibox_systray_refresh(wibox); @@ -644,7 +662,11 @@ wibox_wipe(wibox_t *w) { if(w->window) { + /* Activate BMA */ + client_ignore_enterleave_events(); xcb_destroy_window(globalconf.connection, w->window); + /* Deactivate BMA */ + client_restore_enterleave_events(); w->window = XCB_NONE; } if(w->pixmap)