Skip to content

Commit 6f8246b

Browse files
committed
[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.
1 parent 079d2a9 commit 6f8246b

File tree

1 file changed

+4
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+4
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6813,8 +6813,10 @@ void update (boolean all, boolean flush) {
68136813
if(GTK.GTK4) GTK.gtk_widget_queue_draw(handle);
68146814
if (!GTK.gtk_widget_get_visible (topHandle ())) return;
68156815
if (!GTK.gtk_widget_get_realized (handle)) return;
6816-
long window = paintWindow ();
6817-
if (flush) display.flushExposes (window, all);
6816+
if (flush && OS.isX11()) {
6817+
long window = paintWindow ();
6818+
display.flushExposes (window, all);
6819+
}
68186820
}
68196821

68206822
void updateBackgroundMode () {

0 commit comments

Comments
 (0)