fix
This commit is contained in:
parent
ec3bfc7aba
commit
71fe4ddb52
1 changed files with 3 additions and 2 deletions
|
|
@ -320,12 +320,13 @@ static void set_name(Window wnd) {
|
||||||
unsigned long nitem, after;
|
unsigned long nitem, after;
|
||||||
unsigned char* buf = NULL;
|
unsigned char* buf = NULL;
|
||||||
Atom atom = XInternAtom(xdisplay, "WM_NAME", False);
|
Atom atom = XInternAtom(xdisplay, "WM_NAME", False);
|
||||||
|
Atom utf8 = XInternAtom(xdisplay, "UTF8_STRING", False);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 0; i < arrlen(windows); i++) {
|
for(i = 0; i < arrlen(windows); i++) {
|
||||||
if(windows[i].client == wnd) {
|
if(windows[i].client == wnd) {
|
||||||
if(XGetWindowProperty(xdisplay, wnd, atom, 0, 1024, False, XA_STRING, &type, &format, &nitem, &after, &buf) == Success && buf != NULL) {
|
if(XGetWindowProperty(xdisplay, wnd, atom, 0, 1024, False, AnyPropertyType, &type, &format, &nitem, &after, &buf) == Success && buf != NULL) {
|
||||||
wm_set_name(windows[i].frame, buf);
|
if(type == XA_STRING || type == utf8) wm_set_name(windows[i].frame, buf);
|
||||||
XFree(buf);
|
XFree(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue