[gtk/gtk-3-24: 1/2] Ignore wl_output globals not bound by us




commit 9a4e32892896ce1d0a92f413845f6f7f18f9b456
Author: Ronan Pigott <rpigott berkeley edu>
Date:   Sat Sep 11 17:22:12 2021 -0700

    Ignore wl_output globals not bound by us
    
    Gdk doesn't know the scale of output globals it didn't bind. This
    keeps them from entering the output list and triggering erroneous
    changes in surface scales.

 gdk/wayland/gdkwindow-wayland.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 2d7c42bd7a..1e82dcae3e 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1520,6 +1520,14 @@ surface_enter (void              *data,
 {
   GdkWindow *window = GDK_WINDOW (data);
   GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+  GdkWaylandDisplay *display_wayland =
+    GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
+  gboolean output_is_unmanaged;
+
+  output_is_unmanaged =
+    _gdk_wayland_screen_get_output_scale (display_wayland->screen, output) == 0;
+  if (output_is_unmanaged)
+    return;
 
   GDK_NOTE (EVENTS,
             g_message ("surface enter, window %p output %p", window, output));


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