Download it now!
Bug 122442 - Cannot use double-click to apply text highlight
Summary: Cannot use double-click to apply text highlight
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0 target:6.1.5 target:6.2.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Highlight-Color Main-Loop
  Show dependency treegraph
 
Reported: 2019-01-03 11:05 UTC by Mike Kaganski
Modified: 2019-01-07 10:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-01-03 11:05:11 UTC
In versions up to 4.4 inclusive, the following sequence:

1. Click on "Highlight Color" (previously "Highlighting") toolbar button (initially yellow)
2. Double-click a word in text document

resulted in the double-clicked word becoming highlighted (having yellow background), not selected; and the Highlighting function still active, ready for next application.

Since https://git.libreoffice.org/core/+log/e6e8a060ecc6e4fd51cfe88e00d841d546ed5915%5E..9b4abcd1c45a646a1ac9120fe1c489ba6bb44e95 (bibisected using bibisect-win32-5.0), this sequence results in simple selection of the word, cancelling the Highlighting function.

Tested with Version: 6.3.0.0.alpha0+ (x64)
Build ID: 6f967e3403c6675bbaf2c17dcadf7e640dd719ca
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL

As reported at https://ask.libreoffice.org/en/question/164490, it is reproducible on Linux, too.
Comment 1 Mike Kaganski 2019-01-03 11:35:57 UTC
Can't that be that previously, single-click event only generated after timer timeout (if not cancelled by a double-click event coming first), and the commit changed it to happen when idle, which might happen before second click? I'd suppose that using timer for single-click would be correct?
Comment 2 Dieter Praas 2019-01-03 12:39:46 UTC
I confirm the observation with

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE

(it works)

and

Version: 6.3.0.0.alpha0+ (x64)
Build ID: ffa5b8a82eab18041bbee4d6914892b82c7801d3
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-19_03:24:54
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

(doesn't work)
Comment 3 Mike Kaganski 2019-01-03 13:21:51 UTC
A code pointer: see m_aTemplateIdle initialization at SwEditWin::SwEditWin (sw/source/uibase/docvw/edtwin.cxx). The comment there states:

> // TemplatePointer for colors should be resetted without
> // selection after single click

and the event there is indeed an Idle, not a timer set to a double-click timeout. Possibly it's enough to change it to such, but is there a more reliable way to do it - do we generate "single click" event somewhere when double-click timeout elapsed without a click?
Comment 4 Mike Kaganski 2019-01-03 13:29:12 UTC
Indeed, the change is in the bibisected range, and is https://git.libreoffice.org/core/+/821ae0fb9fa63e0171f987d5ec210ec121978b8f.
Comment 5 Mike Kaganski 2019-01-03 13:30:30 UTC
s/in/related to/
Comment 6 Mike Kaganski 2019-01-03 13:51:23 UTC
https://gerrit.libreoffice.org/65837
Comment 7 Commit Notification 2019-01-03 20:21:52 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/6207c51880c9165eedb1d1af7fdc5e179bc8844d%5E%21

tdf#122442: use Timer to detect single-clicks vs double-clicks

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-01-07 09:49:34 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/3d6ca7b271de18ba27a4d71ca7feef452e38c47c%5E%21

tdf#122442: use Timer to detect single-clicks vs double-clicks

It will be available in 6.1.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2019-01-07 10:14:01 UTC
Issue verified in

Version: 6.3.0.0.alpha0+
Build ID: 892a5cfe557edb405ec0037676f02a1c24dd76ec
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Mike Kaganski, Thanks for fixing this!!
Comment 10 Commit Notification 2019-01-07 10:15:30 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/8b8d1af48d40494e0b0c5d2c8d2b12fb9e62b23a%5E%21

tdf#122442: use Timer to detect single-clicks vs double-clicks

It will be available in 6.2.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.