Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-07-04 14:42:06 +0000
committerEric Williams2018-07-04 15:00:25 +0000
commit3b6cbf693da065f49bef820d886990d8397f3ebc (patch)
tree88c0e59f2390565048165a67f592b44f18f513b9
parenta03a0de2fa5c0ecb5916ff85c29c89bbd165e6f7 (diff)
downloadeclipse.platform.swt-3b6cbf693da065f49bef820d886990d8397f3ebc.tar.gz
eclipse.platform.swt-3b6cbf693da065f49bef820d886990d8397f3ebc.tar.xz
eclipse.platform.swt-3b6cbf693da065f49bef820d886990d8397f3ebc.zip
Bug 289346: [Widgets] Gtk SWT should set type hint for floating shell
windows Implement SWT.TOOL functionality in Shell by setting the appropriate GdkWindowTypeHint. Tested on GTK3.22 - no AllNonBrowser JUnit tests fail, child Eclipse popups and shells look normal. Change-Id: I82c9bd3bc5087d3eb445d28a2f893375e01e6ea8 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index 15defef1bd..0313ced176 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -246,6 +246,7 @@ public class GDK extends OS {
public static final int GDK_WA_Y = 1 << 3;
public static final int GDK_WA_VISUAL = 1 << 6;
public static final int GDK_WINDOW_TYPE_HINT_DIALOG = 1;
+ public static final int GDK_WINDOW_TYPE_HINT_UTILITY = 5;
public static final int GDK_WINDOW_TYPE_HINT_TOOLTIP = 10;
/** sizeof(TYPE) for 32/64 bit support */
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 314323723a..89119ce376 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
@@ -754,6 +754,9 @@ void createHandle (int index) {
GTK.gtk_widget_modify_bg (shellHandle, GTK.GTK_STATE_NORMAL, color);
}
}
+ if ((style & SWT.TOOL) != 0) {
+ GTK.gtk_window_set_type_hint(shellHandle, GDK.GDK_WINDOW_TYPE_HINT_UTILITY);
+ }
if ((style & SWT.NO_TRIM) != 0 ) {
GTK.gtk_window_set_decorated(shellHandle, false);
}

Back to the top