summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/CairoCommon.cxx14
-rw-r--r--vcl/source/window/cursor.cxx8
2 files changed, 10 insertions, 12 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 2e2dcaecec6f..73a6b72f802e 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -960,16 +960,8 @@ cairo_pattern_t* create_stipple()
}
} // end anonymous ns
-namespace
-{
-// check for env var that deciding to disable CAIRO_OPERATOR_DIFFERENCE
-const char* pDisableDifference(getenv("SAL_DISABLE_CAIRO_DIFFERENCE"));
-bool bDisableDifference(nullptr != pDisableDifference);
-}
-
#if defined CAIRO_VERSION && CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
#define CAIRO_OPERATOR_DIFFERENCE (static_cast<cairo_operator_t>(23))
-#define CAIRO_OPERATOR_EXCLUSION (static_cast<cairo_operator_t>(24))
#endif
void CairoCommon::invert(const basegfx::B2DPolygon& rPoly, SalInvert nFlags, bool bAntiAlias)
@@ -984,13 +976,13 @@ void CairoCommon::invert(const basegfx::B2DPolygon& rPoly, SalInvert nFlags, boo
cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
- if (bDisableDifference)
+ if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 10, 0))
{
- cairo_set_operator(cr, CAIRO_OPERATOR_EXCLUSION);
+ cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
}
else
{
- cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
+ SAL_WARN("vcl.gdi", "SvpSalGraphics::invert, archaic cairo");
}
if (nFlags & SalInvert::TrackFrame)
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 6a186da9432c..406491ed1d65 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -43,6 +43,12 @@ struct ImplCursorData
VclPtr<vcl::Window> mpWindow; // assigned window
};
+namespace
+{
+const char* pDisableCursorIndicator(getenv("SAL_DISABLE_CURSOR_INDICATOR"));
+bool bDisableCursorIndicator(nullptr != pDisableCursorIndicator);
+}
+
static tools::Rectangle ImplCursorInvert(vcl::RenderContext* pRenderContext, ImplCursorData const * pData)
{
tools::Rectangle aPaintRect;
@@ -65,7 +71,7 @@ static tools::Rectangle ImplCursorInvert(vcl::RenderContext* pRenderContext, Imp
aPoly[2].AdjustX(1 );
// apply direction flag after slant to use the correct shape
- if ( pData->mnDirection != CursorDirection::NONE)
+ if (!bDisableCursorIndicator && pData->mnDirection != CursorDirection::NONE)
{
Point pAry[7];
// Related system settings for "delta" could be: