From 33709c62cdb184a16e662ea24ebf1c54dafd45be Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 9 Apr 2008 14:17:08 +0200 Subject: [PATCH] [xutil] Remove map_raised Signed-off-by: Julien Danjou --- awesome-menu.c | 5 ++--- awesome-message.c | 3 +-- common/xutil.c | 11 ----------- common/xutil.h | 4 ---- mouse.c | 5 +++-- statusbar.c | 2 +- 6 files changed, 7 insertions(+), 23 deletions(-) diff --git a/awesome-menu.c b/awesome-menu.c index 1c01bcb9..8f04adf4 100644 --- a/awesome-menu.c +++ b/awesome-menu.c @@ -1348,15 +1348,14 @@ main(int argc, char **argv) compute_match(NULL); - redraw(); - globalconf.keysyms = xcb_key_symbols_alloc(globalconf.connection); /* Get the numlock, capslock and shiftlock mask */ xutil_getlockmask(globalconf.connection, globalconf.keysyms, &globalconf.numlockmask, &globalconf.shiftlockmask, &globalconf.capslockmask); - xutil_map_raised(globalconf.connection, globalconf.sw->window); + xcb_map_window(globalconf.connection, globalconf.sw->window); + redraw(); while(status == RUN) { diff --git a/awesome-message.c b/awesome-message.c index e35a37c3..ca1719f3 100644 --- a/awesome-message.c +++ b/awesome-message.c @@ -220,9 +220,8 @@ main(int argc, char **argv) p_delete(&ctx); + xcb_map_window(globalconf.connection, sw->window); simplewindow_refresh_drawable(sw, globalconf.default_screen); - - xutil_map_raised(globalconf.connection, sw->window); xcb_aux_sync(globalconf.connection); signal(SIGALRM, &exit_on_signal); diff --git a/common/xutil.c b/common/xutil.c index 69d8504a..1c53f260 100644 --- a/common/xutil.c +++ b/common/xutil.c @@ -211,17 +211,6 @@ xutil_get_class_hint(xcb_connection_t *conn, xcb_window_t win) return ch; } -void -xutil_map_raised(xcb_connection_t *conn, xcb_window_t win) -{ - const uint32_t map_raised_val = XCB_STACK_MODE_ABOVE; - - xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_STACK_MODE, - &map_raised_val); - - xcb_map_window(conn, win); -} - /* Number of different errors */ #define ERRORS_NBR 256 diff --git a/common/xutil.h b/common/xutil.h index fd11d64f..800f3922 100644 --- a/common/xutil.h +++ b/common/xutil.h @@ -104,10 +104,6 @@ class_hint_t *xutil_get_class_hint(xcb_connection_t *, xcb_window_t); */ xcb_atom_t xutil_intern_atom(xcb_connection_t *, const char *); -/* Equivalent XCB call to XMapRaised, which actually raises the - specified window to the top of the stack and maps it */ -void xutil_map_raised(xcb_connection_t *, xcb_window_t); - /** Set the same handler for all errors */ void xutil_set_error_handler_catch_all(xcb_event_handlers_t *, xcb_generic_error_handler_t, void *); diff --git a/mouse.c b/mouse.c index 6d92a04d..2fea756d 100644 --- a/mouse.c +++ b/mouse.c @@ -185,7 +185,8 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused))) ctx = draw_context_new(globalconf.connection, sw->phys_screen, sw->geometry.width, sw->geometry.height, sw->drawable); - xutil_map_raised(globalconf.connection, sw->window); + + xcb_map_window(globalconf.connection, sw->window); mouse_resizebar_draw(ctx, style, sw, geometry, c->border); } @@ -311,7 +312,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused))) ctx = draw_context_new(globalconf.connection, sw->phys_screen, sw->geometry.width, sw->geometry.height, sw->drawable); - xutil_map_raised(globalconf.connection, sw->window); + xcb_map_window(globalconf.connection, sw->window); mouse_resizebar_draw(ctx, style, sw, geometry, c->border); } else if (layout->arrange == layout_tile || layout->arrange == layout_tileleft diff --git a/statusbar.c b/statusbar.c index 2da297a4..b4eccd51 100644 --- a/statusbar.c +++ b/statusbar.c @@ -44,7 +44,7 @@ statusbar_position_update(Statusbar *statusbar) return; } - xutil_map_raised(globalconf.connection, statusbar->sw->window); + xcb_map_window(globalconf.connection, statusbar->sw->window); /* Top and Bottom Statusbar have prio */ if(statusbar->position == Top || statusbar->position == Bottom)