From 498a38ac0abe817bd6b1fbaad46baf73df3e0edc Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 3 May 2011 22:49:59 +0200 Subject: [PATCH] Remove dependency on xcb-property --- common.mk | 1 - src/manage.c | 15 ++++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common.mk b/common.mk index 1a1143de..bfa6f80b 100644 --- a/common.mk +++ b/common.mk @@ -38,7 +38,6 @@ endif LDFLAGS += -lm LDFLAGS += -lxcb-event -LDFLAGS += -lxcb-property LDFLAGS += -lxcb-keysyms ifeq ($(shell pkg-config --exists xcb-util || echo 1),1) CFLAGS += -DXCB_COMPAT diff --git a/src/manage.c b/src/manage.c index fe5338c0..691cc1d3 100644 --- a/src/manage.c +++ b/src/manage.c @@ -167,13 +167,14 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child, xcb_change_window_attributes(conn, child, mask, values); /* Place requests for properties ASAP */ - wm_type_cookie = xcb_get_any_property_unchecked(conn, false, child, A__NET_WM_WINDOW_TYPE, UINT32_MAX); - strut_cookie = xcb_get_any_property_unchecked(conn, false, child, A__NET_WM_STRUT_PARTIAL, UINT32_MAX); - state_cookie = xcb_get_any_property_unchecked(conn, false, child, A__NET_WM_STATE, UINT32_MAX); - utf8_title_cookie = xcb_get_any_property_unchecked(conn, false, child, A__NET_WM_NAME, 128); - leader_cookie = xcb_get_any_property_unchecked(conn, false, child, A_WM_CLIENT_LEADER, UINT32_MAX); - title_cookie = xcb_get_any_property_unchecked(conn, false, child, A_WM_NAME, 128); - class_cookie = xcb_get_any_property_unchecked(conn, false, child, A_WM_CLASS, 128); +#define GET_PROPERTY(atom, len) xcb_get_property_unchecked(conn, false, child, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, len) + wm_type_cookie = GET_PROPERTY(A__NET_WM_WINDOW_TYPE, UINT32_MAX); + strut_cookie = GET_PROPERTY(A__NET_WM_STRUT_PARTIAL, UINT32_MAX); + state_cookie = GET_PROPERTY(A__NET_WM_STATE, UINT32_MAX); + utf8_title_cookie = GET_PROPERTY(A__NET_WM_NAME, 128); + leader_cookie = GET_PROPERTY(A_WM_CLIENT_LEADER, UINT32_MAX); + title_cookie = GET_PROPERTY(A_WM_NAME, 128); + class_cookie = GET_PROPERTY(A_WM_CLASS, 128); Client *new = table_get(&by_child, child); -- 2.39.5