Skip to content
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

How to get the wlr_scene_node of a spawned client #369

Open
ZirixCZ opened this issue Oct 28, 2024 · 2 comments
Open

How to get the wlr_scene_node of a spawned client #369

ZirixCZ opened this issue Oct 28, 2024 · 2 comments

Comments

@ZirixCZ
Copy link
Contributor

ZirixCZ commented Oct 28, 2024

I'm attempting to implement the splash screen functionality mentioned in #366. I got stuck on getting the wlr_scene_node of the spawned client. Looking on the tinywl implementation did not help. Here's my WIP code. There's a line number in the link leading to the function I need the node for. ZirixCZ@29acde5#diff-59cf298203b513bf1fca0344f379fd54feac89ed89fb7c083ae558a34b7079e3R640

It is for the wlr_scene_node_raise_to_top which I believe is just what I need to make this all work. Right now, even though I launch the splash screen first, the second, slow app, will always display over it.

@emersion
Copy link
Contributor

emersion commented Nov 7, 2024

#366 is not about running a splash screen application inside cage before the final application starts up. It's about leaving alone the last image displayed by the previous DRM master (plymouth) until the final application submits its first frame.

@ZirixCZ
Copy link
Contributor Author

ZirixCZ commented Nov 7, 2024

I am fully aware that my solution could not be used in production. It simply is something I want to try implementing. I'd like to show an overlay (or a splash client) for a set period of time (not until the main client commits, since it can commit a loading state of its own and it'd also introduce more complexity). I got stuck on implementing the wlr_scene_node_raise_to_top function. Though now I figured that calling this function wouldn't make the window be in front at all the times, since the slow app would overlay on top of it when it commits for the first time I believe. The idea was to call wlr_scene_node_raise_to_top in xdg_shell with the splash node everytime toplevel changes.
Is there a better way to make one client always be on the top level? Thanks.

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

No branches or pull requests

2 participants