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

xdg shell: add wlr_xdg_surface_for_each_popup_surface() #2609

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

ifreund
Copy link
Member

@ifreund ifreund commented Jan 7, 2021

Omitting these is a bug. Firefox for example only renders stuff to
the subsurfaces of its popups for whatever reason.

When rendering, it is necessary to iterate the subsurfaces as well,
so add a function that makes this easy.

@emersion
Copy link
Member

emersion commented Jan 7, 2021

Ah, but this is about wlr_xdg_surface_for_each_popup. This one only iterates over xdg-popup surfaces, nothing else.

Use wlr_xdg_surface_for_each_surface to iterate over the whole surface tree.

@ifreund
Copy link
Member Author

ifreund commented Jan 7, 2021

I've changed this commit to introduce a new function suitable for rendering instead of modifying the existing one.

The API of the existing function is cleaned up in #2610.

@ifreund ifreund changed the title xdg shell: call popup iterator on subsurfaces xdg shell: add wlr_xdg_surface_for_each_popup_surface() Jan 7, 2021
When rendering, it is necessary to iterate the subsurfaces as well,
so add a function that makes this easy.
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, thanks!

Can you send a PR to rename wlr_layer_surface_v1_for_each_popup as well?

@emersion emersion merged commit c5c5ab9 into swaywm:master Jan 8, 2021
emersion added a commit to emersion/sway that referenced this pull request Jan 8, 2021
Instead of calling wlr_xdg_surface_for_each_popup and then
wlr_surface_for_each_surface, use the new for_each_popup_surface helper
introduced in [1] that does it in one go.

[1]: swaywm/wlroots#2609
@ifreund ifreund deleted the xdg-pop-iter branch January 8, 2021 09:56
@ifreund
Copy link
Member Author

ifreund commented Jan 8, 2021

Can you send a PR to rename wlr_layer_surface_v1_for_each_popup as well?

#2617

emersion added a commit to swaywm/sway that referenced this pull request Jan 12, 2021
Instead of calling wlr_xdg_surface_for_each_popup and then
wlr_surface_for_each_surface, use the new for_each_popup_surface helper
introduced in [1] that does it in one go.

[1]: swaywm/wlroots#2609
GorrillaRibs pushed a commit to GorrillaRibs/sway-borders that referenced this pull request Jan 17, 2021
Instead of calling wlr_xdg_surface_for_each_popup and then
wlr_surface_for_each_surface, use the new for_each_popup_surface helper
introduced in [1] that does it in one go.

[1]: swaywm/wlroots#2609
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.

None yet

2 participants