Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Wagiaalla2015-01-05 11:40:39 +0000
committerArun Thondapu2015-01-05 11:40:39 +0000
commitce387294b9891ad07dbad43930d632b27aa31b79 (patch)
tree91b12785c5568980ceeb8c1ada10cf40225db40e /bundles
parent039305c74ccdde6bc90333ebb59140ca2720c2fa (diff)
downloadeclipse.platform.swt-ce387294b9891ad07dbad43930d632b27aa31b79.tar.gz
eclipse.platform.swt-ce387294b9891ad07dbad43930d632b27aa31b79.tar.xz
eclipse.platform.swt-ce387294b9891ad07dbad43930d632b27aa31b79.zip
Bug 441705 - Check cairo version to enable USE_CAIRO
org.eclipse.swt.widgets.Caret uses CAIRO_OPERATOR_DIFFERENCE when OS.USE_CAIRO is true but that operator is not introduced until cairo 1.9.4. OS.USE_CAIRO is set based on the GTK version which leads the boolean to be enabled on systems where GTK >= 2.24 and if cairo is < 1.9.4 eclipse crashes. This patch checks the cairo version when enabling cairo. Change-Id: I011a7f492aea01e1095ee440927a433949a10f30 Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com> Signed-off-by: Arun Thondapu <arunkumar.thondapu@in.ibm.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index b0f17f133d..a9e56b6eb9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -16,6 +16,7 @@ package org.eclipse.swt.internal.gtk;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
public class OS extends C {
static {
@@ -586,7 +587,8 @@ public class OS extends C {
static {
boolean useCairo = false;
if (!"false".equals(System.getProperty("org.eclipse.swt.internal.gtk.cairoGraphics"))) {
- useCairo = GTK_VERSION >= VERSION(2, 24, 0);
+ useCairo = GTK_VERSION >= VERSION(2, 24, 0) &&
+ Cairo.cairo_version() >= Cairo.CAIRO_VERSION_ENCODE(1, 9, 4);
}
USE_CAIRO = useCairo;
boolean initCairo = false;

Back to the top