A small twm patch
Alex Goncharov
alex-goncharov at comcast.net
Thu Aug 14 19:01:46 PDT 2008
Hi,
Based on my long experience with `twm', I would like to suggest the
following small patch to its code.
I am not sure I am sending it to the correct place and therefore not
giving much explanation here, but if this *is* the place and the patch
will be considered, I can, of course, do more explaining.
======================================================================
diff -ru twm-1.0.3/src.orig/events.c twm-1.0.3/src/events.c
--- twm-1.0.3/src.orig/events.c 2008-08-14 21:38:02.000000000 -0400
+++ twm-1.0.3/src/events.c 2008-08-14 21:53:38.000000000 -0400
@@ -772,10 +772,17 @@
if (Tmp_win->title_w) XClearArea(dpy, Tmp_win->title_w, 0,0,0,0, True);
/*
- * if the icon name is NoName, set the name of the icon to be
- * the same as the window
+ * Unfortunately, some applications (Opera) don't set the
+ * WM_ICON_NAME property, and their icons will not reflect the
+ * changes in the window titles unless the following is done.
+ * Yes, in the case where an intelligent application wants its
+ * windows to be named differently when rised and iconized,
+ * the behaviour is undefined (depends on the order of
+ * XA_WM_NAME and XA_WM_ICON_NAME events.) But I haven't
+ * never seen such an application and my long experience with
+ * the `if' block below has been overwhelmengly positive.
*/
- if (Tmp_win->icon_name == NoName) {
+ if (Tmp_win->icon_name != Tmp_win->name) {
Tmp_win->icon_name = Tmp_win->name;
RedoIconName();
}
diff -ru twm-1.0.3/src.orig/util.c twm-1.0.3/src/util.c
--- twm-1.0.3/src.orig/util.c 2008-08-14 21:38:02.000000000 -0400
+++ twm-1.0.3/src/util.c 2008-08-14 21:43:32.000000000 -0400
@@ -725,7 +725,7 @@
return 0;
}
status = XmbTextPropertyToTextList(dpy, &text_prop, &list, &num);
- if (status < Success || !num || !*list) {
+ if (status < Success || !num || !list || !*list) {
*winname = NULL;
return 0;
}
======================================================================
Thanks,
-- Alex -- alex-goncharov at comcast.net --
More information about the xorg
mailing list