summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-10-17 14:27:54 -0400
committerAlexander Kurtakov <akurtako@redhat.com>2012-10-17 22:08:26 +0300
commit7669785e29b0e39c9bebf42af45663b5c2824a63 (patch)
tree958502fb314efa5b3f91a0d6ed838a4d358c1a92 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
parent35f130070627930dae79842022c951694c5a3dfa (diff)
downloadeclipse.platform.swt-7669785e29b0e39c9bebf42af45663b5c2824a63.tar.gz
eclipse.platform.swt-7669785e29b0e39c9bebf42af45663b5c2824a63.tar.xz
eclipse.platform.swt-7669785e29b0e39c9bebf42af45663b5c2824a63.zip
Use gdk_window* instead of gdk_drawable_get_visible_region()
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.java4
1 files changed, 3 insertions, 1 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 3fcaeeddcc..5de2642596 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
@@ -598,8 +598,9 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
Cairo.cairo_paint(handle);
Cairo.cairo_restore(handle);
if (paint) {
- long /*int*/ visibleRegion = OS.gdk_drawable_get_visible_region (drawable);
+ long /*int*/ visibleRegion = 0;
if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ visibleRegion = OS.gdk_window_get_visible_region (drawable);
cairo_rectangle_int_t srcRect = new cairo_rectangle_int_t ();
srcRect.x = srcX;
srcRect.y = srcY;
@@ -615,6 +616,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
Cairo.cairo_region_destroy (copyRegion);
Cairo.cairo_region_destroy (invalidateRegion);
} else {
+ visibleRegion = OS.gdk_drawable_get_visible_region (drawable);
GdkRectangle srcRect = new GdkRectangle ();
srcRect.x = srcX;
srcRect.y = srcY;