[mutter/gnome-3-36] xwayland: Fix condition for queuing a window to META_QUEUE_CALC_SHOWING



commit e91b0f8a4b3a72e92c36b94fd0a391ed73b029aa
Author: Dor Askayo <dor askayo gmail com>
Date:   Fri Oct 1 23:40:53 2021 +0300

    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>
    (cherry picked from commit 98d5aa159e0eb9f433b211044ce30cd612d42734)
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2038

 src/wayland/meta-xwayland-surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-xwayland-surface.c b/src/wayland/meta-xwayland-surface.c
index 4a4615a2c0..396200f098 100644
--- a/src/wayland/meta-xwayland-surface.c
+++ b/src/wayland/meta-xwayland-surface.c
@@ -182,7 +182,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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]