Author: greg.ercolano
Date: 2010-12-01 00:13:27 -0800 (Wed, 01 Dec 2010)
New Revision: 7929
Log:
Applied patch "str-2416-erco-v1.patch" to solve STR #2416
issue with UTF8 window labels not working with xwininfo.
Modified:
branches/branch-1.3/src/Fl_x.cxx
Modified: branches/branch-1.3/src/Fl_x.cxx
===================================================================
--- branches/branch-1.3/src/Fl_x.cxx 2010-11-30 19:08:02 UTC (rev 7928)
+++ branches/branch-1.3/src/Fl_x.cxx 2010-12-01 08:13:27 UTC (rev 7929)
@@ -313,6 +313,8 @@
Atom fl_XaCompoundText;
Atom fl_XaUtf8String;
Atom fl_XaTextUriList;
+Atom fl_NET_WM_NAME; // utf8 aware window label
+Atom fl_NET_WM_ICON_NAME; // utf8 aware window icon name
/*
X defines 32-bit-entities to have a format value of max. 32,
@@ -599,6 +601,8 @@
fl_XaCompoundText = XInternAtom(d, "COMPOUND_TEXT", 0);
fl_XaUtf8String = XInternAtom(d, "UTF8_STRING", 0);
fl_XaTextUriList = XInternAtom(d, "text/uri-list", 0);
+ fl_NET_WM_NAME = XInternAtom(d, "_NET_WM_NAME", 0);
+ fl_NET_WM_ICON_NAME = XInternAtom(d, "_NET_WM_ICON_NAME", 0);
if (sizeof(Atom) < 4)
atom_bits = sizeof(Atom) * 8;
@@ -1785,11 +1789,13 @@
iconlabel_ = iname;
if (shown() && !parent()) {
if (!name) name = "";
- XChangeProperty(fl_display, i->xid, XA_WM_NAME,
- fl_XaUtf8String, 8, 0, (uchar*)name, strlen(name));
+ int namelen = strlen(name);
if (!iname) iname = fl_filename_name(name);
- XChangeProperty(fl_display, i->xid, XA_WM_ICON_NAME,
- fl_XaUtf8String, 8, 0, (uchar*)iname, strlen(iname));
+ int inamelen = strlen(iname);
+ XChangeProperty(fl_display, i->xid, fl_NET_WM_NAME, fl_XaUtf8String,
8, 0, (uchar*)name, namelen); // utf8
+ XChangeProperty(fl_display, i->xid, XA_WM_NAME, XA_STRING,
8, 0, (uchar*)name, namelen); // non-utf8
+ XChangeProperty(fl_display, i->xid, fl_NET_WM_ICON_NAME, fl_XaUtf8String,
8, 0, (uchar*)iname, inamelen); // utf8
+ XChangeProperty(fl_display, i->xid, XA_WM_ICON_NAME, XA_STRING,
8, 0, (uchar*)iname, inamelen); // non-utf8
}
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit