Bug 462644 - The name and window class of certain apps are not detected when creating a window rule
Summary: The name and window class of certain apps are not detected when creating a wi...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (other bugs)
Version First Reported In: 5.26.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-04 18:31 UTC by Patrick Silva
Modified: 2022-12-14 22:50 UTC (History)
3 users (show)

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


Attachments
screenshot (99.23 KB, image/png)
2022-12-04 18:31 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-12-04 18:31:12 UTC
Created attachment 154310 [details]
screenshot

STEPS TO REPRODUCE
1. install MakeMKV from flathub
https://flathub.org/apps/details/com.makemkv.MakeMKV
2. open MakeMKV
3. right-click on the window decoration of MakeMKV, hover over 'More actions' and choose 'Configure special application settings...' 

OBSERVED RESULT
'Description' field says 'Application settings for' (the name of the app is missing) and 'Window class (application)' field is empty. Please see the attached screenshot.

EXPECTED RESULT
The name and window class of all apps should be detected

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Can also reproduce with Subtitle Edit from AUR 
https://aur.archlinux.org/packages/subtitleedit
Comment 1 Nicolas Fella 2022-12-04 21:52:51 UTC
MakeMKV doesn't set the WM_CLASS X11 property, so we can't do much there
Comment 2 Bug Janitor Service 2022-12-05 22:39:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3274
Comment 3 Ismael Asensio 2022-12-10 22:39:28 UTC
Git commit e8545fdb37a490cb702703865100ec9f1a12b0e9 by Ismael Asensio.
Committed on 10/12/2022 at 22:24.
Pushed by iasensio into branch 'master'.

kcms/rules: Notify when a window does not provide a class

Some applications do not provide a window class according to
the spec (WM_CLASS on X11, appId on Wayland), so KWin cannot
"detect" this property.

In those cases, notify the user that this is a bug within the
application (so it is not confused for a KWin misbehavior)
and also prevent setting a wrong description.
FIXED-IN: 5.27

M  +6    -2    src/kcmkwin/kwinrules/kcmrules.cpp
M  +11   -0    src/kcmkwin/kwinrules/rulesmodel.cpp

https://invent.kde.org/plasma/kwin/commit/e8545fdb37a490cb702703865100ec9f1a12b0e9