Cairo-Dock / cairo-dock-core

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

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

Closed mtasaka closed 1 month ago

mtasaka commented 3 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 6 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!

dkondor commented 1 month ago

Closing this as the issue should be resolved in the beta version (3.5.99). Please open a new issue if you still experience this problem.