mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
window-props: Use the standard property type system for WM_WINDOW_ROLE
There seems to be no reason we can't just use this.
This commit is contained in:
parent
463b50e746
commit
031154a400
@ -334,7 +334,9 @@ reload_wm_window_role (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
meta_window_x11_update_role (window);
|
||||
g_clear_pointer (&window->role, g_free);
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
window->role = g_strdup (value->v.str);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1698,7 +1700,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
|
||||
{ display->atom__NET_WM_ICON_GEOMETRY, META_PROP_VALUE_CARDINAL_LIST, reload_icon_geometry, FALSE, FALSE },
|
||||
{ display->atom_WM_CLIENT_LEADER, META_PROP_VALUE_INVALID, complain_about_broken_client, FALSE, FALSE },
|
||||
{ display->atom_SM_CLIENT_ID, META_PROP_VALUE_INVALID, complain_about_broken_client, FALSE, FALSE },
|
||||
{ display->atom_WM_WINDOW_ROLE, META_PROP_VALUE_INVALID, reload_wm_window_role, TRUE, FALSE },
|
||||
{ display->atom_WM_WINDOW_ROLE, META_PROP_VALUE_STRING, reload_wm_window_role, TRUE, FALSE },
|
||||
{ display->atom__NET_WM_WINDOW_TYPE, META_PROP_VALUE_INVALID, reload_net_wm_window_type, TRUE, TRUE },
|
||||
{ display->atom__NET_WM_STRUT, META_PROP_VALUE_INVALID, reload_struts, FALSE, FALSE },
|
||||
{ display->atom__NET_WM_STRUT_PARTIAL, META_PROP_VALUE_INVALID, reload_struts, FALSE, FALSE },
|
||||
|
@ -1658,29 +1658,6 @@ meta_window_x11_update_net_wm_type (MetaWindow *window)
|
||||
meta_window_x11_recalc_window_type (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_x11_update_role (MetaWindow *window)
|
||||
{
|
||||
char *str;
|
||||
|
||||
g_return_if_fail (!window->override_redirect);
|
||||
|
||||
if (window->role)
|
||||
g_free (window->role);
|
||||
window->role = NULL;
|
||||
|
||||
if (meta_prop_get_latin1_string (window->display, window->xwindow,
|
||||
window->display->atom_WM_WINDOW_ROLE,
|
||||
&str))
|
||||
{
|
||||
window->role = g_strdup (str);
|
||||
meta_XFree (str);
|
||||
}
|
||||
|
||||
meta_verbose ("Updated role of %s to '%s'\n",
|
||||
window->desc, window->role ? window->role : "null");
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_set_opaque_region (MetaWindow *window,
|
||||
cairo_region_t *region)
|
||||
|
@ -55,7 +55,6 @@ void meta_window_x11_destroy_sync_request_alarm (MetaWindow *window);
|
||||
void meta_window_x11_update_sync_request_counter (MetaWindow *window,
|
||||
gint64 new_counter_value);
|
||||
|
||||
void meta_window_x11_update_role (MetaWindow *window);
|
||||
void meta_window_x11_update_net_wm_type (MetaWindow *window);
|
||||
void meta_window_x11_update_opaque_region (MetaWindow *window);
|
||||
void meta_window_x11_update_input_region (MetaWindow *window);
|
||||
|
Loading…
Reference in New Issue
Block a user