]> git.mdlowis.com Git - proto/labwc.git/commit
Ensure xdg and xwayland string_prop() handlers deal with destroying views
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 21 Sep 2023 16:13:44 +0000 (18:13 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 21 Sep 2023 21:16:11 +0000 (22:16 +0100)
commite5d459aa0cf4b173cd37ecc7267591f544c42800
tree5c87b9874fe05d58e3c3c17f20fd10e485174d06
parent44e65e7930588a190f042b741f7cc4cd0254d7f3
Ensure xdg and xwayland string_prop() handlers deal with destroying views

When a view is destroyed (including override_redirect in the xwayland
case), the view_destroy() handler is called which checks for a currently
open A-Tab window switcher and causes an update there to remove the
destroying view from the list. Before view_destroy() is called, both
xwayland and xdg handlers reset the xdg_surface / xwayland_surface.

The window switcher update then creates a list of all windows which do
not have the 'skipWindowSwitcher' window rule property set. If there is
at least one 'matchOnce' window rule configured, this also tries to get
string properties of the destroying view which already had their
xdg_surface / xwayland_surface reset and thus run into an assert.

This patch fixes that so that the string_prop() handlers always return
an empty string in those cases rather than running into the assert.

For a more in-depth analyses and alternative solutions see the linked
issue.

Fixes #1082
src/xdg.c
src/xwayland.c