Bug 489241 - Shake cursor makes it disappear instead of growing
Summary: Shake cursor makes it disappear instead of growing
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 6.1.1
Platform: Gentoo Packages Linux
: VHI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 489300 489323 489388 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-26 14:31 UTC by Julien Delquié
Modified: 2024-07-04 19:11 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: KWin 6.1.1.1
Sentry Crash Report:


Attachments
Changing cursors (254.38 KB, video/webm)
2024-06-26 16:12 UTC, Colin J Thomson
Details
qdbus org.kde.KWin (1.53 KB, text/plain)
2024-06-26 18:33 UTC, Colin J Thomson
Details
kdedefaults/kcminputrc (35 bytes, text/plain)
2024-06-26 18:34 UTC, Colin J Thomson
Details
kcminputrc (431 bytes, text/plain)
2024-06-26 18:35 UTC, Colin J Thomson
Details
qdbus org.kde.KWin /KWin supportInformation (7.11 KB, text/plain)
2024-06-26 18:47 UTC, Colin J Thomson
Details
The correct kcminputrc file (434 bytes, text/plain)
2024-06-26 18:48 UTC, Colin J Thomson
Details
patch (1.59 KB, patch)
2024-06-26 18:55 UTC, Vlad Zahorodnii
Details
debug patch (1.99 KB, patch)
2024-06-26 20:55 UTC, Vlad Zahorodnii
Details
updated patch (2.57 KB, patch)
2024-06-26 21:09 UTC, Vlad Zahorodnii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Delquié 2024-06-26 14:31:18 UTC
SUMMARY

The new feature « shake cursor » makes cursor disappear; it was working perfectly on beta.

STEPS TO REPRODUCE
1. Shake cursor

OBSERVED RESULT
Cursor disappear.

EXPECTED RESULT
Cursor inflates like a balloon.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.6-gentoo-x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 31.3 Gio of RAM
Graphics Processor: AMD Radeon RX 7800 XT

ADDITIONAL INFORMATION
Comment 1 Colin J Thomson 2024-06-26 14:54:20 UTC
I can confirm this on Fedora 40 and 6.1.1
However, if I change the cursor theme to something other than Breeze it works.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.6-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 2 Nate Graham 2024-06-26 15:59:33 UTC
So you're saying it disappears when you're using Breeze, but works fine with a 3rd-party cursor theme?

