OSDs for volume and brightness are very large when using the Maximized window placement policy. See screenshot
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: latest 5.15 branch
Wayland, haven't tested on X11 yet
Created attachment 133156 [details]
Neon Unstable x11 - Not Affected
Neon User Edition Wayland - Not Affected
Mind you this bug happens on second invocation of the OSD and not the initial one.
I can confirm this bug.
Thanks Bhushan, after second test can confirm.
Affects wayland only.
Do the OSDs have correct window type? Would it be possible to have some WAYLAN_DEBUG output?
Created attachment 133163 [details]
plasmashell wl debug
WAYLAND_DEBUG of plasma-shell,
I show OSD, it is displayed correctly, it auto hides, and then is shown again which is not showed correctly.
[2460820.694] -> email@example.com_surface(new id wl_surface@119)
[2460820.870] -> firstname.lastname@example.org_xdg_surface(new id xdg_surface@112, wl_surface@119)
[2460820.981] -> email@example.com_toplevel(new id xdg_toplevel@109)
[2460821.067] -> firstname.lastname@example.org_title("Plasma")
[2460821.132] -> email@example.com_app_id("org.kde.plasmashell")
[2460821.195] -> firstname.lastname@example.org_buffer_scale(2)
[2460821.267] -> email@example.com_buffer_transform(0)
[2460821.319] -> firstname.lastname@example.org()
[2460821.511] -> email@example.com_window_geometry(0, 0, 282, 44)
[2460827.167] firstname.lastname@example.org(360, 666, array)
[2460850.322] -> email@example.com_role(3)
plasma sets the surface role too late
>plasma sets the surface role too late
Yeah, we only set it on expose event as we need a wl_surface to attach to.
wl_surface in QWaylandWindow is a bit inconsistent.
It exists when a platform window is created
It is removed when a window is hidden
It then only comes back when a window is shown again.
So as a hook we often use expose to cover that third case, but unfortunately it is after mapping
As a slightly horrible lazy hack, you can call destroy and create on QWindow after we hide
This will give you a surface, so we can set the role earlier
*** Bug 428875 has been marked as a duplicate of this bug. ***
Apparently this happens on X11 too. See Bug 428875.
*** Bug 428147 has been marked as a duplicate of this bug. ***
This also happens when I edit the task bar,I assume that this is the same problem.
I also use custom window behavior.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1608
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1181
Git commit 2ba1b0b642d540f74f0e21e7aaa272644ea4eda5 by Marco Martin.
Committed on 08/11/2021 at 16:12.
Pushed by mart into branch 'master'.
make the OSD an actual wayland OSD
when the OnScreenDisplay type is set, set it on the plasma shell surface
so KWin can actually treat it as such
M +7 -0 src/plasmaquick/dialog.cpp