Commit f1bb36c9 authored by Christian Persch's avatar Christian Persch
Browse files

Allow unsetting the icon title set with gdk_window_set_icon_name

Change gdk_window_set_icon_name to allow using NULL to unset a
previously set icon title, so that the icon title tracks the normal
title again. Bug #535557.
parent 3c625fed
......@@ -4205,6 +4205,11 @@ gdk_window_icon_name_set (GdkWindow *window)
* idea from a user interface standpoint. But you can set such a name
* with this function, if you like.
* After calling this with a non-%NULL @name, calls to gdk_window_set_title()
* will not update the icon title.
* Using %NULL for @name unsets the icon title; further calls to
* gdk_window_set_title() will again update the icon title as well.
gdk_window_set_icon_name (GdkWindow *window,
......@@ -4220,8 +4225,10 @@ gdk_window_set_icon_name (GdkWindow *window,
display = gdk_drawable_get_display (window);
g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"),
if (name != NULL)
XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_ICON_NAME"),
......@@ -4231,6 +4238,16 @@ gdk_window_set_icon_name (GdkWindow *window,
set_text_property (display, GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "WM_ICON_NAME"),
XDeleteProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_ICON_NAME"));
XDeleteProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, "WM_ICON_NAME"));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment