YAMAMOTO Mitsuharu skrev: >>>>>> On Fri, 01 Jun 2007 18:42:57 -0400, Chong Yidong <[EMAIL PROTECTED]> >>>>>> said: > >> I looked at the GTK+ sources. Apparently, if we don't set >> WM_ICON_NAME ourselves, gtk_window_set_icon_name sets WM_ICON_NAME >> for us. So I think we are perfectly safe. >
No, I don't think it does, from the Gtk+ documentation: "Sets the icon for the window from a named themed icon. See the docs for GtkIconTheme for more details. Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM." What we could use is gdk_window_set_icon_name (Note gdk_, not gtk_). It is available in Gtk+ 2.4 and onwards, 2.4 is the minimum Emacs require. But this function blindly assumes the name passed is in UTF-8 and sets both _NET_WM_ICON_NAME and WM_ICON_NAME to that. x_set_name_internal at least tries to decode things correctly for the window manager. > But now we can't set the icon title separately from the frame title > using the `icon-name' frame parameter on GTK+ builds. > > `icon-name' > The name to use in the icon for this frame, when and if the icon > appears. If this is `nil', the frame's title is used. > > Even with non-GTK+ builds, setting this parameter might not affect the > icon title for some window managers. But at least, CDE on Solaris > respects this. > > Maybe we can use gtk_window_set_icon_name for this purpose, but it is > available only on GTK+ 2.6 and later, so some check will be necessary > and it is definitely after-the-release matter. > > So I propose undoing the latest change for x_set_name_internal for > now. The reason for using gtk functions (gtk_window_set_title) is that the information is saved in Gtk+, and also that the function sets _NET_WM_ICON_NAME. But it also sets WM_ICON_NAME, but with a possible wrong encoding, so we call XSetWMIconName to fix that. Come to think of it, all builds should set _NET_WM_ICON_NAME to the UTF-8 encoded icon name. Jan D. _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug