From 495de25e63b8c802d82504e49152d077886a62cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Thu, 30 Oct 2025 18:49:20 +0200 Subject: [PATCH] [GTK4] Fix Control.update on Wayland Display.flushExposes is strictly X11 specific so it makes not sense to fail Table.paintWindow() due to usage of GTK3.gtk_tree_view_get_bin_window when in the end that would not be used at all on Wayland. Gtk4/X11 case will remain broken but considering that distros stop shipping Gnome on X11 it is not worth supporting smth that users will not get easily available (https://fedoraproject.org/wiki/Changes/WaylandOnlyGNOME ). Fixes Ctrl+3 in Eclipse. --- .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 27c0b59321..005e314ef1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -6813,8 +6813,10 @@ void update (boolean all, boolean flush) { if(GTK.GTK4) GTK.gtk_widget_queue_draw(handle); if (!GTK.gtk_widget_get_visible (topHandle ())) return; if (!GTK.gtk_widget_get_realized (handle)) return; - long window = paintWindow (); - if (flush) display.flushExposes (window, all); + if (flush && OS.isX11()) { + long window = paintWindow (); + display.flushExposes (window, all); + } } void updateBackgroundMode () {