Bug 427605 - Cropped pointer cursors
Summary: Cropped pointer cursors
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 427872 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-12 18:41 UTC by Vlad Zahorodnii
Modified: 2020-10-18 16:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20.1
vlad.zahorodnii: Wayland+
vlad.zahorodnii: X11-


Attachments
The pointer cursor is cropped in half (3.79 MB, image/jpeg)
2020-10-12 18:41 UTC, Vlad Zahorodnii
Details
Cursor over a Firefox Picture-in-Picture window (3.24 MB, image/jpeg)
2020-10-12 18:54 UTC, Vlad Zahorodnii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2020-10-12 18:41:40 UTC
Created attachment 132305 [details]
The pointer cursor is cropped in half

SUMMARY
Sometimes the pointer cursor is cropped. This bug can be reproduced with both Qt and GTK clients. Not sure how to reliably reproduce it.
Comment 1 Vlad Zahorodnii 2020-10-12 18:42:53 UTC
The screenshot effect returns screenshots with a properly rendered cursor.
Comment 2 Vlad Zahorodnii 2020-10-12 18:54:14 UTC
Created attachment 132306 [details]
Cursor over a Firefox Picture-in-Picture window

It seems like I can reliably reproduce this bug by hovering any edge of a Firefox Picture-in-Picture window.
Comment 3 Vlad Zahorodnii 2020-10-12 18:57:28 UTC
Cursors are not cropped when kwin runs with KWIN_FORCE_SW_CURSOR=1.
Comment 4 Bug Janitor Service 2020-10-12 21:09:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/336
Comment 5 Vlad Zahorodnii 2020-10-16 17:04:12 UTC
Git commit 3b8e489b6f384239cbe30a2dccc064a4ecc2c9bd by Vlad Zahorodnii.
Committed on 16/10/2020 at 17:03.
Pushed by vladz into branch 'master'.

platforms/drm: Compute correct cursor transform matrix

Currently, when the DRM platform uses cursor planes, the cursor on
a rotated output may be cropped because the math behind the current
cursor transform matrix is off.

In order to fix the cropping issue, this change replaces the current
cursor transform matrix with the core part of the surface-to-buffer
matrix, which was written against the wl_output spec.
Related: bug 427060

M  +39   -11   plugins/platforms/drm/drm_output.cpp
M  +0    -1    plugins/platforms/drm/drm_output.h

https://invent.kde.org/plasma/kwin/commit/3b8e489b6f384239cbe30a2dccc064a4ecc2c9bd
Comment 6 Vlad Zahorodnii 2020-10-16 17:14:07 UTC
Git commit 1fd9ae618aaf8b9fcd5b644fa3039ec782d6355f by Vlad Zahorodnii.
Committed on 16/10/2020 at 17:06.
Pushed by vladz into branch 'Plasma/5.20'.

platforms/drm: Compute correct cursor transform matrix

Currently, when the DRM platform uses cursor planes, the cursor on
a rotated output may be cropped because the math behind the current
cursor transform matrix is off.

In order to fix the cropping issue, this change replaces the current
cursor transform matrix with the core part of the surface-to-buffer
matrix, which was written against the wl_output spec.
Related: bug 427060

M  +39   -11   plugins/platforms/drm/drm_output.cpp
M  +0    -1    plugins/platforms/drm/drm_output.h

https://invent.kde.org/plasma/kwin/commit/1fd9ae618aaf8b9fcd5b644fa3039ec782d6355f
Comment 7 Claudius Ellsel 2020-10-18 15:39:46 UTC
Is this (https://bugs.kde.org/show_bug.cgi?id=427872) related?
Comment 8 Vlad Zahorodnii 2020-10-18 16:05:24 UTC
(In reply to Claudius Ellsel from comment #7)
> Is this (https://bugs.kde.org/show_bug.cgi?id=427872) related?

If the left monitor is rotated, then yes, it is.
Comment 9 Claudius Ellsel 2020-10-18 16:34:15 UTC
Yes, the left monitor is rotated for me. Marking as duplicate, then? Change back if it is not.
Comment 10 Claudius Ellsel 2020-10-18 16:34:52 UTC
*** Bug 427872 has been marked as a duplicate of this bug. ***