summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-06-28 18:32:27 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2012-10-03 23:35:35 -0400
commitc02e1b6f56b11baa9cb08b8fa4f0ae03e28458e6 (patch)
tree9d1bc5f99ae15b30561915ebb96d1cece90ee552
parent7938458eb8b5e9f0aa7380e2b1fc0559631d83a3 (diff)
downloadmutter-c02e1b6f56b11baa9cb08b8fa4f0ae03e28458e6.tar.gz
Remove unused public window-property functions
Simplify the set of window-property functions to remove the unused functions: meta_window_reload_properties_from_xwindow() meta_window_reload_properties() And to make: meta_window_reload_property() static. The code is considerably simplified by removing the plural variants. https://bugzilla.gnome.org/show_bug.cgi?id=587255
-rw-r--r--src/core/window-props.c86
-rw-r--r--src/core/window-props.h57
2 files changed, 29 insertions, 114 deletions
diff --git a/src/core/window-props.c b/src/core/window-props.c
index e08c89cdd..68e14fd21 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -78,74 +78,38 @@ static MetaWindowPropHooks* find_hooks (MetaDisplay *display,
void
-meta_window_reload_property (MetaWindow *window,
- Atom property,
- gboolean initial)
+meta_window_reload_property_from_xwindow (MetaWindow *window,
+ Window xwindow,
+ Atom property,
+ gboolean initial)
{
- meta_window_reload_properties (window, &property, 1, initial);
-}
+ MetaPropValue value = { 0, };
+ MetaWindowPropHooks *hooks;
-void
-meta_window_reload_properties (MetaWindow *window,
- const Atom *properties,
- int n_properties,
- gboolean initial)
-{
- meta_window_reload_properties_from_xwindow (window,
- window->xwindow,
- properties,
- n_properties,
- initial);
-}
+ hooks = find_hooks (window->display, property);
+ if (!hooks)
+ return;
-void
-meta_window_reload_property_from_xwindow (MetaWindow *window,
- Window xwindow,
- Atom property,
- gboolean initial)
-{
- meta_window_reload_properties_from_xwindow (window, xwindow, &property, 1,
- initial);
-}
+ init_prop_value (window, hooks, &value);
-void
-meta_window_reload_properties_from_xwindow (MetaWindow *window,
- Window xwindow,
- const Atom *properties,
- int n_properties,
- gboolean initial)
-{
- int i;
- MetaPropValue *values;
-
- g_return_if_fail (properties != NULL);
- g_return_if_fail (n_properties > 0);
-
- values = g_new0 (MetaPropValue, n_properties);
-
- i = 0;
- while (i < n_properties)
- {
- MetaWindowPropHooks *hooks = find_hooks (window->display, properties[i]);
- init_prop_value (window, hooks, &values[i]);
- ++i;
- }
-
meta_prop_get_values (window->display, xwindow,
- values, n_properties);
+ &value, 1);
- i = 0;
- while (i < n_properties)
- {
- MetaWindowPropHooks *hooks = find_hooks (window->display, properties[i]);
- reload_prop_value (window, hooks, &values[i], initial);
-
- ++i;
- }
+ reload_prop_value (window, hooks, &value,
+ initial);
- meta_prop_free_values (values, n_properties);
-
- g_free (values);
+ meta_prop_free_values (&value, 1);
+}
+
+static void
+meta_window_reload_property (MetaWindow *window,
+ Atom property,
+ gboolean initial)
+{
+ meta_window_reload_property_from_xwindow (window,
+ window->xwindow,
+ property,
+ initial);
}
void
diff --git a/src/core/window-props.h b/src/core/window-props.h
index 3c433ee2d..16db50b9e 100644
--- a/src/core/window-props.h
+++ b/src/core/window-props.h
@@ -36,35 +36,6 @@
#include "window-private.h"
/**
- * meta_window_reload_property:
- * @window: The window.
- * @property: A single X atom.
- *
- * Requests the current values of a single property for a given
- * window from the server, and deals with it appropriately.
- * Does not return it to the caller (it's been dealt with!)
- */
-void meta_window_reload_property (MetaWindow *window,
- Atom property,
- gboolean initial);
-
-
-/**
- * meta_window_reload_properties:
- * @window: The window.
- * @properties: A pointer to a list of X atoms, "n_properties" long.
- * @n_properties: The length of the properties list.
- *
- * Requests the current values of a set of properties for a given
- * window from the server, and deals with them appropriately.
- * Does not return them to the caller (they've been dealt with!)
- */
-void meta_window_reload_properties (MetaWindow *window,
- const Atom *properties,
- int n_properties,
- gboolean initial);
-
-/**
* meta_window_reload_property_from_xwindow:
* @window: A window on the same display as the one we're
* investigating (only used to find the display)
@@ -75,30 +46,10 @@ void meta_window_reload_properties (MetaWindow *window,
* window from the server, and deals with it appropriately.
* Does not return it to the caller (it's been dealt with!)
*/
-void meta_window_reload_property_from_xwindow
- (MetaWindow *window,
- Window xwindow,
- Atom property,
- gboolean initial);
-
-/**
- * meta_window_reload_properties_from_xwindow:
- * @window: A window on the same display as the one we're
- * investigating (only used to find the display)
- * @xwindow: The X handle for the window.
- * @properties: A pointer to a list of X atoms, "n_properties" long.
- * @n_properties: The length of the properties list.
- *
- * Requests the current values of a set of properties for a given
- * window from the server, and deals with them appropriately.
- * Does not return them to the caller (they've been dealt with!)
- */
-void meta_window_reload_properties_from_xwindow
- (MetaWindow *window,
- Window xwindow,
- const Atom *properties,
- int n_properties,
- gboolean initial);
+void meta_window_reload_property_from_xwindow (MetaWindow *window,
+ Window xwindow,
+ Atom property,
+ gboolean initial);
/**
* meta_window_load_initial_properties: