Skip to content

Commit b829b31

Browse files
committed
[Gtk4] Remove decoration of Shell with parent and ON_TOP
On Gtk 3 such shells are created with GTK_WINDOW_POPUP - aka undecorated amongst other things like transient_for and destroy with parent which are set for for every child shell.
1 parent 2cd0808 commit b829b31

File tree

1 file changed

+3
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,6 @@ void createHandle (int index) {
749749
int type = GTK.GTK_WINDOW_TOPLEVEL;
750750
if (isChildShell && (style & SWT.ON_TOP) != 0) type = GTK.GTK_WINDOW_POPUP;
751751
if (GTK.GTK4) {
752-
// TODO: GTK4 need to handle for GTK_WINDOW_POPUP type
753752
shellHandle = GTK4.gtk_window_new();
754753
if (OS.isWayland()) {
755754
long headerbar = GTK4.gtk_window_get_titlebar(shellHandle);
@@ -760,6 +759,9 @@ void createHandle (int index) {
760759
GTK4.gtk_window_set_titlebar(shellHandle, hb);
761760
}
762761
}
762+
if (type == GTK.GTK_WINDOW_POPUP) {
763+
GTK.gtk_window_set_decorated(shellHandle, false);
764+
}
763765
} else {
764766
shellHandle = GTK3.gtk_window_new(type);
765767
}

0 commit comments

Comments
 (0)