client: split out atom requests
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
67de549992
commit
7707dd69c6
22
client.c
22
client.c
|
@ -172,20 +172,16 @@ void
|
||||||
client_updatetitle(client_t *c)
|
client_updatetitle(client_t *c)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
xutil_intern_atom_request_t net_wm_name_q, wm_name_q;
|
||||||
|
xcb_atom_t net_wm_name, wm_name;
|
||||||
|
|
||||||
if(!xutil_gettextprop(globalconf.connection, c->win, &globalconf.atoms,
|
net_wm_name_q = xutil_intern_atom(globalconf.connection, &globalconf.atoms, "_NET_WM_NAME");
|
||||||
xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms,
|
wm_name_q = xutil_intern_atom(globalconf.connection, &globalconf.atoms, "WM_NAME");
|
||||||
xutil_intern_atom(globalconf.connection,
|
net_wm_name = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, net_wm_name_q);
|
||||||
&globalconf.atoms,
|
wm_name = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, wm_name_q);
|
||||||
"_NET_WM_NAME")),
|
|
||||||
&name))
|
if(!xutil_gettextprop(globalconf.connection, c->win, &globalconf.atoms, net_wm_name, &name))
|
||||||
if(!xutil_gettextprop(globalconf.connection, c->win, &globalconf.atoms,
|
if(!xutil_gettextprop(globalconf.connection, c->win, &globalconf.atoms, wm_name, &name))
|
||||||
xutil_intern_atom_reply(globalconf.connection,
|
|
||||||
&globalconf.atoms,
|
|
||||||
xutil_intern_atom(globalconf.connection,
|
|
||||||
&globalconf.atoms,
|
|
||||||
"WM_NAME")),
|
|
||||||
&name))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p_delete(&c->name);
|
p_delete(&c->name);
|
||||||
|
|
Loading…
Reference in New Issue