Bug 479391 - "Remember" window rules don't consider multiple application windows
Summary: "Remember" window rules don't consider multiple application windows
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.27.9
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-04 13:12 UTC by Dennis Marttinen
Modified: 2024-01-04 13:12 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Marttinen 2024-01-04 13:12:22 UTC
SUMMARY

In waiting for https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/18 and/or https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/264 to materialize and propagate through the ecosystem, I tried to set KWin Wayland to remember window positions/sizes for specific applications, such as Firefox. However, if the application has multiple windows (i.e., multiple browser windows with different tabs each), the "Remember" option of the window rules for Position (and probably Size, horizontal/vertical maximization etc., basically any property with the "Remember" option) works a bit counter-intuitively. It does remember the position of *one* of the windows, and sets the position of *all* windows upon re-launch to that remembered position. In addition to the window class, I attempted substring matching based on the window title etc., but still one rule seems to only remember one set of properties. This is problematic since browser windows are dynamic, and I can't create an individual rule for every single one. In general, for multi-window applications, I would expect the "Remember" option to remember the positions of all windows of the matched application individually. Something like this already works when (un)plugging monitors.

STEPS TO REPRODUCE

1. Create window rule that matches Firefox windows by window class (and optionally title)
2. Set property "Position" to "Remember"
3. Set "Ignore requested geometry" to "Force" and "Yes" (on Wayland this does nothing except silence the warning AFAIU)
4. Open Firefox, open multiple windows and spread them around
5. Close Firefox
6. Re-open Firefox

OBSERVED RESULT

All Firefox windows are re-opened on top of each other at one of the previous window positions.

EXPECTED RESULT

The Firefox windows open at their respective previous positions.

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11