window: Remove support for _NET_WM_ICON_NAME

We don't seem to use it anywhere.
This commit is contained in:
Jasper St. Pierre 2014-03-18 21:48:52 -04:00
parent 9c94f8ae47
commit 0a20f7458c
5 changed files with 2 additions and 81 deletions

View File

@ -91,7 +91,6 @@ struct _MetaWindow
char *desc; /* used in debug spew */
char *title;
char *icon_name;
GdkPixbuf *icon;
GdkPixbuf *mini_icon;
MetaIconCache icon_cache;

View File

@ -249,7 +249,6 @@ meta_window_finalize (GObject *object)
g_free (window->res_class);
g_free (window->res_name);
g_free (window->title);
g_free (window->icon_name);
g_free (window->desc);
g_free (window->gtk_theme_variant);
g_free (window->gtk_application_id);
@ -838,7 +837,6 @@ _meta_window_shared_new (MetaDisplay *display,
window->colormap = attrs->colormap;
window->title = NULL;
window->icon_name = NULL;
window->icon = NULL;
window->mini_icon = NULL;
meta_icon_cache_init (&window->icon_cache);

View File

@ -91,7 +91,6 @@ item(hotplug_mode_update)
item(_NET_WM_SYNC_REQUEST)
item(_NET_WM_SYNC_REQUEST_COUNTER)
item(_NET_WM_VISIBLE_NAME)
item(_NET_WM_VISIBLE_ICON_NAME)
item(_NET_SUPPORTING_WM_CHECK)
/* But I suppose it's quite reasonable not to advertise using
@ -132,7 +131,6 @@ item(_NET_CLIENT_LIST)
item(_NET_CLIENT_LIST_STACKING)
item(_NET_WM_STATE_SKIP_TASKBAR)
item(_NET_WM_STATE_SKIP_PAGER)
item(_NET_WM_ICON_NAME)
item(_NET_WM_ICON)
item(_NET_WM_ICON_GEOMETRY)
item(_NET_WM_MOVERESIZE)

View File

@ -429,9 +429,8 @@ reload_net_wm_user_time_window (MetaWindow *window,
/**
* set_title_text:
*
* Called by set_window_title() and set_icon_title() to set the value of
* @target to @title. It required and @atom is set, it will update the
* appropriate property.
* Called by set_window_title() to set the value of @target to @title.
* If required and @atom is set, it will update the appropriate property.
*
* Returns: %TRUE if a new title was set.
*/
@ -611,75 +610,6 @@ reload_mutter_hints (MetaWindow *window,
}
}
static void
set_icon_title (MetaWindow *window,
const char *title)
{
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = window_x11->priv;
gboolean modified =
set_title_text (window,
priv->using_net_wm_visible_icon_name,
title,
window->display->atom__NET_WM_VISIBLE_ICON_NAME,
&window->icon_name);
priv->using_net_wm_visible_icon_name = modified;
}
static void
reload_net_wm_icon_name (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = window_x11->priv;
if (value->type != META_PROP_VALUE_INVALID)
{
set_icon_title (window, value->v.str);
priv->using_net_wm_icon_name = TRUE;
meta_verbose ("Using _NET_WM_ICON_NAME for new title of %s: \"%s\"\n",
window->desc, window->title);
}
else
{
set_icon_title (window, NULL);
priv->using_net_wm_icon_name = FALSE;
if (!initial)
meta_window_reload_property (window, XA_WM_ICON_NAME, FALSE);
}
}
static void
reload_wm_icon_name (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = window_x11->priv;
if (priv->using_net_wm_icon_name)
{
meta_verbose ("Ignoring WM_ICON_NAME \"%s\" as _NET_WM_ICON_NAME is set\n",
value->v.str);
return;
}
if (value->type != META_PROP_VALUE_INVALID)
{
set_icon_title (window, value->v.str);
meta_verbose ("Using WM_ICON_NAME for new title of %s: \"%s\"\n",
window->desc, window->title);
}
else
{
set_icon_title (window, NULL);
}
}
static void
reload_net_wm_state (MetaWindow *window,
MetaPropValue *value,
@ -1741,8 +1671,6 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
{ XA_WM_NAME, META_PROP_VALUE_TEXT_PROPERTY, reload_wm_name, TRUE, TRUE },
{ display->atom__MUTTER_HINTS, META_PROP_VALUE_TEXT_PROPERTY, reload_mutter_hints, TRUE, TRUE },
{ display->atom__NET_WM_OPAQUE_REGION, META_PROP_VALUE_CARDINAL_LIST, reload_opaque_region, TRUE, TRUE },
{ display->atom__NET_WM_ICON_NAME, META_PROP_VALUE_UTF8, reload_net_wm_icon_name, TRUE, FALSE },
{ XA_WM_ICON_NAME, META_PROP_VALUE_TEXT_PROPERTY, reload_wm_icon_name, TRUE, FALSE },
{ display->atom__NET_WM_DESKTOP, META_PROP_VALUE_CARDINAL, reload_net_wm_desktop, TRUE, FALSE },
{ display->atom__NET_STARTUP_ID, META_PROP_VALUE_UTF8, reload_net_startup_id, TRUE, FALSE },
{ display->atom__NET_WM_SYNC_REQUEST_COUNTER, META_PROP_VALUE_SYNC_COUNTER_LIST, reload_update_counter, TRUE, TRUE },

View File

@ -48,8 +48,6 @@ struct _MetaWindowX11Private
/* Info on which props we got our attributes from */
guint using_net_wm_name : 1; /* vs. plain wm_name */
guint using_net_wm_visible_name : 1; /* tracked so we can clear it */
guint using_net_wm_icon_name : 1; /* vs. plain wm_icon_name */
guint using_net_wm_visible_icon_name : 1; /* tracked so we can clear it */
Atom type_atom;
};