remove Display arg of xgettextprop()
This commit is contained in:
parent
d16b11bb30
commit
a5c86280b3
6
client.c
6
client.c
|
@ -58,7 +58,7 @@ client_loadprops(Client * c, int screen)
|
|||
|
||||
prop = p_new(char, ntags + 2);
|
||||
|
||||
if(xgettextprop(globalconf.display, c->win, AWESOMEPROPS_ATOM(globalconf.display), prop, ntags + 2))
|
||||
if(xgettextprop(c->win, AWESOMEPROPS_ATOM(globalconf.display), prop, ntags + 2))
|
||||
{
|
||||
for(i = 0, tag = globalconf.screens[screen].tags; tag && i < ntags && prop[i]; i++, tag = tag->next)
|
||||
if(prop[i] == '1')
|
||||
|
@ -172,8 +172,8 @@ get_client_byname(Client *list, char *name)
|
|||
void
|
||||
client_updatetitle(Client *c)
|
||||
{
|
||||
if(!xgettextprop(globalconf.display, c->win, XInternAtom(globalconf.display, "_NET_WM_NAME", False), c->name, sizeof(c->name)))
|
||||
xgettextprop(globalconf.display, c->win, XInternAtom(globalconf.display, "WM_NAME", False), c->name, sizeof(c->name));
|
||||
if(!xgettextprop(c->win, XInternAtom(globalconf.display, "_NET_WM_NAME", False), c->name, sizeof(c->name)))
|
||||
xgettextprop(c->win, XInternAtom(globalconf.display, "WM_NAME", False), c->name, sizeof(c->name));
|
||||
}
|
||||
|
||||
/** Ban client and unmap it
|
||||
|
|
3
layout.c
3
layout.c
|
@ -141,8 +141,7 @@ loadawesomeprops(int screen)
|
|||
|
||||
prop = p_new(char, ntags + 1);
|
||||
|
||||
if(xgettextprop(globalconf.display,
|
||||
RootWindow(globalconf.display, get_phys_screen(screen)),
|
||||
if(xgettextprop(RootWindow(globalconf.display, get_phys_screen(screen)),
|
||||
AWESOMEPROPS_ATOM(globalconf.display), prop, ntags + 1))
|
||||
for(i = 0, tag = globalconf.screens[screen].tags; tag && prop[i]; i++, tag = tag->next)
|
||||
if(prop[i] == '1')
|
||||
|
|
2
rules.c
2
rules.c
|
@ -78,7 +78,7 @@ client_match_rule(Client *c, Rule *r)
|
|||
|
||||
if(r->xprop
|
||||
&& r->xpropval_r
|
||||
&& xgettextprop(globalconf.display, c->win,
|
||||
&& xgettextprop(c->win,
|
||||
XInternAtom(globalconf.display, r->xprop, False),
|
||||
buf, ssizeof(buf)))
|
||||
ret = !regexec(r->xpropval_r, buf, 1, &tmp, 0);
|
||||
|
|
6
xutil.c
6
xutil.c
|
@ -92,7 +92,7 @@ uicb_spawn(int screen, char *arg)
|
|||
}
|
||||
|
||||
Bool
|
||||
xgettextprop(Display *disp, Window w, Atom atom, char *text, ssize_t textlen)
|
||||
xgettextprop(Window w, Atom atom, char *text, ssize_t textlen)
|
||||
{
|
||||
char **list = NULL;
|
||||
int n;
|
||||
|
@ -103,7 +103,7 @@ xgettextprop(Display *disp, Window w, Atom atom, char *text, ssize_t textlen)
|
|||
return False;
|
||||
|
||||
text[0] = '\0';
|
||||
XGetTextProperty(disp, w, &name, atom);
|
||||
XGetTextProperty(globalconf.display, w, &name, atom);
|
||||
|
||||
if(!name.nitems)
|
||||
return False;
|
||||
|
@ -111,7 +111,7 @@ xgettextprop(Display *disp, Window w, Atom atom, char *text, ssize_t textlen)
|
|||
if(name.encoding == XA_STRING)
|
||||
a_strncpy(text, textlen, (char *) name.value, textlen - 1);
|
||||
|
||||
else if(XmbTextPropertyToTextList(disp, &name, &list, &n) >= Success && n > 0 && *list)
|
||||
else if(XmbTextPropertyToTextList(globalconf.display, &name, &list, &n) >= Success && n > 0 && *list)
|
||||
{
|
||||
a_strncpy(text, textlen, *list, textlen - 1);
|
||||
XFreeStringList(list);
|
||||
|
|
Loading…
Reference in New Issue