Bug 455538 - Option to keep floating panels -floating- when windows are maximized and using "Maximized Window Gap" Kwin Script
Summary: Option to keep floating panels -floating- when windows are maximized and usin...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.25.0
Platform: Other Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-18 10:01 UTC by Damian C
Modified: 2022-10-25 18:07 UTC (History)
3 users (show)

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


Attachments
example of the "desired" result but with a non maximized window (134.27 KB, image/png)
2022-06-18 10:01 UTC, Damian C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damian C 2022-06-18 10:01:46 UTC
Created attachment 149885 [details]
example of the "desired" result but with a non maximized window

SUMMARY
***
Normally when using a floating panel, maximizing a window and having the floating panel become a "normal" (ie, non floating) panel makes sense as it would look ugly and incoherent with the maximized window.

However I'm using the "Maximized Window Gap" Kwin Script, and with it my maximized windows have a gap around them, and when these windows are not maximized (but taking the same space as the maximized window) it looks like both the window and the panel are floating over the background and to me it looks quite cool.

However when I maximize any window while using the kwin script and the floating panel, the panel acts as it was designed to and becomes "non floating", thus breaking the look of both elements (the window, and the panel) floating.

I know this is probably quite a niche scenario, but I'd love to have such option.
Something similar but not quite the same has been requested under bug #454950.

It will make more sense with the screenshot, which shows more or less an example of the "desired" result but with a non maximized window, which doesn't look quite exactly right as I basically had to set the window size manually to more or less match what it looks like when maximized with the kwin script enable, but it will surely illustrate the point.

***


STEPS TO REPRODUCE
1. Enable Floating Panel.
2. Be using Kwin Script "Maximized Window Gap"
3. Maximize a window.

OBSERVED RESULT
The floating panel becomes a "normal" panel and docks to the bottom of the screen.

EXPECTED RESULT
That the floating panel remains floating the same as if there was no maximized window.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.18.3-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8700K CPU @ 3.70GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-06-21 17:16:39 UTC
This is one option that would also resolve Bug 455323.
Comment 2 Subham Poddar 2022-09-22 05:36:28 UTC
I would like to state that I also second this request. It would be helpful if there was a option for floating panel to be always floating, instead of becoming like normal panel when window is maximized regardless whether Kwin Script "Maximized Window Gap" is used.
Comment 3 veggero 2022-09-22 10:33:22 UTC
This really is a downstream issue. I think it's fair on our side to consider that a maximized window will touch the screen borders. The fact that a third party kwin script forces the maximized window to be floating even when maximized produces not only this bug, but other ones too, due to the same assumption (as an example, you loose the window shadow and rounded corners). I think in this case it's the script which is taking a risky approach.
This wouldn't fix 455323 either. That bug refers to the fact that, when a window is maximized, there's too much margin around the panel. Adding an option to not de-float the panel at all wouldn't fix that: most people wouldn't discover the option and be left with the bigger margins by default, and people that want less margin would have to disable de-floating entirely.
In the (near) future, I would like the de-floating mechanism to be a bit smarter, and defloat in other cases too, such as when you have two windows side by side that occupy all the screen. This could be approached in various ways, as an example the panel could de-float it there's any window that's directly touching it. This would (indirectly) fix this bug and alleviate 455323 too (half of the de-floated margin was added due to the lack of this mechanism).
Comment 4 Nate Graham 2022-10-25 14:52:53 UTC
Git commit ed0214057e7ae78bedc4486a6344db9459ce5570 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 25/10/2022 at 14:52.
Pushed by ngraham into branch 'master'.

Panel: when floating, de-float when window touches it

A floating Panel now de-floats and becomes opaque whenever a window touches it.
This also allows for a thinner Panel when a window is maximized (a normal Panel
is 44 px; before this patch a de-floated one was 60, now it's 52px) and that should
allay complaints about excessive margins).
Related: bug 455483, bug 455323
FIXED-IN: 5.27

M  +29   -6    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/commit/ed0214057e7ae78bedc4486a6344db9459ce5570
Comment 5 Damian C 2022-10-25 18:07:12 UTC
(In reply to Nate Graham from comment #4)
> Git commit ed0214057e7ae78bedc4486a6344db9459ce5570 by Nate Graham, on
> behalf of Niccolò Venerandi.
> Committed on 25/10/2022 at 14:52.
> Pushed by ngraham into branch 'master'.
> 
> Panel: when floating, de-float when window touches it
> 
> A floating Panel now de-floats and becomes opaque whenever a window touches
> it.
> This also allows for a thinner Panel when a window is maximized (a normal
> Panel
> is 44 px; before this patch a de-floated one was 60, now it's 52px) and that
> should
> allay complaints about excessive margins).
> Related: bug 455483, bug 455323
> FIXED-IN: 5.27
> 
> M  +29   -6    desktoppackage/contents/views/Panel.qml
> 
> https://invent.kde.org/plasma/plasma-desktop/commit/
> ed0214057e7ae78bedc4486a6344db9459ce5570

Thank you! looking forward to 5.27