summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org
diff options
context:
space:
mode:
authorBogdan Gheorghe <gheorghe@ca.ibm.com>2012-01-16 12:44:43 -0500
committerBogdan Gheorghe <gheorghe@ca.ibm.com>2012-01-16 12:44:43 -0500
commitcbbd1213ec1a9edc402d708865524e69d4ab9400 (patch)
treecd86237166e5dcde27d12adf7f5fd23207e0b1e2 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org
parent512a62fb20982c6d071e68c0b0ba5b9d6475c257 (diff)
downloadeclipse.platform.swt-cbbd1213ec1a9edc402d708865524e69d4ab9400.tar.gz
eclipse.platform.swt-cbbd1213ec1a9edc402d708865524e69d4ab9400.tar.xz
eclipse.platform.swt-cbbd1213ec1a9edc402d708865524e69d4ab9400.zip
getSize is wrong when damage is not the whole widget
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 1bffb3d12b..903447746d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -2694,6 +2694,10 @@ void getSize(int[] width, int[] height) {
height[0] = data.height;
return;
}
+ if (data.drawable != 0) {
+ OS.gdk_drawable_get_size(data.drawable, width, height);
+ return;
+ }
if (OS.USE_CAIRO) {
int /*long*/ surface = Cairo.cairo_get_target(handle);
switch (Cairo.cairo_surface_get_type(surface)) {
@@ -2706,8 +2710,6 @@ void getSize(int[] width, int[] height) {
height[0] = Cairo.cairo_xlib_surface_get_height(surface);
break;
}
- } else {
- OS.gdk_drawable_get_size(data.drawable, width, height);
}
}