diff options
author | Sami Wagiaalla | 2015-01-05 11:40:39 +0000 |
---|---|---|
committer | Arun Thondapu | 2015-01-05 11:40:39 +0000 |
commit | ce387294b9891ad07dbad43930d632b27aa31b79 (patch) | |
tree | 91b12785c5568980ceeb8c1ada10cf40225db40e /bundles | |
parent | 039305c74ccdde6bc90333ebb59140ca2720c2fa (diff) | |
download | eclipse.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.java | 4 |
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; |