[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/headless vcl/inc vcl/unx
Caolán McNamara
caolanm at redhat.com
Wed Nov 23 11:33:12 UTC 2016
vcl/headless/svpgdi.cxx | 4 +++-
vcl/inc/headless/svpgdi.hxx | 4 ++--
vcl/unx/gtk3/gtk3gtkframe.cxx | 16 +++++++---------
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 6 ++----
4 files changed, 14 insertions(+), 16 deletions(-)
New commits:
commit e7a4b5e3e621b963644bd83578ee053ba1c8ff7c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 14 16:23:00 2016 +0000
gtk3: scrollbar damage area one pixel too narrow/short
under default Ambience theme Ubuntu 16.04
tools rectangle strikes again, rejig to be left/top +
width/height rather than left/top + right/bottom
Change-Id: Id5274f068863cd5219a89142b392c9ca53a1694d
Reviewed-on: https://gerrit.libreoffice.org/30851
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 74ce2b9..63c60ca 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1360,7 +1360,9 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons
if (pDamage)
{
- pDamage->damaged(pDamage->handle, nExtentsLeft, nExtentsTop, nExtentsRight, nExtentsBottom);
+ pDamage->damaged(pDamage->handle, nExtentsLeft, nExtentsTop,
+ nExtentsRight - nExtentsLeft,
+ nExtentsBottom - nExtentsTop);
}
}
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 7ac3809..85bb4b0 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -68,8 +68,8 @@ typedef struct _cairo_user_data_key cairo_user_data_key_t;
enum PaintMode { OVERPAINT, XOR, INVERT };
typedef void (*damageHandler)(void* handle,
- sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
- sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom);
+ sal_Int32 nExtentsX, sal_Int32 nExtentsY,
+ sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight);
struct VCL_DLLPUBLIC DamageHandler
{
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 812e4b8..ecd77ee 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -952,12 +952,11 @@ GtkWidget *GtkSalFrame::getMouseEventWidget() const
}
static void damaged(void *handle,
- sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
- sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom)
+ sal_Int32 nExtentsX, sal_Int32 nExtentsY,
+ sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight)
{
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(handle);
- pThis->damaged(nExtentsLeft, nExtentsTop,
- nExtentsRight, nExtentsBottom);
+ pThis->damaged(nExtentsX, nExtentsY, nExtentsWidth, nExtentsHeight);
}
void GtkSalFrame::InitCommon()
@@ -2859,8 +2858,8 @@ cairo_t* GtkSalFrame::getCairoContext() const
return cr;
}
-void GtkSalFrame::damaged(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
- sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom) const
+void GtkSalFrame::damaged(sal_Int32 nExtentsX, sal_Int32 nExtentsY,
+ sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight) const
{
if (dumpframes)
{
@@ -2872,9 +2871,8 @@ void GtkSalFrame::damaged(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
}
gtk_widget_queue_draw_area(GTK_WIDGET(m_pFixedContainer),
- nExtentsLeft, nExtentsTop,
- nExtentsRight - nExtentsLeft,
- nExtentsBottom - nExtentsTop);
+ nExtentsX, nExtentsY,
+ nExtentsWidth, nExtentsHeight);
}
// blit our backing cairo surface to the target cairo context
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index d3becb6..ca73c1e 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1426,8 +1426,6 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
clipRegion(cr);
cairo_translate(cr, rControlRegion.Left(), rControlRegion.Top());
- Rectangle aDamageRect(rControlRegion);
-
long nX = 0;
long nY = 0;
long nWidth = rControlRegion.GetWidth();
@@ -1567,8 +1565,8 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
cairo_destroy(cr); // unref
- if (!aDamageRect.IsEmpty())
- mpFrame->damaged(aDamageRect.Left(), aDamageRect.Top(), aDamageRect.Right(), aDamageRect.Bottom());
+ if (!rControlRegion.IsEmpty())
+ mpFrame->damaged(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
return true;
}
More information about the Libreoffice-commits
mailing list