summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu <ccornu>2004-05-27 20:40:36 +0000
committerChristophe Cornu <ccornu>2004-05-27 20:40:36 +0000
commit778ad148a88b4d2c6681931c6a4a6c9b1711dc8a (patch)
tree8c8b94106cc9e5768368f48a13ebf4096fcb87a5
parent09961ccf5b5da1a0183f5692335d53950fe69597 (diff)
downloadeclipse.platform.swt-778ad148a88b4d2c6681931c6a4a6c9b1711dc8a.tar.gz
eclipse.platform.swt-778ad148a88b4d2c6681931c6a4a6c9b1711dc8a.tar.xz
eclipse.platform.swt-778ad148a88b4d2c6681931c6a4a6c9b1711dc8a.zip
63185 - redraw issues when resizing + negative resize events
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Browser.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Browser.java
index 6d4d93f483..2b254e588e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Browser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Browser.java
@@ -184,12 +184,19 @@ public Browser(Composite parent, int style) {
* Feature on Safari. The HIView ignores the call to update its position
* because it believes it has not changed. The workaround is to force
* it to reposition by changing its size and setting it back to the
- * original value.
+ * original value.
+ *
*/
/* If the widget is hidden, leave its size to 0,0 as set in the SWT.Hide callback */
if (!isVisible()) break;
CGRect bounds = new CGRect();
OS.HIViewGetFrame(handle, bounds);
+ /*
+ * Note. Setting negative width or height causes Safari to always
+ * display incorrectly even if further resize events are correct.
+ */
+ if (bounds.width < 0) bounds.width = 0;
+ if (bounds.height < 0) bounds.height = 0;
bounds.width++;
OS.HIViewSetFrame(webViewHandle, bounds);
bounds.width--;
@@ -200,6 +207,7 @@ public Browser(Composite parent, int style) {
}
};
addListener(SWT.Dispose, listener);
+ addListener(SWT.Resize, listener);
Shell shell = getShell();
shell.addListener(SWT.Resize, listener);
shell.addListener(SWT.Show, listener);