summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2020-02-28 19:22:11 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2020-02-28 19:22:11 +0200
commit829ce2e3ca794d6c17a1ea9f0748ac75be5007fa (patch)
tree6cc68a686cbfa79adf92552282b1db2eaf8c8237
parentfd696d43b37859ca999680252835ff9b34d192ee (diff)
downloadmetacity-829ce2e3ca794d6c17a1ea9f0748ac75be5007fa.tar.gz
window: update frame in recalc_window_features
-rw-r--r--src/core/window-props.c19
-rw-r--r--src/core/window.c32
2 files changed, 19 insertions, 32 deletions
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 466c06f0..64d500bd 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -882,7 +882,6 @@ reload_mwm_hints (MetaWindow *window,
gboolean initial)
{
MotifWmHints *hints;
- gboolean decorated;
window->mwm_decorated = TRUE;
window->mwm_border_only = FALSE;
@@ -900,7 +899,6 @@ reload_mwm_hints (MetaWindow *window,
}
hints = value->v.motif_hints;
- decorated = window->decorated;
/* We support those MWM hints deemed non-stupid */
@@ -987,23 +985,6 @@ reload_mwm_hints (MetaWindow *window,
meta_verbose ("Functions flag unset\n");
meta_window_recalc_features (window);
-
- /* We do all this anyhow at the end of meta_window_new() */
- if (!window->constructing)
- {
- if (window->decorated)
- meta_window_ensure_frame (window);
- else
- meta_window_destroy_frame (window);
-
- meta_window_queue (window,
- META_QUEUE_MOVE_RESIZE |
- /* because ensure/destroy frame may unmap: */
- META_QUEUE_CALC_SHOWING);
-
- if (decorated != window->decorated)
- g_object_notify (G_OBJECT (window), "decorated");
- }
}
static void
diff --git a/src/core/window.c b/src/core/window.c
index c8dd297c..b745cdd3 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6756,30 +6756,17 @@ recalc_window_type (MetaWindow *window)
if (old_type != window->type)
{
- gboolean decorated;
-
- decorated = window->decorated;
-
window->attached = meta_window_should_attach_to_parent (window);
recalc_window_features (window);
if (!window->override_redirect)
set_net_wm_state (window);
- /* Update frame */
- if (window->decorated)
- meta_window_ensure_frame (window);
- else
- meta_window_destroy_frame (window);
-
/* update stacking constraints */
meta_window_update_layer (window);
meta_window_grab_keys (window);
- if (decorated != window->decorated)
- g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_DECORATED]);
-
g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_WINDOW_TYPE]);
}
}
@@ -6877,6 +6864,7 @@ recalc_window_features (MetaWindow *window)
gboolean old_has_resize_func;
gboolean old_has_shade_func;
gboolean old_always_sticky;
+ gboolean old_decorated;
old_has_close_func = window->has_close_func;
old_has_minimize_func = window->has_minimize_func;
@@ -6884,6 +6872,7 @@ recalc_window_features (MetaWindow *window)
old_has_resize_func = window->has_resize_func;
old_has_shade_func = window->has_shade_func;
old_always_sticky = window->always_sticky;
+ old_decorated = window->decorated;
/* Use MWM hints initially */
window->decorated = window->mwm_decorated;
@@ -7081,6 +7070,23 @@ recalc_window_features (MetaWindow *window)
old_always_sticky != window->always_sticky)
set_allowed_actions_hint (window);
+ if (!window->constructing &&
+ old_decorated != window->decorated)
+ {
+ /* Update frame */
+ if (window->decorated)
+ meta_window_ensure_frame (window);
+ else
+ meta_window_destroy_frame (window);
+
+ meta_window_queue (window,
+ META_QUEUE_MOVE_RESIZE |
+ /* because ensure/destroy frame may unmap: */
+ META_QUEUE_CALC_SHOWING);
+
+ g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_DECORATED]);
+ }
+
meta_window_frame_size_changed (window);
/* FIXME perhaps should ensure if we don't have a shade func,