Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Zadrozny2014-08-26 16:25:41 +0000
committerDani Megert2014-08-26 16:28:23 +0000
commit98bb2ad3ac7eef5f879bb4ac643036d9fd856a29 (patch)
treeef43786c530f7af8fd1ccc4caa92eb0bfd216349
parentb5818d8691514d52e567be5d9aa5d878c1a572cf (diff)
downloadeclipse.platform.ui-98bb2ad3ac7eef5f879bb4ac643036d9fd856a29.tar.gz
eclipse.platform.ui-98bb2ad3ac7eef5f879bb4ac643036d9fd856a29.tar.xz
eclipse.platform.ui-98bb2ad3ac7eef5f879bb4ac643036d9fd856a29.zip
Backported fixed for bug 436763: [DetachedView] Layout of console view becomes wrong after changing perspective and only becomes correct after a resizeM20140827-1200M20140827-0800
Signed-off-by: Fabio Zadrozny <fabiofz@gmail.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/LazyStackRenderer.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/LazyStackRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/LazyStackRenderer.java
index e8648b08e0d..88cffabcc3e 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/LazyStackRenderer.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/LazyStackRenderer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
+ * Copyright (c) 2008, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Fabio Zadrozny (fabiofz@gmail.com) - Bug 436763
*******************************************************************************/
package org.eclipse.e4.ui.workbench.renderers.swt;
@@ -28,6 +29,7 @@ import org.eclipse.e4.ui.workbench.UIEvents;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
@@ -243,6 +245,7 @@ public abstract class LazyStackRenderer extends SWTPartRenderer {
}
}
+ Shell layoutShellLater = null;
// Show any floating windows
if (element instanceof MWindow && element.getWidget() != null) {
int visCount = 0;
@@ -250,8 +253,14 @@ public abstract class LazyStackRenderer extends SWTPartRenderer {
if (kid.isToBeRendered() && kid.isVisible())
visCount++;
}
- if (visCount > 0)
+ if (visCount > 0) {
element.setVisible(true);
+ Object widget = element.getWidget();
+ if (widget instanceof Shell) {
+ Shell shell = (Shell) widget;
+ layoutShellLater = shell;
+ }
+ }
}
if (element instanceof MGenericStack<?>) {
@@ -281,5 +290,12 @@ public abstract class LazyStackRenderer extends SWTPartRenderer {
}
}
}
+
+ // i.e.: Bug 436763: after we make items visible, if we made a new
+ // floating shell visible, we have to re-layout it for its contents to
+ // become correct.
+ if (layoutShellLater != null) {
+ layoutShellLater.layout();
+ }
}
}

Back to the top