I can't reproduce the issue, and interestingly enough it's the opposite of what I saw in https://invent.kde.org/plasma/kwin/-/merge_requests/5967 while reviewing it. It got fixed before merge though.
Comment 3 Colin J Thomson 2024-06-26 16:09:37 UTC
(In reply to Nate Graham from comment #2)
> So you're saying it disappears when you're using Breeze, but works fine with
> a 3rd-party cursor theme?
> 
> I can't reproduce the issue, and interestingly enough it's the opposite of
> what I saw in https://invent.kde.org/plasma/kwin/-/merge_requests/5967 while
> reviewing it. It got fixed before merge though.

Yes exactly right. I've tried numerous 3rd party cursor themes and it works fine.
Comment 4 Colin J Thomson 2024-06-26 16:12:05 UTC
Created attachment 171019 [details]
Changing  cursors

A brief screen cast showing the issue.
Comment 5 Vlad Zahorodnii 2024-06-26 18:16:27 UTC
Can somebody change the cursor theme to breeze and attach ~/.config/kdedefaults/kcminputrc and ~/.config/kcminputrc to this bug report? Also can you post the output of `qdbus org.kde.KWin /KWin supportInformation`?
Comment 6 Nate Graham 2024-06-26 18:17:39 UTC
How did you get 6.1.1 in Fedora 40, Colin? They're not shipping it to stable yet. Did you use a COPR or something?
Comment 7 Nate Graham 2024-06-26 18:17:54 UTC
.
Comment 8 Colin J Thomson 2024-06-26 18:20:15 UTC
(In reply to Nate Graham from comment #6)
> How did you get 6.1.1 in Fedora 40, Colin? They're not shipping it to stable
> yet. Did you use a COPR or something?

I use Solopasha's COPR Nate, that way I can test beta's/early releases :)
Comment 9 Colin J Thomson 2024-06-26 18:33:54 UTC
Created attachment 171031 [details]
qdbus org.kde.KWin
Comment 10 Colin J Thomson 2024-06-26 18:34:46 UTC
Created attachment 171032 [details]
kdedefaults/kcminputrc
Comment 11 Colin J Thomson 2024-06-26 18:35:23 UTC
Created attachment 171033 [details]
kcminputrc
Comment 12 Colin J Thomson 2024-06-26 18:35:41 UTC
(In reply to Vlad Zahorodnii from comment #5)
> Can somebody change the cursor theme to breeze and attach
> ~/.config/kdedefaults/kcminputrc and ~/.config/kcminputrc to this bug
> report? Also can you post the output of `qdbus org.kde.KWin /KWin
> supportInformation`?

Done
Comment 13 Vlad Zahorodnii 2024-06-26 18:37:29 UTC
qdbus command output is wrong.

Can you please run "qdbus org.kde.KWin /KWin supportInformation" ?

Also do effects such as invert work correctly?
Comment 14 Colin J Thomson 2024-06-26 18:46:57 UTC
(In reply to Vlad Zahorodnii from comment #13)
> qdbus command output is wrong.
> 
> Can you please run "qdbus org.kde.KWin /KWin supportInformation" 

OK

> Also do effects such as invert work correctly?

Seems OK, I will also attach the correct kcminput file
Comment 15 Colin J Thomson 2024-06-26 18:47:16 UTC
Created attachment 171036 [details]
qdbus org.kde.KWin /KWin supportInformation
Comment 16 Colin J Thomson 2024-06-26 18:48:39 UTC
Created attachment 171037 [details]
The correct kcminputrc file
Comment 17 Vlad Zahorodnii 2024-06-26 18:51:05 UTC
Configuration is fine. Maybe Qt resources (high resolution breeze cursor theme) have been stripped from kwin executables during build?
Comment 18 Vlad Zahorodnii 2024-06-26 18:55:55 UTC
Created attachment 171039 [details]
patch

@Julien can you please apply the following patch? then shake the cursor and post kwin output here
Comment 19 Julien Delquié 2024-06-26 19:53:12 UTC
I have applied the patch and found something like this in journalctl:

juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]: :/effects/shakecursor: QList("cursors")
juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]: :/effects/shakecursor/cursors: QList("breeze_cursors", "Breeze_Light")
juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]: :/effects/shakecursor/cursors/breeze_cursors: QList("cursors", "index.theme")
juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]: :/effects/shakecursor/cursors/breeze_cursors/cursors: QList("default")

Is it what you wanted me to show you?
Comment 20 Vlad Zahorodnii 2024-06-26 20:08:26 UTC
(In reply to Julien Delquié from comment #19)
> I have applied the patch and found something like this in journalctl:
> 
> juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]:
> :/effects/shakecursor: QList("cursors")
> juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]:
> :/effects/shakecursor/cursors: QList("breeze_cursors", "Breeze_Light")
> juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]:
> :/effects/shakecursor/cursors/breeze_cursors: QList("cursors", "index.theme")
> juin 26 21:50:29 pasokon.maison kwin_wayland_wrapper[3374]:
> :/effects/shakecursor/cursors/breeze_cursors/cursors: QList("default")
> 
> Is it what you wanted me to show you?

Yeah, it looks fine... I don't understand why the cursor is hidden then...
Comment 21 Colin J Thomson 2024-06-26 20:19:18 UTC
I just ran a test, and downgraded kwin* to 6.1.0, then ran kwin --replace.
All my cursors including Breeze worked fine. 
I then updated back to kwin 6.1.1 and the Breeze cursor disappears on shake. Just FYI
Comment 22 Vlad Zahorodnii 2024-06-26 20:55:41 UTC
Created attachment 171046 [details]
debug patch

