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

xdg shell: remove wlr_xdg_surface_for_each_popup() #2610

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

ifreund
Copy link
Member

@ifreund ifreund commented Jan 7, 2021

This function is not well suited to rendering as it does not iterate
over subsurfaces. Therefore, it makes little sense to use the standard
surface iterator function. Introduce an new xdg-popup iterator function
and use that instead.

This function is inferior to wlr_xdg_surface_for_each_popup_surface()
for rendering as it does not iterate over subsurfaces. Furthermore,
no compositor known to use this to iterate popups for any purpose other
than rendering. Therefore remove the function which may of course be
reintroduced at a later date if a use-case is found.


Breaking change: wlr_xdg_surface_for_each_popup has been removed, use wlr_xdg_surface_for_each_popup_surface instead.

@ifreund
Copy link
Member Author

ifreund commented Jan 7, 2021

We should consider simply removing this function instead if #2609 is accepted. I don't know of any use case for iterating popups in a compositor aside from rendering.

@emersion
Copy link
Member

emersion commented Jan 7, 2021

I agree. We can always re-introduce the function if a compositor finds a use-case.

@emersion emersion added the breaking Breaking change in public API label Jan 7, 2021
@ifreund ifreund changed the title xdg shell: clean up popup iterator API xdg shell: remove wlr_xdg_surface_for_each_popup() Jan 7, 2021
@ifreund
Copy link
Member Author

ifreund commented Jan 7, 2021

Sounds good to me, I changed the commit to remove this function instead.

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

LGTM, will wait a few days in case someone wants to object.

@emersion
Copy link
Member

emersion commented Jan 8, 2021

(Needs a rebase.)

Sway pull request: swaywm/sway#5937

This function is inferior to wlr_xdg_surface_for_each_popup_surface()
for rendering as it does not iterate over subsurfaces. Furthermore,
no compositor is known to use this to iterate popups for any purpose
other than rendering. Therefore remove the function, which may of course
be reintroduced at a later date if a use-case is found.
@emersion emersion merged commit f574ca9 into swaywm:master Jan 12, 2021
@emersion
Copy link
Member

Thanks!

@ifreund ifreund deleted the xdg-pop-iter-cleanup branch January 12, 2021 10:40
@emersion emersion mentioned this pull request Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change in public API
Development

Successfully merging this pull request may close these issues.

2 participants