-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle destroyed subsurfaces #3199
Conversation
Works fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. Problem with menus is fixed. thanks.
if (child->view->container != NULL) { | ||
view_child_damage(child, true); | ||
} | ||
view_child_destroy(child); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this mean we call view_child_destroy
twice now? view_child_init
already sets up a listener on the surface's destroy event and calls it from the destroy handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have two objects: the wl_surface
itself and the wl_subsurface
. This listener is listening on the subsurface destroy event.
Destructors remove all listeners, so we should be fine if one is called before the other.
Damage subsurfaces when they are destroyed. Since subsurfaces don't have an unmap event we need to do that on destroy. We also don't want to keep a sway_view_child when the wlr_subsurface has been destroyed. Fixes swaywm#3197
c2adeb9
to
fc79b7c
Compare
Works, thanks. |
Thanks! |
Damage subsurfaces when they are destroyed. Since subsurfaces don't have an
unmap event we need to do that on destroy.
We also don't want to keep a sway_view_child when the wlr_subsurface has been
destroyed.
Fixes #3197