fix some deprecated atom constants
Signed-off-by: Gregor Best <gbe@ring0.de> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
a2c6dde410
commit
4d9211c8c3
|
@ -27,6 +27,7 @@
|
||||||
#include <xcb/xcb_aux.h>
|
#include <xcb/xcb_aux.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include <xcb/xcb_atom.h>
|
#include <xcb/xcb_atom.h>
|
||||||
|
#include <xcb/xproto.h>
|
||||||
|
|
||||||
#include "common/array.h"
|
#include "common/array.h"
|
||||||
#include "common/atoms.h"
|
#include "common/atoms.h"
|
||||||
|
@ -35,7 +36,7 @@ static inline char *
|
||||||
xutil_get_text_property_from_reply(xcb_get_property_reply_t *reply)
|
xutil_get_text_property_from_reply(xcb_get_property_reply_t *reply)
|
||||||
{
|
{
|
||||||
if(reply
|
if(reply
|
||||||
&& (reply->type == STRING
|
&& (reply->type == XCB_ATOM_STRING
|
||||||
|| reply->type == UTF8_STRING
|
|| reply->type == UTF8_STRING
|
||||||
|| reply->type == COMPOUND_TEXT)
|
|| reply->type == COMPOUND_TEXT)
|
||||||
&& reply->format == 8
|
&& reply->format == 8
|
||||||
|
|
32
ewmh.c
32
ewmh.c
|
@ -51,7 +51,7 @@ ewmh_update_desktop_geometry(int phys_screen)
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
||||||
_NET_DESKTOP_GEOMETRY, CARDINAL, 32, countof(sizes), sizes);
|
_NET_DESKTOP_GEOMETRY, XCB_ATOM_CARDINAL, 32, countof(sizes), sizes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -109,7 +109,7 @@ ewmh_init(int phys_screen)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xscreen->root, _NET_SUPPORTED, ATOM, 32,
|
xscreen->root, _NET_SUPPORTED, XCB_ATOM_ATOM, 32,
|
||||||
countof(atom), atom);
|
countof(atom), atom);
|
||||||
|
|
||||||
/* create our own window */
|
/* create our own window */
|
||||||
|
@ -119,11 +119,11 @@ ewmh_init(int phys_screen)
|
||||||
XCB_COPY_FROM_PARENT, xscreen->root_visual, 0, NULL);
|
XCB_COPY_FROM_PARENT, xscreen->root_visual, 0, NULL);
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xscreen->root, _NET_SUPPORTING_WM_CHECK, WINDOW, 32,
|
xscreen->root, _NET_SUPPORTING_WM_CHECK, XCB_ATOM_WINDOW, 32,
|
||||||
1, &father);
|
1, &father);
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
father, _NET_SUPPORTING_WM_CHECK, WINDOW, 32,
|
father, _NET_SUPPORTING_WM_CHECK, XCB_ATOM_WINDOW, 32,
|
||||||
1, &father);
|
1, &father);
|
||||||
|
|
||||||
/* set the window manager name */
|
/* set the window manager name */
|
||||||
|
@ -133,7 +133,7 @@ ewmh_init(int phys_screen)
|
||||||
/* set the window manager PID */
|
/* set the window manager PID */
|
||||||
i = getpid();
|
i = getpid();
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
father, _NET_WM_PID, CARDINAL, 32, 1, &i);
|
father, _NET_WM_PID, XCB_ATOM_CARDINAL, 32, 1, &i);
|
||||||
|
|
||||||
ewmh_update_desktop_geometry(phys_screen);
|
ewmh_update_desktop_geometry(phys_screen);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ ewmh_update_net_client_list(int phys_screen)
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
||||||
_NET_CLIENT_LIST, WINDOW, 32, n, wins);
|
_NET_CLIENT_LIST, XCB_ATOM_WINDOW, 32, n, wins);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the client list in stacking order, bottom to top.
|
/** Set the client list in stacking order, bottom to top.
|
||||||
|
@ -171,7 +171,7 @@ ewmh_update_net_client_list_stacking(int phys_screen)
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
||||||
_NET_CLIENT_LIST_STACKING, WINDOW, 32, n, wins);
|
_NET_CLIENT_LIST_STACKING, XCB_ATOM_WINDOW, 32, n, wins);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -181,7 +181,7 @@ ewmh_update_net_numbers_of_desktop(int phys_screen)
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
||||||
_NET_NUMBER_OF_DESKTOPS, CARDINAL, 32, 1, &count);
|
_NET_NUMBER_OF_DESKTOPS, XCB_ATOM_CARDINAL, 32, 1, &count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -191,7 +191,7 @@ ewmh_update_net_current_desktop(int phys_screen)
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
xutil_screen_get(globalconf.connection, phys_screen)->root,
|
||||||
_NET_CURRENT_DESKTOP, CARDINAL, 32, 1, &idx);
|
_NET_CURRENT_DESKTOP, XCB_ATOM_CARDINAL, 32, 1, &idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -443,7 +443,7 @@ ewmh_client_update_desktop(client_t *c)
|
||||||
if(is_client_tagged(c, tags->tab[i]))
|
if(is_client_tagged(c, tags->tab[i]))
|
||||||
{
|
{
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
c->window, _NET_WM_DESKTOP, CARDINAL, 32, 1, &i);
|
c->window, _NET_WM_DESKTOP, XCB_ATOM_CARDINAL, 32, 1, &i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* It doesn't have any tags, remove the property */
|
/* It doesn't have any tags, remove the property */
|
||||||
|
@ -474,7 +474,7 @@ ewmh_update_strut(xcb_window_t window, strut_t *strut)
|
||||||
};
|
};
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
window, _NET_WM_STRUT_PARTIAL, CARDINAL, 32, countof(state), state);
|
window, _NET_WM_STRUT_PARTIAL, XCB_ATOM_CARDINAL, 32, countof(state), state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -491,10 +491,10 @@ ewmh_client_check_hints(client_t *c)
|
||||||
_NET_WM_DESKTOP, XCB_GET_PROPERTY_TYPE_ANY, 0, 1);
|
_NET_WM_DESKTOP, XCB_GET_PROPERTY_TYPE_ANY, 0, 1);
|
||||||
|
|
||||||
c1 = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
c1 = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
||||||
_NET_WM_STATE, ATOM, 0, UINT32_MAX);
|
_NET_WM_STATE, XCB_ATOM_ATOM, 0, UINT32_MAX);
|
||||||
|
|
||||||
c2 = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
c2 = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
||||||
_NET_WM_WINDOW_TYPE, ATOM, 0, UINT32_MAX);
|
_NET_WM_WINDOW_TYPE, XCB_ATOM_ATOM, 0, UINT32_MAX);
|
||||||
|
|
||||||
reply = xcb_get_property_reply(globalconf.connection, c0, NULL);
|
reply = xcb_get_property_reply(globalconf.connection, c0, NULL);
|
||||||
if(reply && reply->value_len && (data = xcb_get_property_value(reply)))
|
if(reply && reply->value_len && (data = xcb_get_property_value(reply)))
|
||||||
|
@ -571,7 +571,7 @@ ewmh_process_client_strut(client_t *c, xcb_get_property_reply_t *strut_r)
|
||||||
if(!strut_r)
|
if(!strut_r)
|
||||||
{
|
{
|
||||||
xcb_get_property_cookie_t strut_q = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
xcb_get_property_cookie_t strut_q = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
||||||
_NET_WM_STRUT_PARTIAL, CARDINAL, 0, 12);
|
_NET_WM_STRUT_PARTIAL, XCB_ATOM_CARDINAL, 0, 12);
|
||||||
strut_r = mstrut_r = xcb_get_property_reply(globalconf.connection, strut_q, NULL);
|
strut_r = mstrut_r = xcb_get_property_reply(globalconf.connection, strut_q, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ xcb_get_property_cookie_t
|
||||||
ewmh_window_icon_get_unchecked(xcb_window_t w)
|
ewmh_window_icon_get_unchecked(xcb_window_t w)
|
||||||
{
|
{
|
||||||
return xcb_get_property_unchecked(globalconf.connection, false, w,
|
return xcb_get_property_unchecked(globalconf.connection, false, w,
|
||||||
_NET_WM_ICON, CARDINAL, 0, UINT32_MAX);
|
_NET_WM_ICON, XCB_ATOM_CARDINAL, 0, UINT32_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -634,7 +634,7 @@ ewmh_window_icon_from_reply(xcb_get_property_reply_t *r)
|
||||||
uint32_t *data;
|
uint32_t *data;
|
||||||
uint64_t len;
|
uint64_t len;
|
||||||
|
|
||||||
if(!r || r->type != CARDINAL || r->format != 32 || r->length < 2)
|
if(!r || r->type != XCB_ATOM_CARDINAL || r->format != 32 || r->length < 2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
data = (uint32_t *) xcb_get_property_value(r);
|
data = (uint32_t *) xcb_get_property_value(r);
|
||||||
|
|
24
property.c
24
property.c
|
@ -65,11 +65,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HANDLE_TEXT_PROPERTY(wm_name, WM_NAME, client_set_alt_name)
|
HANDLE_TEXT_PROPERTY(wm_name, XCB_ATOM_WM_NAME, client_set_alt_name)
|
||||||
HANDLE_TEXT_PROPERTY(net_wm_name, _NET_WM_NAME, client_set_name)
|
HANDLE_TEXT_PROPERTY(net_wm_name, _NET_WM_NAME, client_set_name)
|
||||||
HANDLE_TEXT_PROPERTY(wm_icon_name, WM_ICON_NAME, client_set_alt_icon_name)
|
HANDLE_TEXT_PROPERTY(wm_icon_name, XCB_ATOM_WM_ICON_NAME, client_set_alt_icon_name)
|
||||||
HANDLE_TEXT_PROPERTY(net_wm_icon_name, _NET_WM_ICON_NAME, client_set_icon_name)
|
HANDLE_TEXT_PROPERTY(net_wm_icon_name, _NET_WM_ICON_NAME, client_set_icon_name)
|
||||||
HANDLE_TEXT_PROPERTY(wm_client_machine, WM_CLIENT_MACHINE, client_set_machine)
|
HANDLE_TEXT_PROPERTY(wm_client_machine, XCB_ATOM_WM_CLIENT_MACHINE, client_set_machine)
|
||||||
HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role)
|
HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role)
|
||||||
|
|
||||||
#undef HANDLE_TEXT_PROPERTY
|
#undef HANDLE_TEXT_PROPERTY
|
||||||
|
@ -138,7 +138,7 @@ property_update_wm_client_leader(client_t *c, xcb_get_property_reply_t *reply)
|
||||||
if(no_reply)
|
if(no_reply)
|
||||||
{
|
{
|
||||||
client_leader_q = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
client_leader_q = xcb_get_property_unchecked(globalconf.connection, false, c->window,
|
||||||
WM_CLIENT_LEADER, WINDOW, 0, 32);
|
WM_CLIENT_LEADER, XCB_ATOM_WINDOW, 1, 32);
|
||||||
|
|
||||||
reply = xcb_get_property_reply(globalconf.connection, client_leader_q, NULL);
|
reply = xcb_get_property_reply(globalconf.connection, client_leader_q, NULL);
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ property_update_net_wm_pid(client_t *c,
|
||||||
if(no_reply)
|
if(no_reply)
|
||||||
{
|
{
|
||||||
xcb_get_property_cookie_t prop_c =
|
xcb_get_property_cookie_t prop_c =
|
||||||
xcb_get_property_unchecked(globalconf.connection, false, c->window, _NET_WM_PID, CARDINAL, 0L, 1L);
|
xcb_get_property_unchecked(globalconf.connection, false, c->window, _NET_WM_PID, XCB_ATOM_CARDINAL, 0L, 1L);
|
||||||
reply = xcb_get_property_reply(globalconf.connection, prop_c, NULL);
|
reply = xcb_get_property_reply(globalconf.connection, prop_c, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,15 +433,15 @@ property_handle_propertynotify(xcb_property_notify_event_t *ev)
|
||||||
HANDLE_L(_XEMBED_INFO, property_handle_xembed_info)
|
HANDLE_L(_XEMBED_INFO, property_handle_xembed_info)
|
||||||
|
|
||||||
/* ICCCM stuff */
|
/* ICCCM stuff */
|
||||||
HANDLE_L(WM_TRANSIENT_FOR, property_handle_wm_transient_for)
|
HANDLE_L(XCB_ATOM_WM_TRANSIENT_FOR, property_handle_wm_transient_for)
|
||||||
HANDLE_L(WM_CLIENT_LEADER, property_handle_wm_client_leader)
|
HANDLE_L(WM_CLIENT_LEADER, property_handle_wm_client_leader)
|
||||||
HANDLE_L(WM_NORMAL_HINTS, property_handle_wm_normal_hints)
|
HANDLE_L(XCB_ATOM_WM_NORMAL_HINTS, property_handle_wm_normal_hints)
|
||||||
HANDLE_L(WM_HINTS, property_handle_wm_hints)
|
HANDLE_L(XCB_ATOM_WM_HINTS, property_handle_wm_hints)
|
||||||
HANDLE_L(WM_NAME, property_handle_wm_name)
|
HANDLE_L(XCB_ATOM_WM_NAME, property_handle_wm_name)
|
||||||
HANDLE_L(WM_ICON_NAME, property_handle_wm_icon_name)
|
HANDLE_L(XCB_ATOM_WM_ICON_NAME, property_handle_wm_icon_name)
|
||||||
HANDLE_L(WM_CLASS, property_handle_wm_class)
|
HANDLE_L(XCB_ATOM_WM_CLASS, property_handle_wm_class)
|
||||||
HANDLE_L(WM_PROTOCOLS, property_handle_wm_protocols)
|
HANDLE_L(WM_PROTOCOLS, property_handle_wm_protocols)
|
||||||
HANDLE_L(WM_CLIENT_MACHINE, property_handle_wm_client_machine)
|
HANDLE_L(XCB_ATOM_WM_CLIENT_MACHINE, property_handle_wm_client_machine)
|
||||||
HANDLE_L(WM_WINDOW_ROLE, property_handle_wm_window_role)
|
HANDLE_L(WM_WINDOW_ROLE, property_handle_wm_window_role)
|
||||||
|
|
||||||
/* EWMH stuff */
|
/* EWMH stuff */
|
||||||
|
|
|
@ -52,7 +52,7 @@ luaA_selection_get(lua_State *L)
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_convert_selection(globalconf.connection, selection_window,
|
xcb_convert_selection(globalconf.connection, selection_window,
|
||||||
PRIMARY, UTF8_STRING, XSEL_DATA, XCB_CURRENT_TIME);
|
XCB_ATOM_PRIMARY, UTF8_STRING, XSEL_DATA, XCB_CURRENT_TIME);
|
||||||
xcb_flush(globalconf.connection);
|
xcb_flush(globalconf.connection);
|
||||||
|
|
||||||
xcb_generic_event_t *event;
|
xcb_generic_event_t *event;
|
||||||
|
@ -83,7 +83,7 @@ luaA_selection_get(lua_State *L)
|
||||||
xcb_selection_notify_event_t *event_notify =
|
xcb_selection_notify_event_t *event_notify =
|
||||||
(xcb_selection_notify_event_t *) event;
|
(xcb_selection_notify_event_t *) event;
|
||||||
|
|
||||||
if(event_notify->selection == PRIMARY
|
if(event_notify->selection == XCB_ATOM_PRIMARY
|
||||||
&& event_notify->property != XCB_NONE)
|
&& event_notify->property != XCB_NONE)
|
||||||
{
|
{
|
||||||
xcb_get_text_property_reply_t prop;
|
xcb_get_text_property_reply_t prop;
|
||||||
|
|
|
@ -273,7 +273,7 @@ systray_iskdedockapp(xcb_window_t w)
|
||||||
* thanks KDE. */
|
* thanks KDE. */
|
||||||
kde_check_q = xcb_get_property_unchecked(globalconf.connection, false, w,
|
kde_check_q = xcb_get_property_unchecked(globalconf.connection, false, w,
|
||||||
_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR,
|
_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR,
|
||||||
WINDOW, 0, 1);
|
XCB_ATOM_WINDOW, 0, 1);
|
||||||
|
|
||||||
kde_check = xcb_get_property_reply(globalconf.connection, kde_check_q, NULL);
|
kde_check = xcb_get_property_reply(globalconf.connection, kde_check_q, NULL);
|
||||||
|
|
||||||
|
|
2
widget.c
2
widget.c
|
@ -252,7 +252,7 @@ widget_render(wibox_t *wibox)
|
||||||
xcb_get_property_cookie_t prop_c;
|
xcb_get_property_cookie_t prop_c;
|
||||||
xcb_screen_t *s = xutil_screen_get(globalconf.connection, ctx->phys_screen);
|
xcb_screen_t *s = xutil_screen_get(globalconf.connection, ctx->phys_screen);
|
||||||
prop_c = xcb_get_property_unchecked(globalconf.connection, false, s->root, _XROOTPMAP_ID,
|
prop_c = xcb_get_property_unchecked(globalconf.connection, false, s->root, _XROOTPMAP_ID,
|
||||||
PIXMAP, 0, 1);
|
XCB_ATOM_PIXMAP, 0, 1);
|
||||||
if((prop_r = xcb_get_property_reply(globalconf.connection, prop_c, NULL)))
|
if((prop_r = xcb_get_property_reply(globalconf.connection, prop_c, NULL)))
|
||||||
{
|
{
|
||||||
if(prop_r->value_len
|
if(prop_r->value_len
|
||||||
|
|
|
@ -85,7 +85,7 @@ systray_draw(widget_t *widget, draw_context_t *ctx,
|
||||||
/** \todo stop setting that property on each redraw */
|
/** \todo stop setting that property on each redraw */
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
globalconf.screens.tab[p->ctx.phys_screen].systray.window,
|
globalconf.screens.tab[p->ctx.phys_screen].systray.window,
|
||||||
_NET_SYSTEM_TRAY_ORIENTATION, CARDINAL, 32, 1, &orient);
|
_NET_SYSTEM_TRAY_ORIENTATION, XCB_ATOM_CARDINAL, 32, 1, &orient);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Delete a systray widget.
|
/** Delete a systray widget.
|
||||||
|
|
2
window.c
2
window.c
|
@ -151,7 +151,7 @@ window_opacity_get(xcb_window_t win)
|
||||||
|
|
||||||
xcb_get_property_cookie_t prop_c =
|
xcb_get_property_cookie_t prop_c =
|
||||||
xcb_get_property_unchecked(globalconf.connection, false, win,
|
xcb_get_property_unchecked(globalconf.connection, false, win,
|
||||||
_NET_WM_WINDOW_OPACITY, CARDINAL, 0L, 1L);
|
_NET_WM_WINDOW_OPACITY, XCB_ATOM_CARDINAL, 0L, 1L);
|
||||||
|
|
||||||
xcb_get_property_reply_t *prop_r =
|
xcb_get_property_reply_t *prop_r =
|
||||||
xcb_get_property_reply(globalconf.connection, prop_c, NULL);
|
xcb_get_property_reply(globalconf.connection, prop_c, NULL);
|
||||||
|
|
Loading…
Reference in New Issue