xwayland: Fix condition for queuing a window to META_QUEUE_CALC_SHOWING

This logic was changed by accident in df642eb15. The change caused every
Xwayland window to be queued to META_QUEUE_CALC_SHOWING on every surface
commit. As a result, X11 window management events, including _NET_WM_STATE,
were dispatched at clients on every single frame.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1955

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2032>
This commit is contained in:
Dor Askayo 2021-10-01 23:40:53 +03:00
parent c789b6be38
commit 98d5aa159e

View File

@ -148,7 +148,7 @@ meta_xwayland_surface_pre_apply_state (MetaWaylandSurfaceRole *surface_role,
MetaXwaylandSurface *xwayland_surface = META_XWAYLAND_SURFACE (surface_role);
if (pending->newly_attached &&
surface->buffer_ref->buffer &&
!surface->buffer_ref->buffer &&
xwayland_surface->window)
meta_window_queue (xwayland_surface->window, META_QUEUE_CALC_SHOWING);
}