Created attachment 126152 [details] Firefox with CSDs close to the panel SUMMARY With "Hide background when not needed" enabled on my latte panels the backgrounds stay hidden as expected when I have a Firefox window with normal KWin decorations until it actually touches or Firefox is maximized. When using Firefox with CSDs Latte behaves as if there was an invisible larger border around Firefox' window and becomes opaque quite a bit before it visibly touches. Maybe this has to do with the changes in Plasma 5.18 re better support for GTK client-side decorations with shadows and resize areas? STEPS TO REPRODUCE 1. Set a panel to "Hide background when not needed" that is otherwise opaque. 2. Configure Firefox to not use a "Title Bar" in its "Customize" view, thereby making it a client-side decorated window. 3. Observe the latte panel becoming opaque before Firefox visibly touches or is maximized. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.18.0 KDE Frameworks Version: 5.67.0 Qt Version: 5.14.1
Created attachment 126153 [details] Firefox without CSDs in same position close to the panel
I don't think this is Latte solvable for the simple reason that new CSD windows in Plasma 5.18 provide a larger geometry for their shadows, so Latte is considering them as touching.
The CSDs shadows are now probably considered as window borders and are included in its geometry.
(In reply to Michail Vourlakos from comment #3) > The CSDs shadows are now probably considered as window borders and are > included in its geometry. Yes, unfortunately that's the case on X11. We counter for this by subtracting _GTK_FRAME_EXTENTS from the server-side geometry of the window. By doing it, we don't need any drastic changes in KWin, for example we don't have to adjust our window snapping code or window placement code. "Everything just works."
Is this a KWin bug, though?
Yeah the problem is that for GTK CSD windows, the window bounds are larger than they appear, since technically the shadow and the transparent resize area are a part of the window. Is there any way for Latte Dock to detect that a window is using client-side decorations rather than server-side decorations and adjust its logic accordingly? Or for KWin to provide separate "actual window size" and "window content area size" information so that apps like Latte can do their detection using the latter?
> Is there any way for Latte Dock to detect that a window is using client-side decorations rather than server-side decorations and adjust its logic accordingly? It could read the Gtk Frame Extents through KWindowSystem, I believe?
Ah yeah, it probably could!
(In reply to Nate Graham from comment #8) > Ah yeah, it probably could! How?
Probably a question for the KWin developers
Git commit d3b5e2c4eb89cfc2a60457f35c5670af65ad19ae by Michail Vourlakos. Committed on 06/03/2020 at 19:45. Pushed by mvourlakos into branch 'master'. remove gtk_frame_extents from window geometries --under x11 environment remove the gtk_frame_extents that are used for shadows under plasma environment M +21 -0 app/wm/xwindowinterface.cpp M +5 -0 app/wm/xwindowinterface.h https://commits.kde.org/latte-dock/d3b5e2c4eb89cfc2a60457f35c5670af65ad19ae