Resolves: tdf#91778 drawing the background over an active cursor

f41
Caolán McNamara 9 years ago
parent 2b2a073a7e
commit 7e8032eaf4

@ -0,0 +1,52 @@
From a7c499a8dcff909693793588c9976a2c039604de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 20 Apr 2016 11:55:01 +0100
Subject: [PATCH] Resolves: tdf#91778 drawing the background over an active
cursor
will overwrite it, which means that when it toggles "off" afterwards, it uses
invert on the freshly drawn background which will visually make it appear "on"
and not off
Just explictly turn it off and restore it and avoid the whole potential
problem.
Change-Id: Ie21d77e9d704124011e43b42c98b26eaf208eef2
(cherry picked from commit 29a9f433c268414747d8ec7343fc2b5987971738)
---
sc/source/ui/view/gridwin4.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index e15cb1e..731c560 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -900,6 +900,14 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
aEnd.X() -= 2 * nLayoutSign;
aEnd.Y() -= 2;
+ // toggle the cursor off if its on to ensure the cursor invert
+ // background logic remains valid after the background is cleared on
+ // the next cursor flash
+ vcl::Cursor* pCrsr = pEditView->GetCursor();
+ const bool bVisCursor = pCrsr && pCrsr->IsVisible();
+ if (bVisCursor)
+ pCrsr->Hide();
+
// set the correct mapmode
Rectangle aBackground(aStart, aEnd);
if (bIsTiledRendering)
@@ -916,6 +924,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
// paint the editeng text
pEditView->Paint(rDevice.PixelToLogic(Rectangle(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH()))), &rDevice);
rDevice.SetMapMode(MAP_PIXEL);
+
+ // restore the cursor it it was originally visible
+ if (bVisCursor)
+ pCrsr->Show();
}
if (pViewData->HasEditView(eWhich))
--
2.7.3

@ -0,0 +1,69 @@
From 1f40773ad663614deec8133eedb80c90834e9b35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 17 Mar 2016 20:48:23 +0000
Subject: [PATCH] Resolves: tdf#98726 sneaky transparent clearlooks-phenix
scrollbars
(cherry picked from commit e511f962c0b70e0ce0d19c42be1f198b6191fad1)
Change-Id: Idc05d7b6c2b42086eafa9ad8ab8e63116d6f676c
Reviewed-on: https://gerrit.libreoffice.org/23346
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
---
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index ff76169..c1117fe 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -277,6 +277,17 @@ Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aA
return buttonRect;
}
+static GtkWidget* gCacheWindow;
+static GtkWidget* gDumbContainer;
+static GtkWidget* gSpinBox;
+static GtkWidget* gEntryBox;
+static GtkWidget* gComboBox;
+static GtkWidget* gListBox;
+static GtkWidget* gMenuBarWidget;
+static GtkWidget* gMenuItemMenuBarWidget;
+static GtkWidget* gCheckMenuItemWidget;
+static GtkWidget* gTreeViewWidget;
+
void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
cairo_t *cr,
const Rectangle& rControlRectangle,
@@ -419,6 +430,9 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 );
+ gtk_render_background(gtk_widget_get_style_context(gCacheWindow), cr, 0, 0,
+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
+
// ----------------- TROUGH
GtkStyleContext* pScrollbarTroughStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ?
mpVScrollbarTroughStyle : mpHScrollbarTroughStyle;
@@ -1142,17 +1156,6 @@ void GtkSalGraphics::PaintRadio(cairo_t *cr, GtkStyleContext *context,
PaintCheckOrRadio(cr, context, rControlRectangle, false, bInMenu);
}
-static GtkWidget* gCacheWindow;
-static GtkWidget* gDumbContainer;
-static GtkWidget* gSpinBox;
-static GtkWidget* gEntryBox;
-static GtkWidget* gComboBox;
-static GtkWidget* gListBox;
-static GtkWidget* gMenuBarWidget;
-static GtkWidget* gMenuItemMenuBarWidget;
-static GtkWidget* gCheckMenuItemWidget;
-static GtkWidget* gTreeViewWidget;
-
void parent_styles_context_set_state(GtkStyleContext* context, GtkStateFlags flags)
{
while ((context = gtk_style_context_get_parent(context)))
--
2.7.3

@ -58,7 +58,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.1
Release: 6%{?libo_prerelease}%{?dist}
Release: 7%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0
URL: http://www.libreoffice.org/
@ -264,6 +264,8 @@ Patch29: 0001-delete-hidden-pages-before-deleting-unused-masters.patch
Patch30: 0001-tdf-39271-allow-to-export-only-notes-pages.patch
Patch31: 0001-gtk3-the-list-combo-box-hack-to-get-internal-buttons.patch
Patch32: 0001-unused-header-file-which-is-no-longer-in-hunspell-4-.patch
Patch33: 0001-Resolves-tdf-98726-sneaky-transparent-clearlooks-phe.patch
Patch34: 0001-Resolves-tdf-91778-drawing-the-background-over-an-ac.patch
%if ! 0%{?rhel}
Patch400: 0001-Update-liborcus-to-0.11.0.patch
@ -2288,6 +2290,9 @@ done
%endif
%changelog
* Wed Apr 20 2016 Caolán McNamara <caolanm@redhat.com> - 1:5.1.2.1-7.UNBUILT
- Resolves: tdf#91778 drawing the background over an active cursor
* Mon Apr 18 2016 Caolán McNamara <caolanm@redhat.com> - 1:5.1.2.1-6
- rebuild for hunspell 1.4.0

Loading…
Cancel
Save