Bug 477963 - Parent window is partially dimmed after opening "Add property to the rule" popup in the window used to create a window rule
Summary: Parent window is partially dimmed after opening "Add property to the rule" po...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinrules (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-03 01:07 UTC by Patrick Silva
Modified: 2023-12-06 15:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.91.0 (Beta2)
Sentry Crash Report:


Attachments
screenshot (63.61 KB, image/png)
2023-12-03 01:07 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-12-03 01:07:50 UTC
Created attachment 163799 [details]
screenshot

STEPS TO REPRODUCE
1. open a KDE app
2. right-click on the window decoration, hover over "More actions" submenu and choose "Configure special application settings..." - Window Rules window opens
3. click on "+ Add property..." button

OBSERVED RESULT
"Add property to the rule" popup opens and Window Rules window is partially dimmed.
Please see the attached screenshot.

EXPECTED RESULT
the whole area behind "Add property to the rule" popup is dimmed

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-12-05 20:24:02 UTC
Can reproduce. It looks like the popup is being parented to something too high up in the stack such that its darkened background ends up going under the placeholder message. Either that or the Placeholder message has its Z value set too high.

Can also reproduce in the KCM that appears in System Settings, not just the standalone window.
Comment 2 Nate Graham 2023-12-05 20:27:00 UTC
It was the former. This diff fixes it:

diff --git src/kcms/rules/ui/RulesEditor.qml src/kcms/rules/ui/RulesEditor.qml
index 6fd2bc4f5f..87a29b9b40 100644
--- src/kcms/rules/ui/RulesEditor.qml
+++ src/kcms/rules/ui/RulesEditor.qml
@@ -170,8 +170,6 @@ KCM.ScrollViewKCM {
     Kirigami.OverlaySheet {
         id: propertySheet
 
-        parent: view
-
         title: i18n("Add property to the rule")
 
         footer: Kirigami.SearchField {


However it introduces some visual glitches into the OverlaySheet, so I guess I found the reason for the reparenting. :) 

I'll let Ismael take over from here and decide if this is the right solution, or if something else is needed.
Comment 3 Bug Janitor Service 2023-12-06 14:29:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4755
Comment 4 Ismael Asensio 2023-12-06 15:53:11 UTC
Git commit c16a5e355f3ade494e579c67b80e13080c94810c by Ismael Asensio.
Committed on 06/12/2023 at 16:41.
Pushed by iasensio into branch 'master'.

kcm/rules: Fix OverlaySheet shadow coverage

Do not reparent the OverlaySheet's parent and let it be the
whole page, so that the shadow darkening also covers the empty
space below the view and the placeholder message
FIXED-IN: 5.91.0 (Beta2)

M  +0    -2    src/kcms/rules/ui/RulesEditor.qml

https://invent.kde.org/plasma/kwin/-/commit/c16a5e355f3ade494e579c67b80e13080c94810c