@Julien can you please test another patch?
Comment 23 Vlad Zahorodnii 2024-06-26 21:09:12 UTC
Created attachment 171047 [details]
updated patch
Comment 25 Julien Delquié 2024-06-27 05:51:31 UTC
(In reply to Vlad Zahorodnii from comment #22)
> Created attachment 171046 [details]
> debug patch
> 
> @Julien can you please test another patch?

This patch does not apply:
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/kde-plasma/kwin-6.1.1/work/kwin-6.1.1"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/kde-plasma/kwin-6.1.1/work/kwin-6.1.1_build"
 * =============================================================================================================================================================
 * Applying user patches from /etc/portage/patches ...
 * Applying 489241-2.patch ...
patching file src/utils/xcursortheme.cpp
Hunk #1 FAILED at 102.
Hunk #2 succeeded at 104 with fuzz 2 (offset -21 lines).
Hunk #3 succeeded at 122 (offset -21 lines).
Hunk #4 succeeded at 135 (offset -21 lines).
Hunk #5 succeeded at 191 (offset -21 lines).
1 out of 5 hunks FAILED -- saving rejects to file src/utils/xcursortheme.cpp.rej                                                                         [ !! ]
Comment 26 Julien Delquié 2024-06-27 05:51:54 UTC
(In reply to Vlad Zahorodnii from comment #23)
> Created attachment 171047 [details]
> updated patch

nor this one:
 * Applying 489241-3.patch ...
patching file src/utils/xcursortheme.cpp
Hunk #2 FAILED at 103.
Hunk #3 succeeded at 105 with fuzz 2 (offset -21 lines).
Hunk #4 succeeded at 123 (offset -21 lines).
Hunk #5 succeeded at 136 (offset -21 lines).
Hunk #6 succeeded at 192 (offset -21 lines).
Comment 27 Julien Delquié 2024-06-27 05:56:27 UTC
I tried these patches (171046 and 171047) with or without first patch (171039), same results.
Comment 28 Bug Janitor Service 2024-06-27 07:33:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6002
Comment 29 Vlad Zahorodnii 2024-06-27 07:43:44 UTC
Git commit 7527a9099cfc3f0127b87ddad488c8059cdf3a8d by Vlad Zahorodnii.
Committed on 27/06/2024 at 07:32.
Pushed by vladz into branch 'Plasma/6.1'.

3rdparty: Drop xcursor write hook

It's unused.

(cherry picked from commit d655b5a994bb62caf40a92c4c11c1903f386e441)

M  +0    -9    src/3rdparty/xcursor.c

https://invent.kde.org/plasma/kwin/-/commit/7527a9099cfc3f0127b87ddad488c8059cdf3a8d
Comment 30 Vlad Zahorodnii 2024-06-27 07:43:52 UTC
Git commit 5d94ce9eac18a0ecf4dbbc8dbd04b385dc24c8ff by Vlad Zahorodnii.
Committed on 27/06/2024 at 07:32.
Pushed by vladz into branch 'Plasma/6.1'.

utils: Load Xcursor themes using QFile

This improves the integration of the XcursorTheme class with the rest of
the Qt ecosystem, for example it should be possible to load cursor themes
from Qt resources.

(cherry picked from commit 586a775d5b65dc14458f6e861515f9f9b35f6cad)

M  +6    -54   src/3rdparty/xcursor.c
M  +10   -1    src/3rdparty/xcursor.h
M  +22   -1    src/utils/xcursortheme.cpp

https://invent.kde.org/plasma/kwin/-/commit/5d94ce9eac18a0ecf4dbbc8dbd04b385dc24c8ff
Comment 31 Vlad Zahorodnii 2024-06-27 07:44:01 UTC
Git commit af9b3dd54e54806c435b8e6ed51cd3808d84f7a4 by Vlad Zahorodnii.
Committed on 27/06/2024 at 07:33.
Pushed by vladz into branch 'Plasma/6.1'.

3rdparty: Reformat xcursor.{h,c}

(cherry picked from commit e678ebef2983dff97f6ee744d9b2f9770e1f21d0)

M  +224  -242  src/3rdparty/xcursor.c
M  +26   -24   src/3rdparty/xcursor.h

https://invent.kde.org/plasma/kwin/-/commit/af9b3dd54e54806c435b8e6ed51cd3808d84f7a4
Comment 32 Julien Delquié 2024-06-27 10:02:05 UTC
I have applied patches from merge request. It works! (And also I can see that cursor is really pretty now, when magnified)
Comment 33 Filip 2024-06-27 11:07:25 UTC
*** Bug 489300 has been marked as a duplicate of this bug. ***
Comment 34 Vlad Zahorodnii 2024-06-27 15:25:14 UTC
(In reply to Julien Delquié from comment #32)
> I have applied patches from merge request. It works! (And also I can see
> that cursor is really pretty now, when magnified)

Thanks for confirming that the fix works! :)
Comment 35 Colin J Thomson 2024-06-27 18:55:51 UTC
Thanks for the fast fix, confirmed working on this Fedora box as well.
Comment 36 Nate Graham 2024-06-27 19:21:44 UTC
*** Bug 489323 has been marked as a duplicate of this bug. ***
Comment 37 duha.bugs 2024-06-28 18:07:20 UTC
*** Bug 489388 has been marked as a duplicate of this bug. ***