From 9c020877dd1357d7d42a29526d3567586f3db330 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 18 Feb 2010 10:04:01 +0100 Subject: [PATCH] ewmh: remove _NET_WORKAREA support (FS#732) This fixes problem with Qt 4.6. Our implementation cannot be standard, and was not standard, so just stop using this EWMH crap. Signed-off-by: Julien Danjou --- common/atoms.list | 1 - ewmh.c | 24 ------------------------ ewmh.h | 1 - objects/tag.c | 2 -- 4 files changed, 28 deletions(-) diff --git a/common/atoms.list b/common/atoms.list index 22656e12..5407cad1 100644 --- a/common/atoms.list +++ b/common/atoms.list @@ -6,7 +6,6 @@ _NET_NUMBER_OF_DESKTOPS _NET_CURRENT_DESKTOP _NET_DESKTOP_NAMES _NET_ACTIVE_WINDOW -_NET_WORKAREA _NET_DESKTOP_GEOMETRY _NET_SUPPORTING_WM_CHECK _NET_CLOSE_WINDOW diff --git a/ewmh.c b/ewmh.c index cbf2709c..dbe7580e 100644 --- a/ewmh.c +++ b/ewmh.c @@ -70,7 +70,6 @@ ewmh_init(int phys_screen) _NET_CURRENT_DESKTOP, _NET_DESKTOP_NAMES, _NET_ACTIVE_WINDOW, - _NET_WORKAREA, _NET_DESKTOP_GEOMETRY, _NET_CLOSE_WINDOW, _NET_WM_NAME, @@ -214,29 +213,6 @@ ewmh_update_net_desktop_names(int phys_screen) buffer_wipe(&buf); } -/** Update the work area space for each physical screen and each desktop. - * \param phys_screen The physical screen id. - */ -void -ewmh_update_workarea(int phys_screen) -{ - tag_array_t *tags = &globalconf.screens.tab[phys_screen].tags; - uint32_t *area = p_alloca(uint32_t, tags->len * 4); - area_t geom = screen_area_get(&globalconf.screens.tab[phys_screen], true); - - for(int i = 0; i < tags->len; i++) - { - area[4 * i + 0] = geom.x; - area[4 * i + 1] = geom.y; - area[4 * i + 2] = geom.width; - area[4 * i + 3] = geom.height; - } - - xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, - xutil_screen_get(globalconf.connection, phys_screen)->root, - _NET_WORKAREA, CARDINAL, 32, tags->len * 4, area); -} - void ewmh_update_net_active_window(int phys_screen) { diff --git a/ewmh.h b/ewmh.h index 8eea322e..385f259b 100644 --- a/ewmh.h +++ b/ewmh.h @@ -36,7 +36,6 @@ void ewmh_update_net_client_list_stacking(int); void ewmh_client_check_hints(client_t *); void ewmh_client_update_hints(client_t *); void ewmh_client_update_desktop(client_t *); -void ewmh_update_workarea(int); void ewmh_process_client_strut(client_t *, xcb_get_property_reply_t *); void ewmh_update_strut(xcb_window_t, strut_t *); xcb_get_property_cookie_t ewmh_window_icon_get_unchecked(xcb_window_t); diff --git a/objects/tag.c b/objects/tag.c index 90232919..06cf3d6e 100644 --- a/objects/tag.c +++ b/objects/tag.c @@ -116,7 +116,6 @@ tag_append_to_screen(lua_State *L, int udx, screen_t *s) tag_array_append(&s->tags, luaA_object_ref_class(globalconf.L, udx, &tag_class)); ewmh_update_net_numbers_of_desktop(phys_screen); ewmh_update_net_desktop_names(phys_screen); - ewmh_update_workarea(phys_screen); luaA_object_push(globalconf.L, tag); luaA_object_emit_signal(L, -1, "property::screen", 0); @@ -152,7 +151,6 @@ tag_remove_from_screen(tag_t *tag) ewmh_update_net_numbers_of_desktop(phys_screen); ewmh_update_net_desktop_names(phys_screen); - ewmh_update_workarea(phys_screen); screen_t *s = tag->screen; tag->screen = NULL;