Bug 468371

Summary: Kate window rules: "All Desktops" + "No titlebar and frame" = pager & taskbar only see Kate on Desktop #1
Product: [Plasma] kwin Reporter: S. Christian Collins <s_chriscollins>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: isma.af
Priority: NOR    
Version First Reported In: 5.27.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: kwinrulesrc file from VirtualBox neon install
video showing the bug
screenshot of the Kate rules settings

Description S. Christian Collins 2023-04-11 02:38:57 UTC
SUMMARY
***
If you use window rules to have Kate appear on all desktops with no titlebar and frame, it works, but about 50% of the time, the pager and taskbar will think Kate is present only on the first desktop.
***

STEPS TO REPRODUCE
1. Make sure you have multiple desktops enabled. I have 4.
2. Start Kate.
3. Click Kate's application icon in the titlebar and select "More Actions" -> "Configure Special Application Settings...".
4. Add the following window rules:
    • Virtual Desktop: Force: All Desktops
    • No titlebar and frame: Apply Initially: Yes
5. Close and restart Kate.

OBSERVED RESULT
Kate will appear on all desktops as expected, but there's about a 50% chance the pager and taskbar will think Kate is only present on the first desktop. When this happens, it is impossible to manage the Kate window from the taskbar (minimize, restore, etc.) when using any other desktop than the first. If you right-click on Kate's taskbar entry (from Desktop #1), under "Move to Desktop", it shows Kate as currently on "1 Desktop 1". Attempting to change this to "All Desktops" does nothing.

EXPECTED RESULT
The taskbar/pager should realize that Kate is running on all desktops and allow management of the window from any desktop.

SOFTWARE/OS VERSIONS
Linux: KDE neon 5.27
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I also run Dolphin with the same window rules, but it does not trigger this bug.

WORKAROUND
Close and restart Kate until the pager shows it present on all desktops.
Comment 1 Ismael Asensio 2023-04-12 20:57:05 UTC
I cannot reproduce. It this happening on X11 or Wayland?

Also, could you attach your ~/.config/kwinrulesrc file? It might have some clues there.

Thanks!
Comment 2 S. Christian Collins 2023-04-12 23:44:27 UTC
Created attachment 158051 [details]
kwinrulesrc file from VirtualBox neon install

(In reply to Ismael Asensio from comment #1)
> I cannot reproduce. It this happening on X11 or Wayland?

X11. Window rules in Wayland seems to be broken, so neither rule actually gets applied there.

> Also, could you attach your ~/.config/kwinrulesrc file? It might have some
> clues there.

Here it is. I will also attach a video of the bug happening in a VirtualBox KDE neon install, though this bug is reproducible on my main desktop install as well.
Comment 3 S. Christian Collins 2023-04-12 23:49:29 UTC
Created attachment 158052 [details]
video showing the bug

Here is a video of the bug in action. The first launch of Kate is only recognized by the pager and taskbar as being on Desktop 1, but the second launch is fine.
Comment 4 S. Christian Collins 2023-04-12 23:52:46 UTC
Created attachment 158053 [details]
screenshot of the Kate rules settings
Comment 5 S. Christian Collins 2024-04-17 14:42:32 UTC
I have not encountered this bug in a while, so I am closing it.