Bug 133950 - UI EDITING Drawing a shape, the cursor is not precise (GTK3)
Summary: UI EDITING Drawing a shape, the cursor is not precise (GTK3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2020-06-13 08:03 UTC by sahdsg
Modified: 2020-10-28 15:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the postion shift (1.43 KB, image/png)
2020-06-13 08:03 UTC, sahdsg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sahdsg 2020-06-13 08:03:59 UTC
Created attachment 161942 [details]
Screenshot of the postion shift

In Draw, when drawing a shape, such as line, the mouse cursor will become a cross. However, the shape will have a position shift from the center of the cross.

Steps to reproduce:

1. Create a Drawing
2. Display Grid
3. Disable "Snap to Grid"
4. Select "Insert Line"
5. Draw a line with the center of the cross on the grid
6. The line has a position shift

This also happens in writer, presentation and calc.

Version: 6.4.4.2
Build ID: 6.4.4-1
CPU threads: 8; OS: Linux 5.6; UI render: default; VCL: gtk3; 
Locale: ; UI-Language: en-US
Calc: threaded
Comment 1 sahdsg 2020-06-14 05:16:33 UTC
This should be a problem from
https://opengrok.libreoffice.org/xref/core/vcl/unx/gtk3/gtk3gtkdata.cxx?r=aef7feb3#134

The cursor size changes but the "hot position" does not change.

A temporary solution:
1. I go to system config and set default_cursor_size to 32 (it is 16 before)
2. Reboot Libreoffice
3. The cursor become precise
4. go to system config and set default_cursor_size to 16
5. The cursor is still precise

Maybe it should not scale the cursor image.

There is a new problem. For almost all shapes, the cursor becomes "DrawText". Many cursor icons are not used.
Comment 2 Buovjaga 2020-10-26 17:24:32 UTC
Bibisected with Linux 6.3 repo to

https://git.libreoffice.org/core/commit/25d176ada67ada550bd4d0d08177c232cf7eeb37
tdf#123796 Wrong cursor when inserting shape

Adding Cc: to Noel Grandin

This is not seen with kf5 or gen backends.
Comment 3 Caolán McNamara 2020-10-27 15:08:28 UTC
under my Fedora wayland F32 gdk_display_get_default_cursor_size is already 32 so it works ok for me out of the box, under x11 its 24 and the problem arises
Comment 4 Commit Notification 2020-10-27 19:33:45 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/71f6e3862afc460536085582d3f9e9401096c24a

tdf#133950 scale hotspot to sync with scaled cursors

It will be available in 7.1.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 5 Caolán McNamara 2020-10-27 19:38:30 UTC
well, that seems to fix it, alternatively not scaling the cursors is an option I suppose
Comment 6 Caolán McNamara 2020-10-27 19:39:14 UTC
fixed in master, backport to 7-0 in gerrit
Comment 7 Commit Notification 2020-10-28 06:28:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/99e924f3faab58076221c7be326c697cb2dcf047

tdf#133950 scale hotspot to sync with scaled cursors

It will be available in 7.0.4.

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 Buovjaga 2020-10-28 15:33:09 UTC
Looks like it's working, thanks

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: 38dd55f6022a6ec217a2a54459a2875f1bef1f5e
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 28 October 2020