diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-10-27 01:17:23 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-10-27 01:17:23 -0400 |
commit | a5d74e982d75f01573494e0517f943b706533c50 (patch) | |
tree | 0f3e44a84f81dcbdbbfd633d64b60a70e016b321 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java | |
parent | 354a76dfccd46a9eef5509ef57af4343bc6283f4 (diff) | |
download | eclipse.platform.swt-a5d74e982d75f01573494e0517f943b706533c50.tar.gz eclipse.platform.swt-a5d74e982d75f01573494e0517f943b706533c50.tar.xz eclipse.platform.swt-a5d74e982d75f01573494e0517f943b706533c50.zip |
call gdk_window_get_visible_region for GTK3
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.java | 7 |
1 files changed, 6 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 67b9cfd5ea..bad90829eb 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 @@ -580,7 +580,12 @@ 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; + if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { + visibleRegion = OS.gdk_window_get_visible_region (drawable); + } else { + visibleRegion = OS.gdk_drawable_get_visible_region (drawable); + } GdkRectangle srcRect = new GdkRectangle (); srcRect.x = srcX; srcRect.y = srcY; |