Bug 448840 - Mouse cursor records in incomplete size when screencasting in Wayland-session.
Summary: Mouse cursor records in incomplete size when screencasting in Wayland-session.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Unclassified
Component: wayland-generic (show other bugs)
Version: 5.23.5
Platform: openSUSE RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-01-20 17:49 UTC by Behzad A
Modified: 2022-01-24 20:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Behzad A 2022-01-20 17:49:04 UTC
You can see the issue in this video
https://youtu.be/h3uKNFXynBI

System Info

System:    Host: localhost.localdomain Kernel: 5.16.0-1-default x86_64 bits: 64 compiler: gcc v: 11.2.1
           Desktop: KDE Plasma 5.23.5 tk: Qt 5.15.2 wm: kwin_wayland dm: SDDM Distro: openSUSE Tumbleweed 20220111
CPU:       Info: Dual Core model: Intel Core2 Duo T6670 bits: 64 type: MCP arch: Penryn rev: A cache: L2: 2 MiB
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 8771
           Speed: 1280 MHz min/max: 1200/2201 MHz boost: enabled Core speeds (MHz): 1: 1280 2: 1930
Graphics:  Device-1: Intel Mobile 4 Series Integrated Graphics vendor: Sony driver: i915 v: kernel bus-ID: 00:02.0
           chip-ID: 8086:2a42
           Device-2: Ricoh Sony Vaio Integrated Webcam type: USB driver: uvcvideo bus-ID: 1-2:2 chip-ID: 05ca:18b3
           Display: wayland server: X.org 1.21.1.3 compositor: kwin_wayland driver: loaded: modesetting unloaded: fbdev,vesa
           alternate: intel resolution: <missing: xdpyinfo>
           OpenGL: renderer: Mesa Mobile Intel GM45 Express (CTG) v: 2.1 Mesa 22.0.0-devel-git-8d2be391 direct render: Yes
Comment 1 Nate Graham 2022-01-20 23:29:23 UTC
Cannot reproduce the issue at all since for me, when dragging a window, OBS incorrectly records the cursor with its normal shape, not the "move" shape that it is actually displaying.

Regardless, this is either a KWin issue or an OBS issue; moving to KWin to start with.
Comment 2 Bug Janitor Service 2022-01-24 14:43:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1937
Comment 3 Vlad Zahorodnii 2022-01-24 19:56:48 UTC
Git commit d2867fc4a0ff3ce566e9b5b3093d29836c16f7d6 by Vlad Zahorodnii.
Committed on 24/01/2022 at 19:39.
Pushed by vladz into branch 'master'.

plugins/screencast: Hard-code the maximum cursor size to (256, 256)

XCURSOR_SIZE * scale factor is not the way to compute the current cursor
size. For example, with breeze cursor theme at an output with a scale of
2 and cursor size 24, cursor images will have the effective size of (64, 64).

Also, the cursor can change when passing over user interface elements.

In order to accommodate for all of that, this change makes kwin reserve
enough of space for a cursor of size 256x256. "256" is a magical number
that comes from DRM. With many drivers, the maximum cursor size is 256.

M  +3    -5    src/plugins/screencast/screencaststream.cpp
M  +1    -0    src/plugins/screencast/screencaststream.h

https://invent.kde.org/plasma/kwin/commit/d2867fc4a0ff3ce566e9b5b3093d29836c16f7d6
Comment 4 Vlad Zahorodnii 2022-01-24 20:04:17 UTC
Git commit 2262685f41eccd90b15aff5af78341542827f0e1 by Vlad Zahorodnii.
Committed on 24/01/2022 at 20:04.
Pushed by vladz into branch 'Plasma/5.24'.

plugins/screencast: Hard-code the maximum cursor size to (256, 256)

XCURSOR_SIZE * scale factor is not the way to compute the current cursor
size. For example, with breeze cursor theme at an output with a scale of
2 and cursor size 24, cursor images will have the effective size of (64, 64).

Also, the cursor can change when passing over user interface elements.

In order to accommodate for all of that, this change makes kwin reserve
enough of space for a cursor of size 256x256. "256" is a magical number
that comes from DRM. With many drivers, the maximum cursor size is 256.


(cherry picked from commit d2867fc4a0ff3ce566e9b5b3093d29836c16f7d6)

M  +3    -5    src/plugins/screencast/screencaststream.cpp
M  +1    -0    src/plugins/screencast/screencaststream.h

https://invent.kde.org/plasma/kwin/commit/2262685f41eccd90b15aff5af78341542827f0e1