From dc22e68f11f287a803f19c58505ae7441a5aa459 Mon Sep 17 00:00:00 2001 From: Ian Pun Date: Fri, 17 Jun 2016 15:49:26 +0530 Subject: Bug 496639 - GTK: dialog on top of full-screen shell is not shown Any new shell windows that are set to modal will spawn above the full-screen window when setVisible() is called. Change-Id: I95cc1226decd4e51f994c12a08a2c7dca504baed Signed-off-by: Ian Pun --- .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index c0a2f21817..823de0a1b0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -2346,6 +2346,14 @@ public void setVisible (boolean visible) { display.clearModal (this); OS.gtk_window_set_modal (shellHandle, false); } + /* + * When in full-screen mode, the OS will always consider it to be the top of the display stack unless it is a dialog. + * This fix will give modal windows dialog-type priority if the parent is in full-screen, allowing it to be popped + * up in front of the full-screen window. + */ + if (parent!=null && parent.getShell().getFullScreen()) { + OS.gtk_window_set_type_hint(shellHandle, OS.GDK_WINDOW_TYPE_HINT_DIALOG); + } } else { updateModal (); } -- cgit v1.2.3