mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
Turned window decorated flag into MetaWindow::decorated property.
This allows things like the compositor to easily track decoration status.
This commit is contained in:
parent
5780ffad12
commit
8c0ae7be83
@ -608,6 +608,7 @@ reload_mwm_hints (MetaWindow *window,
|
|||||||
MetaPropValue *value)
|
MetaPropValue *value)
|
||||||
{
|
{
|
||||||
MotifWmHints *hints;
|
MotifWmHints *hints;
|
||||||
|
gboolean old_decorated = window->decorated;
|
||||||
|
|
||||||
window->mwm_decorated = TRUE;
|
window->mwm_decorated = TRUE;
|
||||||
window->mwm_border_only = FALSE;
|
window->mwm_border_only = FALSE;
|
||||||
@ -724,6 +725,9 @@ reload_mwm_hints (MetaWindow *window,
|
|||||||
META_QUEUE_MOVE_RESIZE |
|
META_QUEUE_MOVE_RESIZE |
|
||||||
/* because ensure/destroy frame may unmap: */
|
/* because ensure/destroy frame may unmap: */
|
||||||
META_QUEUE_CALC_SHOWING);
|
META_QUEUE_CALC_SHOWING);
|
||||||
|
|
||||||
|
if (old_decorated != window->decorated)
|
||||||
|
g_object_notify (G_OBJECT (window), "decorated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +140,7 @@ enum {
|
|||||||
PROP_TITLE,
|
PROP_TITLE,
|
||||||
PROP_ICON,
|
PROP_ICON,
|
||||||
PROP_MINI_ICON,
|
PROP_MINI_ICON,
|
||||||
|
PROP_DECORATED,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -196,6 +197,9 @@ meta_window_get_property(GObject *object,
|
|||||||
case PROP_MINI_ICON:
|
case PROP_MINI_ICON:
|
||||||
g_value_set_object (value, win->mini_icon);
|
g_value_set_object (value, win->mini_icon);
|
||||||
break;
|
break;
|
||||||
|
case PROP_DECORATED:
|
||||||
|
g_value_set_boolean (value, win->decorated);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -249,6 +253,14 @@ meta_window_class_init (MetaWindowClass *klass)
|
|||||||
GDK_TYPE_PIXBUF,
|
GDK_TYPE_PIXBUF,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_DECORATED,
|
||||||
|
g_param_spec_boolean ("decorated",
|
||||||
|
"Decorated",
|
||||||
|
"Whether windos is decorated",
|
||||||
|
TRUE,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
window_signals[WORKSPACE_CHANGED] =
|
window_signals[WORKSPACE_CHANGED] =
|
||||||
g_signal_new ("workspace-changed",
|
g_signal_new ("workspace-changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
@ -6564,6 +6576,8 @@ recalc_window_type (MetaWindow *window)
|
|||||||
|
|
||||||
if (old_type != window->type)
|
if (old_type != window->type)
|
||||||
{
|
{
|
||||||
|
gboolean old_decorated = window->decorated;
|
||||||
|
|
||||||
recalc_window_features (window);
|
recalc_window_features (window);
|
||||||
|
|
||||||
if (!window->override_redirect)
|
if (!window->override_redirect)
|
||||||
@ -6579,6 +6593,9 @@ recalc_window_type (MetaWindow *window)
|
|||||||
meta_window_update_layer (window);
|
meta_window_update_layer (window);
|
||||||
|
|
||||||
meta_window_grab_keys (window);
|
meta_window_grab_keys (window);
|
||||||
|
|
||||||
|
if (old_decorated != window->decorated)
|
||||||
|
g_object_notify (G_OBJECT (window), "decorated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user