Summary: | XWayland apps are occasionally not rendered when switching virtual desktops | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Thiago Sueto <herzenschein> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/626b5b4c0d30b0bd040f8fc1da582a6c782cf5a9 | Version Fixed In: | 5.23 |
Description
Thiago Sueto
2020-09-01 16:31:16 UTC
Forgot to mention: despite not seeing anything, I can still manipulate the window by dragging it by its titlebar. Additionally, I managed to get lucky just now and reproduced it by Meta+number. Similarly to https://bugs.kde.org/show_bug.cgi?id=426071 , any attempts to change its window state (maximize, restore etc) shows the respective visual effects, but does not nulify this issue. Except for one: if I minimize it and restore it, the issue is gone. Git commit 8ac93a59ffb1a09bf6df46c7012bea7910e6b883 by Vlad Zahorodnii. Committed on 04/10/2021 at 05:56. Pushed by vladz into branch 'master'. scene: Handle Xwayland windows changing surfaces Xwayland can re-create the wl_surface if the window has been previously unmapped. Related: bug 442936 M +23 -19 src/windowitem.cpp https://invent.kde.org/plasma/kwin/commit/8ac93a59ffb1a09bf6df46c7012bea7910e6b883 Git commit 52c9dbb487f4ac98017b83a1deee912546cbff5f by Vlad Zahorodnii. Committed on 04/10/2021 at 05:56. Pushed by vladz into branch 'master'. wayland: Reset Toplevel::surfaceId after surface is created Xwayland will re-create the wl_surface object if the X11 window is unmapped and mapped. That, and the fact that the order in which the WL_SURFACE_ID client message event is received and the wl_surface object is created is undefined can cause the following bug: * WL_SURFACE_ID is received * the old wl_surface object is destroyed, m_surfaceId is reset to 0 * new wl_surface is created but because m_surfaceId is 0, it won't be associated with the x11 window This change ensures that kwin will associate the wl_surface with x11 window by making it not reset cached surface id when the old wl_surface is destroyed. However, we cannot leave m_surfaceId as is because wayland aggressively re-uses object ids so kwin can associate wrong surface with x11 window. To prevent that, this change also makes Toplevel::setSurface() reset cached surface id. Related: bug 442936 M +2 -3 src/events.cpp M +1 -2 src/toplevel.cpp M +4 -15 src/toplevel.h M +2 -2 src/wayland_server.cpp https://invent.kde.org/plasma/kwin/commit/52c9dbb487f4ac98017b83a1deee912546cbff5f Git commit a75559c39081c80c7e31e9c7324b17e7a4efb3f1 by Vlad Zahorodnii. Committed on 04/10/2021 at 05:57. Pushed by vladz into branch 'Plasma/5.23'. wayland: Reset Toplevel::surfaceId after surface is created Xwayland will re-create the wl_surface object if the X11 window is unmapped and mapped. That, and the fact that the order in which the WL_SURFACE_ID client message event is received and the wl_surface object is created is undefined can cause the following bug: * WL_SURFACE_ID is received * the old wl_surface object is destroyed, m_surfaceId is reset to 0 * new wl_surface is created but because m_surfaceId is 0, it won't be associated with the x11 window This change ensures that kwin will associate the wl_surface with x11 window by making it not reset cached surface id when the old wl_surface is destroyed. However, we cannot leave m_surfaceId as is because wayland aggressively re-uses object ids so kwin can associate wrong surface with x11 window. To prevent that, this change also makes Toplevel::setSurface() reset cached surface id. Related: bug 442936 (cherry picked from commit 52c9dbb487f4ac98017b83a1deee912546cbff5f) M +2 -3 src/events.cpp M +1 -2 src/toplevel.cpp M +4 -15 src/toplevel.h M +2 -2 src/wayland_server.cpp https://invent.kde.org/plasma/kwin/commit/a75559c39081c80c7e31e9c7324b17e7a4efb3f1 Git commit 626b5b4c0d30b0bd040f8fc1da582a6c782cf5a9 by Vlad Zahorodnii. Committed on 04/10/2021 at 05:58. Pushed by vladz into branch 'Plasma/5.23'. scene: Handle Xwayland windows changing surfaces Xwayland can re-create the wl_surface if the window has been previously unmapped. Related: bug 442936 (cherry picked from commit 8ac93a59ffb1a09bf6df46c7012bea7910e6b883) M +23 -19 src/windowitem.cpp https://invent.kde.org/plasma/kwin/commit/626b5b4c0d30b0bd040f8fc1da582a6c782cf5a9 |