summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-05-07 15:51:22 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-05-07 15:52:57 -0400
commit642c17db34aa58b5ab4b480578f048d3f7457d64 (patch)
tree355536e6fb7a1e99354d4b90260f03e40cac0ca5 /bundles
parent6f3ef9e730ccef5da46dd4d57423dfb7ca2575c6 (diff)
downloadeclipse.platform.swt-642c17db34aa58b5ab4b480578f048d3f7457d64.tar.gz
eclipse.platform.swt-642c17db34aa58b5ab4b480578f048d3f7457d64.tar.xz
eclipse.platform.swt-642c17db34aa58b5ab4b480578f048d3f7457d64.zip
Bug 340054 - SWT Painting problems in Cocoa
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java1
3 files changed, 13 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index 48f170723e..62ad825242 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -2285,6 +2285,10 @@ public boolean isReparentable () {
return true;
}
+boolean isResizing () {
+ return (state & RESIZING) != 0 || parent.isResizing();
+}
+
boolean isShowing () {
/*
* This is not complete. Need to check if the
@@ -3796,7 +3800,10 @@ void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) {
super.setFrameSize(id, sel, size);
if (frame.width != size.width || frame.height != size.height) {
invalidateVisibleRegion();
+ boolean oldResizing = (state & RESIZING) != 0;
+ state |= RESIZING;
resized ();
+ if (!oldResizing) state &= ~RESIZING;
}
}
@@ -4885,6 +4892,7 @@ public void update () {
void update (boolean all) {
// checkWidget();
if (display.isPainting.containsObject(view)) return;
+ if (isResizing()) return;
Shell shell = getShell();
NSWindow window = shell.deferFlushing && shell.scrolling ? view.window() : null;
try {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index 514990843b..d810b81cee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
@@ -1230,6 +1230,10 @@ boolean isEnabledCursor () {
return true;
}
+boolean isResizing () {
+ return (state & RESIZING) != 0;
+}
+
boolean isTransparent() {
return false;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index 593c80fbdf..872dde2941 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -78,6 +78,7 @@ public abstract class Widget {
static final int DISPOSE_SENT = 1<<16;
static final int FOREIGN_HANDLE = 1<<17;
static final int DRAG_DETECT = 1<<18;
+ static final int RESIZING = 1<<19;
/* WebKit fixes */
static final int WEBKIT_EVENTS_FIX = 1<<19;