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

layer-shell: add ping/pong #90

Closed
wants to merge 1 commit into from

Conversation

ifreund
Copy link
Member

@ifreund ifreund commented Jul 1, 2020

This mechanism is similar to the one already in use by xdg-shell, with
the added specification that the server may use this in order to achieve
frame-perfection when creating new outputs on which layer-shell clients
wish to create a new layer surface.

Consider this an alternative to #86. I'm not entirely sure which approach is preferable.

This mechanism is similar to the one already in use by xdg-shell, with
the added specification that the server may use this in order to achieve
frame-perfection when creating new outputs on which layer-shell clients
wish to create a new layer surface.
create a new layer surface in response to the creation of a new
output global, the client should make the get_layer_surface request
immediately on receiving the wl_registry.global event with the new
output and before processing any further events.
Copy link
Member

@emersion emersion Jul 2, 2020

Choose a reason for hiding this comment

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

Hm. There is one issue with this approach though: if the client needs to preform more requests to decide whether to create a new layer-shell surface or not. A classic example of this is a client that only creates a layer-shell surface on an output named "DP-1": the client would need to retrieve the output name via xdg-output prior to creating the layer surface.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's a problem. I think we may need to go with the special purpose new_output/ack_new_output version because of this. However a ping/pong may also be worth adding for other use cases (and without this special language).

@davidedmundson
Copy link

XDG Shell's ping/pong is on the wm_base global, so not tied to creating an xdg_surface object. That makes it usable in combination with layer-shell already.

The only difference is that arguably a client could not bind to the wm_base effectively making it client-side optional; but that should be fine for the case described.

@emersion
Copy link
Member

That's true. layer-shell has a dependency on xdg-shell already for popups, so IMHO it's fine to rely on xdg-shell for ping/pong.

@ifreund
Copy link
Member Author

ifreund commented Aug 20, 2020

Yeah, that makes sense to me. I'm going to go ahead and close this.

@ifreund ifreund closed this Aug 20, 2020
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.

3 participants