Bug 457487 - After fixing the shaded/shuttered window feature, restarting kwin_x11 --replace forgets the shaded window sizes
Summary: After fixing the shaded/shuttered window feature, restarting kwin_x11 --repla...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-04 15:57 UTC by Hans-Peter Jansen
Modified: 2023-11-13 18:49 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Tiny title bar objects after kwin restart (74.60 KB, image/png)
2022-08-04 15:57 UTC, Hans-Peter Jansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Jansen 2022-08-04 15:57:39 UTC
Created attachment 151111 [details]
Tiny title bar objects after kwin restart

After Vlad Zahorodnii fixed bko#450582 with 
https://invent.kde.org/plasma/kwin/-/commit/1c5215009865c20b18c0f3114b167080cd70a33a
restarting kwin with `kwin_x11 --replace` forgets the shaded window sizes, defaulting to the minimum size of the original window, and just a tiny object in shaded state (see attached screenshot).

Reproduce:
Install a kwin_x11 version including the fix mentioned above. Change window behaviour: title bar double click action to "Shade", and change the window border size to Normal in window decorations. Double-click a window (memorize the original size): it will shade (only the title bar is visible now, with the original width). Restart kwin. The bar is reduced to a tiny object (depending on border size). 

Operating System: openSUSE Tumbleweed 20220719
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.12-2-preempt (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 62.4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Manufacturer: ASUS

kwin5-5.25.3git.20220718T142626~61b1eac5-189.1.x86_64
Comment 1 Duncan 2022-08-04 22:29:54 UTC
Given the mention of minimum window size...

Does setting a minimum-size window rule (perhaps a generic one if you use shade enough, below more specific rules so it will only apply to windows without a rule already setting minimum size, tho I'd suggest matching only normal window type to avoid interfering with special windows), forcing minimum-size to say 800x1 or some such, help, as a workaround until this is fixed?
Comment 2 Luke-Jr 2022-10-26 12:40:32 UTC
Is this going to get fixed? (Alternatively, is there a maintained fork of KWin somewhere out there we can switch to?)
Comment 3 Hans-Peter Jansen 2022-10-26 16:00:29 UTC
(In reply to Luke-Jr from comment #2)
> Is this going to get fixed? (Alternatively, is there a maintained fork of
> KWin somewhere out there we can switch to?)

Be careful with such expressions: kwin is maintained! It's the X11 part, that is problematic, and here, it's related to a feature, that doesn't even exist under wayland, yet! If you want this feature for wayland, please show your interest here: https://bugs.kde.org/show_bug.cgi?id=377162

FTR: I tried different approaches already to backport to an earlier state of the shaded window feature, aas well as backing out those changes, in order to get back to the state of the good ol' times, but the kwin codebase was shuffled around so heavily, that it would end up into something similar, what Vlad did already. Duuh.
Comment 4 Luke-Jr 2022-10-26 21:06:33 UTC
(In reply to Hans-Peter Jansen from comment #3)
> (In reply to Luke-Jr from comment #2)
> > Is this going to get fixed? (Alternatively, is there a maintained fork of
> > KWin somewhere out there we can switch to?)
> 
> Be careful with such expressions: kwin is maintained!

Not fixing a major regression like this after so long would lead one to think otherwise ;)

> It's the X11 part,
> that is problematic, and here, it's related to a feature, that doesn't even
> exist under wayland, yet! If you want this feature for wayland, please show
> your interest here: https://bugs.kde.org/show_bug.cgi?id=377162

My approach for now is to simply not use Wayland. It seems to introduce problems and regressions like this, for no benefit.

> FTR: I tried different approaches already to backport to an earlier state of
> the shaded window feature, aas well as backing out those changes, in order
> to get back to the state of the good ol' times, but the kwin codebase was
> shuffled around so heavily, that it would end up into something similar,
> what Vlad did already. Duuh.

This is what I'm successfully using as of 5.26.1: http://dpaste.com/EHULW6PHM

The only thing that seems broken is if I maximise a shaded window, unshade it, then try to unmaximise. But I'm not sure if that ever worked.

Shading and replacing kwin does seem to be fine, though.
Comment 5 Vlad Zahorodnii 2022-10-27 06:54:45 UTC
(In reply to Luke-Jr from comment #4)
> (In reply to Hans-Peter Jansen from comment #3)
> > (In reply to Luke-Jr from comment #2)
> > > Is this going to get fixed? (Alternatively, is there a maintained fork of
> > > KWin somewhere out there we can switch to?)
> > 
> > Be careful with such expressions: kwin is maintained!
> 
> Not fixing a major regression like this after so long would lead one to
> think otherwise ;)

Restarting kwin_x11 is not something that people usually do, so it's low on our radar.
Comment 6 carlo cancellieri 2023-11-13 18:49:58 UTC
Dear KDE,
 this is also affecting my Vanilla system since a while. Personally I love to use this functionality in combination with keep on top so I can shade and unshade windows just hovering it's bar.
I think this functionality is valuable and I'd love to give my assistance in debugging experimenting for a solution if someone is so kind to look into it.
Best,
Carlo


Info:
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-88-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 15,3 GiB of RAM
Graphics Processor: NVIDIA GeForce MX250/PCIe/SSE2