Skip to content
Snippets Groups Projects
Commit 60c9f6cd authored by Florent Berthaut's avatar Florent Berthaut
Browse files

Fixed utf 8 window names

parent fa375724
No related branches found
No related tags found
No related merge requests found
......@@ -63,12 +63,14 @@ void XWindowsManager::updateWindowsList() {
}
char* XWindowsManager::getWinName(Display* disp, Window win) {
Atom prop = XInternAtom(disp,"WM_NAME",False), type;
Atom prop = XInternAtom(disp,"_NET_WM_NAME",false);
Atom utf8Atom = XInternAtom(disp,"UTF8_STRING",false);
Atom type;
int form;
unsigned long remain, len;
unsigned char *list;
if (XGetWindowProperty(disp,win,prop,0,1024,False,XA_STRING,
if (XGetWindowProperty(disp,win,prop,0,65536,false,utf8Atom,
&type,&form,&len,&remain,&list) != Success) {
cout<<"Error getting window name"<<endl;
return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment