mirror of
https://github.com/brl/mutter.git
synced 2025-08-06 08:34:41 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user