Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Pun2017-02-21 15:04:04 +0000
committerAlexander Kurtakov2017-02-22 08:03:50 +0000
commite9f5c618be8f2224c7a526e608eb7e2b8d8c386b (patch)
treed48d959e634b2e08d23b4b86b15e464e44d8f236
parent3199ef8db508a2e944de31de909cf29dacc4a35f (diff)
downloadeclipse.platform.swt-e9f5c618be8f2224c7a526e608eb7e2b8d8c386b.tar.gz
eclipse.platform.swt-e9f5c618be8f2224c7a526e608eb7e2b8d8c386b.tar.xz
eclipse.platform.swt-e9f5c618be8f2224c7a526e608eb7e2b8d8c386b.zip
Bug 508786 - [wayland] Shell.setMinimized(true) doesn't work on wayland
setMinimized call now checks to see if the shell is visible or not and sets it to true if it isn't before calling gtk_window_iconify(). Can be tested with Snippet27 in both X11 and Wayland. Using Gnome, go to gnome-tweak-tool:extensions and turn on window list. The snippet should run but be greyed out in the window list, indicating it is minimized. Change-Id: I739a5e4db371b7b18aa9a7073733e38ad11766d5 Signed-off-by: Ian Pun <ipun@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java6
1 files changed, 5 insertions, 1 deletions
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 4d5b193f88..d1ae67a59b 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
@@ -1669,8 +1669,9 @@ long /*int*/ gtk_window_state_event (long /*int*/ widget, long /*int*/ event) {
public void open () {
checkWidget ();
bringToTop (false);
- if (Shell.class.isInstance(getParent()) && !getParent().isVisible())
+ if (Shell.class.isInstance(getParent()) && !getParent().isVisible()) {
Shell.class.cast(getParent()).open();
+ }
setVisible (true);
if (isDisposed ()) return;
/*
@@ -2160,6 +2161,9 @@ public void setMinimized (boolean minimized) {
checkWidget();
if (this.minimized == minimized) return;
super.setMinimized (minimized);
+ if(OS.GTK_VERSION >= OS.VERSION (3, 8, 0) && !OS.gtk_widget_get_visible(shellHandle)) {
+ OS.gtk_widget_show(shellHandle);
+ }
if (minimized) {
OS.gtk_window_iconify (shellHandle);
} else {

Back to the top