Bug 489265 - "Shake Cursor" duplicates cursor when zoomed in
Summary: "Shake Cursor" duplicates cursor when zoomed in
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: 6.1.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 490923 518524 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-26 22:21 UTC by angelo
Modified: 2026-05-22 14:36 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description angelo 2024-06-26 22:21:12 UTC
SUMMARY

STEPS TO REPRODUCE
1. zoom in (is easier to see when really zoomed in or when the cursor becomes a caret)
2. shake cursor

OBSERVED RESULT
The cursor PNG created on top of the original one is very noticeable 

EXPECTED RESULT
The cursor effect shouldn't be noticeable when zoomed in

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Comment 1 duha.bugs 2024-07-28 18:38:48 UTC
*** Bug 490923 has been marked as a duplicate of this bug. ***
Comment 2 Duncan 2024-11-10 03:40:12 UTC
Bug #490923 (duplicate) has an I believe reasonable suggestion that I'll repeat and add to here: Disable shake-cursor when zoomed in.  My add:  Do this only when the zoom effect's scale-cursor option is enabled as well; without it shake-cursor's perhaps even more useful as the cursor's even smaller compared to everything else -- I know as I had zoom's cursor-scaling option disabled due to a bug for awhile, but that's fixed now.

The argument is that when zoomed in (with the cursor zoomed too) shake-cursor to locate isn't really useful/necessary any longer.

My own use-case:  I've 4 4k 50-inch TVs as monitors in a 2x2 grid to effectively give me a poor-man's 100-inch 8k (tho ATM, it's only 3 in an L, gotta upgrade to do the full 4), making it rather easy to lose the pointer/cursor in all that space.  One might think zoom wouldn't be necessary with that but I still find it useful.  But by definition, zooming in constrains the visible resolution and if configured so, the cursor already scales/zooms as well, so indeed, shake-cursor to locate it /isn't/ as necessary.  Therefore, at least for my use-case, disabling shake-cursor when zoomed (with the cursor already zoomed too) is indeed reasonable.

If there are use-cases where people still need shake-cursor when zoomed in with the cursor zoomed/scaled too, please post 'em (well, the first few anyway, don't go overboard if there's a hundred... =:^).  I can't think of any so if this will break the way others use the effects I'll learn. =:^)
Comment 3 hernan1342 2026-02-17 00:06:02 UTC
(In reply to Duncan from comment #2)
> Bug #490923 (duplicate) has an I believe reasonable suggestion that I'll
> repeat and add to here: Disable shake-cursor when zoomed in.  My add:  Do
> this only when the zoom effect's scale-cursor option is enabled as well;
> without it shake-cursor's perhaps even more useful as the cursor's even
> smaller compared to everything else -- I know as I had zoom's cursor-scaling
> option disabled due to a bug for awhile, but that's fixed now.
> 
> The argument is that when zoomed in (with the cursor zoomed too)
> shake-cursor to locate isn't really useful/necessary any longer.
> 
> My own use-case:  I've 4 4k 50-inch TVs as monitors in a 2x2 grid to
> effectively give me a poor-man's 100-inch 8k (tho ATM, it's only 3 in an L,
> gotta upgrade to do the full 4), making it rather easy to lose the
> pointer/cursor in all that space.  One might think zoom wouldn't be
> necessary with that but I still find it useful.  But by definition, zooming
> in constrains the visible resolution and if configured so, the cursor
> already scales/zooms as well, so indeed, shake-cursor to locate it /isn't/
> as necessary.  Therefore, at least for my use-case, disabling shake-cursor
> when zoomed (with the cursor already zoomed too) is indeed reasonable.
> 
> If there are use-cases where people still need shake-cursor when zoomed in
> with the cursor zoomed/scaled too, please post 'em (well, the first few
> anyway, don't go overboard if there's a hundred... =:^).  I can't think of
> any so if this will break the way others use the effects I'll learn. =:^)

The problem is, is also happening when dragging things, which was the way that I have encountered this bug https://bugs.kde.org/show_bug.cgi?id=513233
Comment 4 Oliver Beard 2026-04-04 06:35:44 UTC
*** Bug 518524 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2026-05-21 16:08:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/9255
Comment 6 Zamundaaa 2026-05-21 17:09:41 UTC
Git commit 0b6e7740d7a1e5d5d750368bc0107f7def3fb710 by Xaver Hugl.
Committed on 21/05/2026 at 16:37.
Pushed by zamundaaa into branch 'master'.

scene/workspacescene: render overlay items in paintScreen

This ensures that overlay items are included in effects like the zoom effect,
which simplifies the zoom effect and fixes
- qtquick effects not being affected by zoom
- shake cursor duplicating the cursor while zoomed in
- dnd items not being rendered in the correct position while zoomed in

The only downside to this is that effects that block direct scanout also now
block the hardware cursor. Since neither offscreen nor qtquick effects block
direct scanout anymore, this shouldn't be a problem in practice though.
Related: bug 513233

M  +0    -59   src/plugins/zoom/zoom.cpp
M  +0    -17   src/plugins/zoom/zoom.h
M  +0    -3    src/plugins/zoom/zoom.kcfg
M  +22   -15   src/scene/workspacescene.cpp

https://invent.kde.org/plasma/kwin/-/commit/0b6e7740d7a1e5d5d750368bc0107f7def3fb710
Comment 7 Vlad Zahorodnii 2026-05-22 09:13:26 UTC
Git commit 27bad00fc29f540686a533a1a6ef1244782ea624 by Vlad Zahorodnii, on behalf of Xaver Hugl.
Committed on 22/05/2026 at 08:28.
Pushed by vladz into branch 'Plasma/6.7'.

scene/workspacescene: render overlay items in paintScreen

This ensures that overlay items are included in effects like the zoom effect,
which simplifies the zoom effect and fixes
- qtquick effects not being affected by zoom
- shake cursor duplicating the cursor while zoomed in
- dnd items not being rendered in the correct position while zoomed in

The only downside to this is that effects that block direct scanout also now
block the hardware cursor. Since neither offscreen nor qtquick effects block
direct scanout anymore, this shouldn't be a problem in practice though.
Related: bug 513233
(cherry picked from commit 0b6e7740d7a1e5d5d750368bc0107f7def3fb710)

M  +0    -59   src/plugins/zoom/zoom.cpp
M  +0    -17   src/plugins/zoom/zoom.h
M  +0    -3    src/plugins/zoom/zoom.kcfg
M  +22   -15   src/scene/workspacescene.cpp

https://invent.kde.org/plasma/kwin/-/commit/27bad00fc29f540686a533a1a6ef1244782ea624