summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java')
-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);
}
}