After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702761 - Hide the caret cursor if a text selection is ongoing.
Hide the caret cursor if a text selection is ongoing.
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-20 17:23 UTC by Antía Puentes
Modified: 2013-07-03 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't draw the caret cursor if a selection is ongoing (854 bytes, patch)
2013-06-26 14:41 UTC, Antía Puentes
needs-work Details | Review

Description Antía Puentes 2013-06-20 17:23:11 UTC
The caret cursor should not be visible when we are selecting text.
Comment 1 Antía Puentes 2013-06-26 14:41:44 UTC
Created attachment 247833 [details] [review]
Don't draw the caret cursor if a selection is ongoing
Comment 2 Carlos Garcia Campos 2013-06-26 17:04:08 UTC
Review of attachment 247833 [details] [review]:

This is not enough, there are still some details that we should take into account. When selecting text, only the area affected by the new selection is redrawn, and in most of the cases the selections start at the middle of the caret cursor. If the cursor stopped blinking half of the cursor is still drawn. This is easier to see at a high zoom level. So, we need to include caret cursor area into the damaged region we redraw when selecting text. You can check if caret navigation is enabled in merge_selection_region and if the cursor is visible get the area an include it in the damage region. Another problem is that the cursor is not shown again when there are no selections anymore. If you start a selection with the keyboard, and after selecting a character go back to the position where the selection started, the cursor should be shown again. For this, you need to check not only that selection list is not empty, but also that the covered region is empty.

::: libview/ev-view.c
@@ +3795,3 @@
 
+	/* Don't draw the caret cursor if a selection is ongoing */
+	if (EV_IS_SELECTION (view->document) && view->selection_info.in_selection)

We should check is the selection list (selection_info.selections) is empty or not, in_selection is not updated when selecting with double or triple click. Actually in_selection is mostly unused and rendundant so I've just removed it in master.
Comment 3 Carlos Garcia Campos 2013-07-03 17:01:56 UTC
I've fixed this in git master.