https://bugs.kde.org/show_bug.cgi?id=456349
Bug ID: 456349 Summary: Incorrect emission of error "xdg_wm_base was destroyed before children" with multiple xdg_wm_base globals Product: kwin Version: 5.24.5 Platform: Debian testing OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: wayland-generic Assignee: kwin-bugs-n...@kde.org Reporter: alexandros.frant...@collabora.com Target Milestone: --- Created attachment 150407 --> https://bugs.kde.org/attachment.cgi?id=150407&action=edit Minimal wayland client to reproduce issue SUMMARY When a client creates multiple xdg_wm_base globals on the same connection (e.g., by getting multiple wl_registries), xdg_surface objects created from each xdg_wm_base should only be associated with that xdg_wm_base global. However, under kwin there seems to be some kind of incorrect xdg_surface association happening, as shown in the following pseudocode example of a client: > reg1 = wl_display_get_registry(display); > reg2 = wl_display_get_registry(display); > wl_display_roundtrip(display); > > surf = wl_compositor_create_surface(reg1.wl_compositor); > xdg_surf = xdg_wm_base_get_xdg_surface(reg1.xdg_wm_base, surf); > > xdg_wm_base_destroy(reg2.xdg_wm_base); > /* ^^ Protocol error "xdg_wm_base was destroyed before children" under kwin, > * even though no xdg_surface was created from reg2.xdg_wm_base! */ Attached is a minimal wayland client that tests the aforementioned scenario. STEPS TO REPRODUCE 1. Downloads attached minimal reproducer, extract tar.gz, ensure wayland libraries, wayland-protocols and wayland-scanner are installed 2. cd kwinbug && make 3 ./kwinbug OBSERVED RESULT The program under kwin leads to a protocol error: > Created wl_registry@2 xdg_wm_base@5 > Created wl_registry@3 xdg_wm_base@8 > Creating xdg_surface from xdg_wm_base@5... > Creating xdg_surface from xdg_wm_base@5... done > Destroying xdg_wm_base@8... > [destroyed object]: error 1: xdg_wm_base was destroyed before children > Destroying xdg_wm_base@8... done > Finished! EXPECTED RESULT No protocol error is emitted. Tested on mutter, weston, sway and mir. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.24.5 Qt Version: 5.15.4 -- You are receiving this mail because: You are watching all bug changes.