[metacity] window: Remove support for _NET_WM_ICON_NAME
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window: Remove support for _NET_WM_ICON_NAME
- Date: Sun, 26 Feb 2017 22:23:01 +0000 (UTC)
commit cf0a37eab8e958c3a954cd1a3216c4ff01956318
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/atomnames.h | 2 -
src/core/window-private.h | 3 --
src/core/window-props.c | 79 ++-------------------------------------------
src/core/window.c | 9 +----
4 files changed, 5 insertions(+), 88 deletions(-)
---
diff --git a/src/core/atomnames.h b/src/core/atomnames.h
index 085b651..b80de61 100644
--- a/src/core/atomnames.h
+++ b/src/core/atomnames.h
@@ -83,7 +83,6 @@ item(_XSETROOT_ID)
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
@@ -121,7 +120,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/core/window-private.h b/src/core/window-private.h
index 77867c9..afe4b2d 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -96,7 +96,6 @@ struct _MetaWindow
char *desc; /* used in debug spew */
char *title;
- char *icon_name;
GdkPixbuf *icon;
GdkPixbuf *mini_icon;
MetaIconCache icon_cache;
@@ -298,8 +297,6 @@ struct _MetaWindow
/* 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 */
/* has a shape mask */
guint has_shape : 1;
diff --git a/src/core/window-props.c b/src/core/window-props.c
index dde9818..203a9e7 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -518,11 +518,10 @@ owner_of_process (pid_t process, uid_t *result)
#define MAX_TITLE_LENGTH 512
/**
- * 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.
+ * Returns: %TRUE if a new title was set.
*/
static gboolean
set_title_text (MetaWindow *window,
@@ -707,66 +706,6 @@ reload_wm_name (MetaWindow *window,
}
static void
-set_icon_title (MetaWindow *window,
- const char *title)
-{
- gboolean modified =
- set_title_text (window,
- window->using_net_wm_visible_icon_name,
- title,
- window->display->atom__NET_WM_VISIBLE_ICON_NAME,
- &window->icon_name);
- window->using_net_wm_visible_icon_name = modified;
-}
-
-static void
-reload_net_wm_icon_name (MetaWindow *window,
- MetaPropValue *value,
- gboolean initial)
-{
- if (value->type != META_PROP_VALUE_INVALID)
- {
- set_icon_title (window, value->v.str);
- window->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);
- window->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)
-{
- if (window->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)
@@ -1698,18 +1637,6 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
LOAD_INIT
},
{
- display->atom__NET_WM_ICON_NAME,
- META_PROP_VALUE_UTF8,
- reload_net_wm_icon_name,
- LOAD_INIT
- },
- {
- XA_WM_ICON_NAME,
- META_PROP_VALUE_TEXT_PROPERTY,
- reload_wm_icon_name,
- LOAD_INIT
- },
- {
display->atom__NET_WM_DESKTOP,
META_PROP_VALUE_CARDINAL,
reload_net_wm_desktop,
diff --git a/src/core/window.c b/src/core/window.c
index e38d9e3..64c759b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -430,7 +430,6 @@ meta_window_new_with_attrs (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);
@@ -540,10 +539,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->struts = NULL;
- window->using_net_wm_name = FALSE;
- window->using_net_wm_visible_name = FALSE;
- window->using_net_wm_icon_name = FALSE;
- window->using_net_wm_visible_icon_name = FALSE;
+ window->using_net_wm_name = FALSE;
+ window->using_net_wm_visible_name = FALSE;
window->need_reread_icon = TRUE;
@@ -554,7 +551,6 @@ meta_window_new_with_attrs (MetaDisplay *display,
meta_display_register_x_window (display, &window->xwindow, window);
-
/* assign the window to its group, or create a new group if needed
*/
window->group = NULL;
@@ -1164,7 +1160,6 @@ meta_window_free (MetaWindow *window,
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]