[mutter/wayland] window: Remove support for _NET_WM_ICON_NAME



commit 0a20f7458cbc688c06fd1f7e4df16d50bb9f9b42
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Mar 18 21:48:52 2014 -0400

    window: Remove support for _NET_WM_ICON_NAME
    
    We don't seem to use it anywhere.

 src/core/window-private.h    |    1 -
 src/core/window.c            |    2 -
 src/meta/atomnames.h         |    2 -
 src/x11/window-props.c       |   76 +----------------------------------------
 src/x11/window-x11-private.h |    2 -
 5 files changed, 2 insertions(+), 81 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index b52d88b..d5e7714 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -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;
diff --git a/src/core/window.c b/src/core/window.c
index 2a4503d..93a5c06 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -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);
diff --git a/src/meta/atomnames.h b/src/meta/atomnames.h
index d5e8a47..f93876c 100644
--- a/src/meta/atomnames.h
+++ b/src/meta/atomnames.h
@@ -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)
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index 5b4707b..d9aacc6 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -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.
  */
@@ -612,75 +611,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,
                      gboolean       initial)
@@ -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 },
diff --git a/src/x11/window-x11-private.h b/src/x11/window-x11-private.h
index 54404d6..e288439 100644
--- a/src/x11/window-x11-private.h
+++ b/src/x11/window-x11-private.h
@@ -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;
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]