Bug 487820 - Track Mouse effect doesn't follow mouse when all modifier keys are disabled
Summary: Track Mouse effect doesn't follow mouse when all modifier keys are disabled
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: git-stable-Plasma/6.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 491370 491555 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-31 02:55 UTC by Tom Dzmelyk
Modified: 2024-08-12 11:45 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.5
Sentry Crash Report:


Attachments
Spectacle recording of a stationary effect and the moving mouse. (203.87 KB, video/webm)
2024-05-31 02:55 UTC, Tom Dzmelyk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Dzmelyk 2024-05-31 02:55:11 UTC
Created attachment 170009 [details]
Spectacle recording of a stationary effect and the moving mouse.

SUMMARY
With the Plasma 6.1 beta the 'Track Mouse' effect doesn't follow the mouse and instead lingers at the spot where it was activated.

STEPS TO REPRODUCE
1. Toggle Track Mouse
2. Move mouse

OBSERVED RESULT
Effect stays stationary

EXPECTED RESULT
Effect follows mouse


SOFTWARE/OS VERSIONS
Arch Linux
Plasma 6.1 beta
kwin 6.0.90.1-1 from arch kde-unstable
mesa-git-c1d3fa007ca (May 29th)

ADDITIONAL INFORMATION
I compiled kwin from the Plasma/6.1 branch  (commit b13ae603) to check if it had been fixed since the initial release of the 6.1 beta but the bug is still present there.

I also tried seeing if it was maybe a problem with the software cursor, but the bug occurs both with and without KWIN_DRM_DONT_FORCE_AMD_SW_CURSOR=1 set.
Comment 1 Zamundaaa 2024-05-31 12:20:10 UTC
Is that on X11 or Wayland?
Comment 2 Tom Dzmelyk 2024-05-31 14:34:21 UTC
Wayland.  Kernel 6.9.2-zen
Comment 3 Bug Janitor Service 2024-06-15 03:47:01 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2024-06-30 03:47:22 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 5 Tom Dzmelyk 2024-07-03 03:04:13 UTC
Took a long time to figure out the exact conditions this happens under because it's so non-obvious.

Under the settings for Track Mouse under Desktop Effects if you uncheck all the "Modifier keys" and press apply the effect will stop following the mouse. Re-enabling any one of the modifier keys will cause the effect to follow the mouse correctly again.

I reproduced this with a new user created today with Plasma 6.1.1

Demo Video: https://www.youtube.com/watch?v=hyz0EEjfr9I
Comment 6 Vlad Zahorodnii 2024-07-16 11:58:11 UTC
I can't reproduce the issue on X11 and Wayland.
Comment 7 Vlad Zahorodnii 2024-07-16 12:00:21 UTC
Nvm I didn't see the last comment
Comment 8 sakurawald 2024-08-07 06:51:12 UTC
(In reply to Tom Dzmelyk from comment #5)
> Took a long time to figure out the exact conditions this happens under
> because it's so non-obvious.
> 
> Under the settings for Track Mouse under Desktop Effects if you uncheck all
> the "Modifier keys" and press apply the effect will stop following the
> mouse. Re-enabling any one of the modifier keys will cause the effect to
> follow the mouse correctly again.
> 
> I reproduced this with a new user created today with Plasma 6.1.1
> 
> Demo Video: https://www.youtube.com/watch?v=hyz0EEjfr9I

It fix the bug, the bug is likely cause by the change of structure of the configuration. Thanks !
Comment 9 fanzhuyifan 2024-08-07 06:53:01 UTC
*** Bug 491370 has been marked as a duplicate of this bug. ***
Comment 10 fanzhuyifan 2024-08-07 06:53:30 UTC
(In reply to fanzhuyifan from comment #9)
> *** Bug 491370 has been marked as a duplicate of this bug. ***

Bug 491370 reports this on x11
Comment 11 Bug Janitor Service 2024-08-07 17:35:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6214
Comment 12 fanzhuyifan 2024-08-11 16:03:41 UTC
*** Bug 491555 has been marked as a duplicate of this bug. ***
Comment 13 fanzhuyifan 2024-08-12 08:34:43 UTC
Git commit 8d5f46a7194fe99a84d31f7ab007382595a7e6c8 by Yifan Zhu.
Committed on 12/08/2024 at 06:54.
Pushed by fanzhuyifan into branch 'master'.

plugins/trackmouse: listen to mouse events when active

Previously TrackMouseEffect only listens to mouse events if there are
modifiers configured. So when it was activated by shortcut, the effect
doesn't follow mouse movements.

Instead, listen to mouse events when the effect has been activated, or
if any modifier is configured.

M  +16   -4    src/plugins/trackmouse/trackmouse.cpp
M  +3    -0    src/plugins/trackmouse/trackmouse.h

https://invent.kde.org/plasma/kwin/-/commit/8d5f46a7194fe99a84d31f7ab007382595a7e6c8
Comment 14 fanzhuyifan 2024-08-12 08:53:05 UTC
Git commit 979e506e6ec2739fa760c459af2412fd36514e42 by Yifan Zhu.
Committed on 12/08/2024 at 08:34.
Pushed by fanzhuyifan into branch 'Plasma/6.1'.

plugins/trackmouse: listen to mouse events when active

Previously TrackMouseEffect only listens to mouse events if there are
modifiers configured. So when it was activated by shortcut, the effect
doesn't follow mouse movements.

Instead, listen to mouse events when the effect has been activated, or
if any modifier is configured.


(cherry picked from commit 8d5f46a7194fe99a84d31f7ab007382595a7e6c8)

Co-authored-by: Yifan Zhu <fanzhuyifan@gmail.com>

M  +16   -4    src/plugins/trackmouse/trackmouse.cpp
M  +3    -0    src/plugins/trackmouse/trackmouse.h

https://invent.kde.org/plasma/kwin/-/commit/979e506e6ec2739fa760c459af2412fd36514e42