diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-08-16 11:45:27 -0400 |
---|---|---|
committer | Anatoly Spektor <aspektor@redhat.com> | 2012-08-16 11:45:27 -0400 |
commit | 99e2cd5c57f5e0088828f77a6ce683637583beb4 (patch) | |
tree | 07979944cc2719d552f41638911cfdab34cff3a3 | |
parent | f9b1702d538b7119b88c12bc0de93297d0f1bfff (diff) | |
parent | c727147cfc912981c3a3385133f2828fe1d74e9b (diff) | |
download | eclipse.platform.swt-99e2cd5c57f5e0088828f77a6ce683637583beb4.tar.gz eclipse.platform.swt-99e2cd5c57f5e0088828f77a6ce683637583beb4.tar.xz eclipse.platform.swt-99e2cd5c57f5e0088828f77a6ce683637583beb4.zip |
Merge branch 'master' of http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java | 24 |
2 files changed, 15 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java index 28e23a2aab..b7306d1588 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java @@ -2460,8 +2460,8 @@ void setButtonBounds(GC gc) { if (overflow[0][i]) { controls[i].setBounds(rects[i]); } else { - controls[i].setBounds(rects[i].x, rects[i].y, rects[i].width, headerHeight); controls[i].moveAbove(null); + controls[i].setBounds(rects[i].x, rects[i].y, rects[i].width, headerHeight); } } if (!changed && !rects[i].equals(controlRects[i])) changed = true; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java index 7e3599f4e9..b2b5edd798 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java @@ -139,17 +139,21 @@ public void drawBackground (GC gc, int x, int y, int width, int height) { void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) { super.drawBackground(id, context, rect); if (glcontext != null) { - context.saveGraphicsState(); - context.setCompositingOperation(OS.NSCompositeClear); - if (visiblePath == null) { - int /*long*/ visibleRegion = getVisibleRegion(); - visiblePath = getPath(visibleRegion); - OS.DisposeRgn(visibleRegion); + if (isObscured()) { + glcontext.setValues(new int[]{-1}, OS.NSOpenGLCPSurfaceOrder); + context.saveGraphicsState(); + context.setCompositingOperation(OS.NSCompositeClear); + if (visiblePath == null) { + int /*long*/ visibleRegion = getVisibleRegion(); + visiblePath = getPath(visibleRegion); + OS.DisposeRgn(visibleRegion); + } + visiblePath.addClip(); + NSBezierPath.fillRect(rect); + context.restoreGraphicsState(); + } else { + glcontext.setValues(new int[]{1}, OS.NSOpenGLCPSurfaceOrder); } - visiblePath.addClip(); - NSBezierPath.fillRect(rect); - context.restoreGraphicsState(); - return; } } |