Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2015-10-14 17:41:06 +0000
committerSopot Cela2015-10-19 12:49:55 +0000
commitddcfd1f3efd70591480e6c053946618ef6696104 (patch)
tree3a233e541675ce23158fed00153aa8ae839f6de6
parentca94f0aa02e716da70e61f19ffd79218e1e2e9a0 (diff)
downloadeclipse.platform.ui-ddcfd1f3efd70591480e6c053946618ef6696104.tar.gz
eclipse.platform.ui-ddcfd1f3efd70591480e6c053946618ef6696104.tar.xz
eclipse.platform.ui-ddcfd1f3efd70591480e6c053946618ef6696104.zip
Bug 466500: [GTK3] Trying to resize quick outline or quick type
hierarchy closes the popup In PopupDialog, Shells with no children are closed on deactivation. On Linux-Gtk, this causes popups like the "Quick Outline" or "Quick Type Hierarchy" to close prematurely when opening the system menu, re-sizing, or moving the window with the mouse. It is for this reason that we need to exclude the call to asyncClose() from running on Gtk. This also fixes bug 113577. Tested on Gtk3.16.6, and Gtk2.24. Change-Id: I4111ad961e2b4e57c90939e7cb0e982b7bf3b894 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
index 2068cc42d9f..0d361af455d 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
@@ -578,18 +578,21 @@ public class PopupDialog extends Window {
protected void configureShell(Shell shell) {
GridLayoutFactory.fillDefaults().margins(0, 0).spacing(5, 5).applyTo(
shell);
-
shell.addListener(SWT.Deactivate, event -> {
/*
* Close if we are deactivating and have no child shells. If we
* have child shells, we are deactivating due to their opening.
- * On X, we receive this when a menu child (such as the system
- * menu) of the shell opens, but I have not found a way to
- * distinguish that case here. Hence bug #113577 still exists.
+ *
+ * Feature in GTK: this causes the Quick Outline/Type Hierarchy
+ * Shell to close on re-size/movement on Gtk3. For this reason,
+ * the asyncClose() call is disabled in GTK. See Eclipse Bugs
+ * 466500 and 113577 for more information.
*/
if (listenToDeactivate && event.widget == getShell()
&& getShell().getShells().length == 0) {
- asyncClose();
+ if (!Util.isGtk()) {
+ asyncClose();
+ }
} else {
/*
* We typically ignore deactivates to work around

Back to the top