Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

surface: add WLR_SURFACE_STATE_SUBSURFACES #3170

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

emersion
Copy link
Member

@emersion emersion commented Sep 6, 2021

This allows to figure out when the subsurface list has changed:
subsurface added, removed, or re-ordered. In the case where
the subsurface list hasn't changed, some book-keeping operations
can be skipped.

Useful for #3128

cc @vyivel

This allows to figure out when the subsurface list has changed:
subsurface added, removed, or re-ordered. In the case where
the subsurface list hasn't changed, some book-keeping operations
can be skipped.
@@ -698,6 +701,7 @@ static void subsurface_destroy(struct wlr_subsurface *subsurface) {
wl_list_remove(&subsurface->surface_destroy.link);

if (subsurface->parent) {
subsurface->parent->pending.committed |= WLR_SURFACE_STATE_SUBSURFACES;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subsurfaces are destroyed instantly, their removal isn't double-buffered.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I'd still like to give the caller a chance to figure out that the subsurface list changed…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think callers should simply listen to new_subsurface/destroy signals, and WLR_SURFACE_STATE_SUBSURFACES should be left as an optimization thing.

@emersion
Copy link
Member Author

emersion commented Nov 1, 2021

wlroots has migrated to gitlab.freedesktop.org. This pull request has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3170

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants