core: Avoid placing hidden windows too early on Wayland
This check only waited for windows without a buffer for wayland clients. This should happen for all windows on a Wayland backend here, unlike the other places calling client_window_should_be_mapped() that expect to get ahead of the window state. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2786 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2999>
This commit is contained in:
parent
d44f02ba64
commit
3bea86298d
@ -1727,9 +1727,8 @@ meta_window_showing_on_its_workspace (MetaWindow *window)
|
|||||||
return showing;
|
return showing;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
meta_window_should_be_showing_on_workspace (MetaWindow *window,
|
window_has_buffer (MetaWindow *window)
|
||||||
MetaWorkspace *workspace)
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
if (meta_is_wayland_compositor ())
|
if (meta_is_wayland_compositor ())
|
||||||
@ -1740,6 +1739,16 @@ meta_window_should_be_showing_on_workspace (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_should_be_showing_on_workspace (MetaWindow *window,
|
||||||
|
MetaWorkspace *workspace)
|
||||||
|
{
|
||||||
|
if (!window_has_buffer (window))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11 &&
|
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11 &&
|
||||||
window->decorated && !window->frame)
|
window->decorated && !window->frame)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1781,7 +1790,7 @@ implement_showing (MetaWindow *window,
|
|||||||
* Force placing windows only when they should be already mapped,
|
* Force placing windows only when they should be already mapped,
|
||||||
* see #751887
|
* see #751887
|
||||||
*/
|
*/
|
||||||
if (!window->placed && client_window_should_be_mapped (window))
|
if (!window->placed && window_has_buffer (window))
|
||||||
meta_window_force_placement (window, FALSE);
|
meta_window_force_placement (window, FALSE);
|
||||||
|
|
||||||
meta_window_hide (window);
|
meta_window_hide (window);
|
||||||
|
Loading…
Reference in New Issue
Block a user