Bug 464970 - Custom tiling requires Present Windows effect, but there's no notification for that
Summary: Custom tiling requires Present Windows effect, but there's no notification fo...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Custom Tiling (show other bugs)
Version: 5.26.90
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 465186 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-01-29 04:18 UTC by Jin Liu
Modified: 2023-02-04 18:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2023-01-29 04:18:04 UTC
SUMMARY
If Present Windows effect is disabled, Meta-T silently fails. There're error messages in the system journal:

Failed to load QUrl("file:///usr/share/kwin/effects/tileseditor/qml/main.qml"): (file:///usr/share/kwin/effects/tileseditor/qml/main.qml:15:1: module "org.kde.KWin.Effect.WindowView" is not installed
import org.kde.KWin.Effect.WindowView 1.0
^)
Failed to load QUrl("file:///usr/share/kwin/effects/tileseditor/qml/main.qml"): (file:///usr/share/kwin/effects/tileseditor/qml/main.qml:15:1: module "org.kde.KWin.Effect.WindowView" is not installed
import org.kde.KWin.Effect.WindowView 1.0
^)

But the user is unlikely to know what's wrong unless he digs into the journal.

Enabling the effect and reboot fixes this problem.

So it's would be nice if in this situation, instead of silently failing, kwin shows a notification like "Custom Tiling needs the window effect "Present Windows" enabled. Please check in systemsettings - blahblah, then reboot.".

STEPS TO REPRODUCE
1. Disable Present Windows.
2. Reboot
3. Press Meta-T

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
A notification explaining what's wrong and how to fix it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Comment 1 David Edmundson 2023-01-30 11:08:11 UTC
Well found. I don't think that's the right fix, we should make it just work.
Comment 2 Bug Janitor Service 2023-01-30 11:16:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3518
Comment 3 Vlad Zahorodnii 2023-02-02 09:13:31 UTC
Git commit c0fa51c7842eb801556495f59a9dd587f431f853 by Vlad Zahorodnii, on behalf of David Edmundson.
Committed on 02/02/2023 at 09:13.
Pushed by vladz into branch 'master'.

effects/tileseditor: Drop unused imports

Imports come at a big cost when they're unused.
Also we shouldn't be importing WindowView from a different plugin. If
that effect is disabled it meant tileseditor would fail to load.

M  +0    -4    src/effects/tileseditor/qml/ResizeCorner.qml
M  +0    -6    src/effects/tileseditor/qml/ResizeHandle.qml
M  +0    -4    src/effects/tileseditor/qml/TileDelegate.qml
M  +1    -3    src/effects/tileseditor/qml/main.qml

https://invent.kde.org/plasma/kwin/commit/c0fa51c7842eb801556495f59a9dd587f431f853
Comment 4 David Edmundson 2023-02-02 09:14:25 UTC
Git commit 37e5db8bb7264db2760dbb183e1b3e2c0c9445bb by David Edmundson.
Committed on 02/02/2023 at 09:14.
Pushed by davidedmundson into branch 'cherry-pick-c0fa51c7'.

effects/tileseditor: Drop unused imports

Imports come at a big cost when they're unused.
Also we shouldn't be importing WindowView from a different plugin. If
that effect is disabled it meant tileseditor would fail to load.


(cherry picked from commit c0fa51c7842eb801556495f59a9dd587f431f853)

M  +0    -4    src/effects/tileseditor/qml/ResizeCorner.qml
M  +0    -6    src/effects/tileseditor/qml/ResizeHandle.qml
M  +0    -4    src/effects/tileseditor/qml/TileDelegate.qml
M  +1    -3    src/effects/tileseditor/qml/main.qml

https://invent.kde.org/plasma/kwin/commit/37e5db8bb7264db2760dbb183e1b3e2c0c9445bb
Comment 5 Vlad Zahorodnii 2023-02-02 18:14:34 UTC
*** Bug 465186 has been marked as a duplicate of this bug. ***
Comment 6 v@v0.vc 2023-02-04 18:03:05 UTC
Wow good find, i actually signed up to the bug tracker just to report this. The temp fix worked for me