Cairo-Dock / cairo-dock-core

Core part of Cairo-Dock project.
http://glx-dock.org
GNU General Public License v3.0
186 stars 46 forks source link

[LP1943052] wayland-manager: allocate new wl_output information by checking id #12

Open mtasaka opened 2 years ago

mtasaka commented 2 years ago

With KDE Plasma Wayland session, after calling wl_output_add_listener() and waiting for wl_output information with wl_display_roundtrip(), wl_output::mode info is returned before wl_output::geometry info.

Current cairo-dock-wayland-manager logic expects the opposite order, and on KDE session this causes cairo-dock segfault.

To avoid this, when collecting wl_output information, we should also check "id" member of global registry object associated with that wl_output info, check if the "id" is already the duplicates of the old infos.

Then if the "id" is new one, then allocate the new buffer to register new wl_output information beforehand, then call wl_display_roundtrip() to gain wl_output::geometry or wl_output::output information.

Should fix https://bugs.launchpad.net/cairo-dock-core/+bug/1943052

rafaellancas commented 2 years ago

How do I do that?

yarons commented 1 year ago

Maybe I should switch to the cairo-dock-git package to resolve this.

dkondor commented 4 months ago

Hi, this should be fixed by #16 which was just merged and includes a lot of Wayland-related changes (I tested with KWin 5.24). Could you also re-test? Thanks!