From 99c0b82b15fb85471cf36f43c10f26dedaf0aa13 Mon Sep 17 00:00:00 2001 From: Marek Chalupa Date: Fri, 10 Jul 2015 17:24:55 +0200 Subject: [PATCH] window: do not force placing window if it is not mapped When managing window, we queue showing the window. Under wayland, if we commit surface quickly enough, the showing is unqueued and commit procedure takes care of mapping and placing the window. In the oposite case, queue is processed before client sets all we need and then we have wrong size of window, which leads to broken placement. Therefore force placement in queue only if the window should already be mapped. If it is not mapped, we don't care where it is anyway. https://bugzilla.gnome.org/show_bug.cgi?id=751887 --- src/core/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index 69ea968c4..9604a7d16 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1579,8 +1579,10 @@ implement_showing (MetaWindow *window, * windows we might want to know where they are on the screen, * so we should place the window even if we're hiding it rather * than showing it. + * Force placing windows only when they should be already mapped, + * see #751887 */ - if (!window->placed) + if (!window->placed && client_window_should_be_mapped (window)) meta_window_force_placement (window); meta_window_hide (window);