From 76c4123821f7cf8b45d89f63214966342f0bb0f0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Jan 24 2018 17:34:34 +0000 Subject: gtk3: single click on selection doesn't unselect due to tiny swipe gesture --- diff --git a/0001-gtk3-single-click-with-selection-set-doesn-t-unselec.patch b/0001-gtk3-single-click-with-selection-set-doesn-t-unselec.patch new file mode 100644 index 0000000..a56fb0d --- /dev/null +++ b/0001-gtk3-single-click-with-selection-set-doesn-t-unselec.patch @@ -0,0 +1,33 @@ +From da9f568ea76766be3757068540be2b7c8d4405f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 24 Jan 2018 17:18:35 +0000 +Subject: [PATCH] gtk3: single click with selection set doesn't unselect + +this is a safe backportable fix, the unconditional + +nFlags |= SelectionEngineFlags::CMDEVT + +looks the real dubious thing to me, but only the gtk3 backend has swipe support +so just returning immediately on a swipe definitely ok + +Change-Id: Iade26d0d9260ce76dfb2766ac9e5ca9fa9275bf4 +--- + vcl/source/window/seleng.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx +index c911a9059551..c545824436cd 100644 +--- a/vcl/source/window/seleng.cxx ++++ b/vcl/source/window/seleng.cxx +@@ -342,7 +342,7 @@ void SelectionEngine::Reset() + void SelectionEngine::Command( const CommandEvent& rCEvt ) + { + // Timer aWTimer is active during enlarging a selection +- if ( !pFunctionSet || !pWin || aWTimer.IsActive() ) ++ if ( !pFunctionSet || !pWin || aWTimer.IsActive() || rCEvt.GetCommand() == CommandEventId::Swipe ) + return; + aWTimer.Stop(); + nFlags |= SelectionEngineFlags::CMDEVT; +-- +2.14.3 + diff --git a/libreoffice.spec b/libreoffice.spec index b271e06..fa6ce05 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -254,6 +254,7 @@ Patch9: 0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch Patch10: 0001-always-install-fc_local.conf-on-linux.patch Patch11: 0001-editviewoverlay-Allow-EditView-to-run-in-Overlay.patch Patch12: 0001-tdf-100922-Refactor-Custom-Properties-page.patch +Patch13: 0001-gtk3-single-click-with-selection-set-doesn-t-unselec.patch %if 0%{?rhel} # not upstreamed