From 4daa5af04c407ef63163723b702061360168b4a1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 9 Nov 2009 21:07:07 +0100 Subject: [PATCH] globalconf: move prophs out Signed-off-by: Julien Danjou --- globalconf.h | 2 -- property.c | 40 +++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/globalconf.h b/globalconf.h index b0448ff90..e01d33b28 100644 --- a/globalconf.h +++ b/globalconf.h @@ -55,8 +55,6 @@ typedef struct xcb_connection_t *connection; /** Event and error handlers */ xcb_event_handlers_t evenths; - /** Property change handler */ - xcb_property_handlers_t prophs; /** Default screen number */ int default_screen; /** Keys symbol table */ diff --git a/property.c b/property.c index 9245263bd..660798c40 100644 --- a/property.c +++ b/property.c @@ -409,51 +409,53 @@ property_handle_net_wm_opacity(void *data __attribute__ ((unused)), void a_xcb_set_property_handlers(void) { + static xcb_property_handlers_t prophs; + /* init */ - xcb_property_handlers_init(&globalconf.prophs, &globalconf.evenths); + xcb_property_handlers_init(&prophs, &globalconf.evenths); /* Xembed stuff */ - xcb_property_set_handler(&globalconf.prophs, _XEMBED_INFO, UINT_MAX, + xcb_property_set_handler(&prophs, _XEMBED_INFO, UINT_MAX, property_handle_xembed_info, NULL); /* ICCCM stuff */ - xcb_property_set_handler(&globalconf.prophs, WM_TRANSIENT_FOR, UINT_MAX, + xcb_property_set_handler(&prophs, WM_TRANSIENT_FOR, UINT_MAX, property_handle_wm_transient_for, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_CLIENT_LEADER, UINT_MAX, + xcb_property_set_handler(&prophs, WM_CLIENT_LEADER, UINT_MAX, property_handle_wm_client_leader, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_NORMAL_HINTS, UINT_MAX, + xcb_property_set_handler(&prophs, WM_NORMAL_HINTS, UINT_MAX, property_handle_wm_normal_hints, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_HINTS, UINT_MAX, + xcb_property_set_handler(&prophs, WM_HINTS, UINT_MAX, property_handle_wm_hints, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_NAME, UINT_MAX, + xcb_property_set_handler(&prophs, WM_NAME, UINT_MAX, property_handle_wm_name, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_ICON_NAME, UINT_MAX, + xcb_property_set_handler(&prophs, WM_ICON_NAME, UINT_MAX, property_handle_wm_icon_name, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_CLASS, UINT_MAX, + xcb_property_set_handler(&prophs, WM_CLASS, UINT_MAX, property_handle_wm_class, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_PROTOCOLS, UINT_MAX, + xcb_property_set_handler(&prophs, WM_PROTOCOLS, UINT_MAX, property_handle_wm_protocols, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_CLIENT_MACHINE, UINT_MAX, + xcb_property_set_handler(&prophs, WM_CLIENT_MACHINE, UINT_MAX, property_handle_wm_client_machine, NULL); - xcb_property_set_handler(&globalconf.prophs, WM_WINDOW_ROLE, UINT_MAX, + xcb_property_set_handler(&prophs, WM_WINDOW_ROLE, UINT_MAX, property_handle_wm_window_role, NULL); /* EWMH stuff */ - xcb_property_set_handler(&globalconf.prophs, _NET_WM_NAME, UINT_MAX, + xcb_property_set_handler(&prophs, _NET_WM_NAME, UINT_MAX, property_handle_net_wm_name, NULL); - xcb_property_set_handler(&globalconf.prophs, _NET_WM_ICON_NAME, UINT_MAX, + xcb_property_set_handler(&prophs, _NET_WM_ICON_NAME, UINT_MAX, property_handle_net_wm_icon_name, NULL); - xcb_property_set_handler(&globalconf.prophs, _NET_WM_STRUT_PARTIAL, UINT_MAX, + xcb_property_set_handler(&prophs, _NET_WM_STRUT_PARTIAL, UINT_MAX, property_handle_net_wm_strut_partial, NULL); - xcb_property_set_handler(&globalconf.prophs, _NET_WM_ICON, UINT_MAX, + xcb_property_set_handler(&prophs, _NET_WM_ICON, UINT_MAX, property_handle_net_wm_icon, NULL); - xcb_property_set_handler(&globalconf.prophs, _NET_WM_PID, UINT_MAX, + xcb_property_set_handler(&prophs, _NET_WM_PID, UINT_MAX, property_handle_net_wm_pid, NULL); - xcb_property_set_handler(&globalconf.prophs, _NET_WM_WINDOW_OPACITY, 1, + xcb_property_set_handler(&prophs, _NET_WM_WINDOW_OPACITY, 1, property_handle_net_wm_opacity, NULL); /* background change */ - xcb_property_set_handler(&globalconf.prophs, _XROOTPMAP_ID, 1, + xcb_property_set_handler(&prophs, _XROOTPMAP_ID, 1, property_handle_xrootpmap_id, NULL); }