-
Notifications
You must be signed in to change notification settings - Fork 71
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
Use the wlroots scene-graph API #197
Conversation
This is very nice! Let me know if you need any help, definitely excited about having this in Cage :) |
23ed781
to
629833e
Compare
2736e1e
to
7749855
Compare
ed6c98c
to
0d24e6f
Compare
This is now ready for review: all of the wlroots PRs have been merged! |
This is fantastic! I'll try to review this as soon as possible, but as my wedding is coming up I can't promise anything. |
Wow, congrats! 💐 No worries at all, in any case I think you'll want to wait for a new wlroots release before merging this? |
1301a43 breaks xwayland.c:111:2: warning: implicit declaration of function 'view_damage_part' is invalid in C99 [-Wimplicit-function-declaration]
view_damage_part(view);
^
xwayland.c:120:2: warning: implicit declaration of function 'view_damage_whole' is invalid in C99 [-Wimplicit-function-declaration]
view_damage_whole(view);
^
xwayland.c:143:2: warning: implicit declaration of function 'view_damage_whole' is invalid in C99 [-Wimplicit-function-declaration]
view_damage_whole(view);
^
ld: error: undefined symbol: view_damage_whole
>>> referenced by xwayland.c:143 (xwayland.c:143)
>>> cage.p/xwayland.c.o:(handle_xwayland_surface_map)
>>> referenced by xwayland.c:120 (xwayland.c:120)
>>> cage.p/xwayland.c.o:(handle_xwayland_surface_unmap)
ld: error: undefined symbol: view_damage_part
>>> referenced by xwayland.c:111 (xwayland.c:111)
>>> cage.p/xwayland.c.o:(handle_xwayland_surface_commit)
cc: error: linker command failed with exit code 1 (use -v to see invocation) |
dee886e
to
f1ba664
Compare
Thanks, fixed! |
@emersion I'm working on a Cage-based compositor, and the scene graph API does solve some issues with Cage - for example, visual artifacts when moving between GTK+ 3 menu items (probably a damage tracking issue of some sort). However, it crashes (ignore view.c line numbers, it's slightly modified) with wlroots 1b65a80:
I'm still investigating this, but maybe you'll see something I don't. |
Does this help? swaywm/wlroots#3268 |
So far - nope! Doesn't reproduce. |
Do you mean that this patch fixes the issue? Or do you mean that it doesn't? |
So far I don't see this - tried -fsanitize=address too, and looks like this particular problem doesn't reproduce with the patch. However, I'm not 100% sure how I triggered this condition. |
Dropped a few more things in favor of scene-graph helpers: direct scan-out, per-output surface iterators, and xdg_popup handling. |
This is looking so good! |
@Hjdskes Will this PR be part of the 0.15.0 release of Cage? |
Yes! It is my intention to include this in the next release of Cage that will track wlroots 0.15.0 :) |
cb7d6a5 is no longer enough after wlroots@fdf3169: cage.c:308:13: warning: implicit declaration of function 'wlr_backend_get_renderer' is invalid in C99 [-Wimplicit-function-declaration]
renderer = wlr_backend_get_renderer(server.backend);
^
cage.c:308:11: warning: incompatible integer to pointer conversion assigning to 'struct wlr_renderer *' from 'int' [-Wint-conversion]
renderer = wlr_backend_get_renderer(server.backend);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
ld: error: undefined symbol: wlr_backend_get_renderer
>>> referenced by cage.c:308 (cage.c:308)
>>> cage.p/cage.c.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation) |
@Hjdskes I cannot reproduce. Can you share full debug logs? @iamdavidcz I've opened this wlroots MR to avoid the confusion: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3407 |
- Update wlr_box includes to util/box.h: the wlroots header has been moved upstream. - Subsurface fields have been moved - Create renderer and allocator, stop using wlr_backend_get_renderer - Initalize output rendering
@emersion that's gonna work. What was the rationale behind making libinput optional in wlroots 0.15.0? |
Some compositors are not designed to be run with DRM+libinput, like virtual reality compositors or nested compositors. |
Indeed forcing the libinput backend makes the cursor work & input focus work :) Here's the debug log you requested @emersion: https://gist.github.com/Hjdskes/a1ca59f3637af865dc04e9b091d693f7. This is just a quick Cage session from TTY ( |
With the scene-graph, these are no longer used.
Delegate sub-surface handling to wlr_scene_surface_tree_create. References: swaywm/wlroots#3128
This provides wlr_output_layout integration. References: swaywm/wlroots#3160
It's used only by send_frame_done. Instead of keeping a generic iterator, let's inline it in the only user.
Depends on [1]. [1]: swaywm/wlroots#3279
This is now unused.
We get this for free with wlr_scene.
We get this for free with wlr_scene.
@Hjdskes any chance that this will be merged before Christmas? Can I help with testing somehow? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @emersion!
This is a work-in-progress PR to make use of the upcoming wlroots scene-graph API.
wlr_scene
API to replace the varioussurface_at
functionsReferences: swaywm/wlroots#1966