Commit 8c0ae7be authored by Tomas Frydrych's avatar Tomas Frydrych

Turned window decorated flag into MetaWindow::decorated property.

  This allows things like the compositor to easily track decoration status.
parent 5780ffad
......@@ -608,6 +608,7 @@ reload_mwm_hints (MetaWindow *window,
MetaPropValue *value)
{
MotifWmHints *hints;
gboolean old_decorated = window->decorated;
window->mwm_decorated = TRUE;
window->mwm_border_only = FALSE;
......@@ -724,6 +725,9 @@ reload_mwm_hints (MetaWindow *window,
META_QUEUE_MOVE_RESIZE |
/* because ensure/destroy frame may unmap: */
META_QUEUE_CALC_SHOWING);
if (old_decorated != window->decorated)
g_object_notify (G_OBJECT (window), "decorated");
}
}
......
......@@ -140,6 +140,7 @@ enum {
PROP_TITLE,
PROP_ICON,
PROP_MINI_ICON,
PROP_DECORATED,
};
enum
......@@ -196,6 +197,9 @@ meta_window_get_property(GObject *object,
case PROP_MINI_ICON:
g_value_set_object (value, win->mini_icon);
break;
case PROP_DECORATED:
g_value_set_boolean (value, win->decorated);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -249,6 +253,14 @@ meta_window_class_init (MetaWindowClass *klass)
GDK_TYPE_PIXBUF,
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] =
g_signal_new ("workspace-changed",
G_TYPE_FROM_CLASS (object_class),
......@@ -6564,6 +6576,8 @@ recalc_window_type (MetaWindow *window)
if (old_type != window->type)
{
gboolean old_decorated = window->decorated;
recalc_window_features (window);
if (!window->override_redirect)
......@@ -6579,6 +6593,9 @@ recalc_window_type (MetaWindow *window)
meta_window_update_layer (window);
meta_window_grab_keys (window);
if (old_decorated != window->decorated)
g_object_notify (G_OBJECT (window), "decorated");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment