-
Notifications
You must be signed in to change notification settings - Fork 22
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
Switch to wlr scene-graph #50
Conversation
Definitely looks interesting, not sure what convinced them to use stuff from gamedev and vector graphics editors in 2d linux and bsd desktops though, Scene-graph is widely used practice in game engines and programs in style of Adobe Illustrator to easier view data structure, mayby it makes sense for them 🤔. |
Here’s a basic-tasks checklist i’ve managed to think of; pls let me know / edit if you come up with something more.
|
kiwmi/desktop/view.c
Outdated
// why does it have to be unsigned? and why can it be negative, then? | ||
view_set_pos(struct kiwmi_view *view, uint32_t x, uint32_t y) |
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.
Unrelated, but this has been a mystery for me. Could you explain please?
Cleaned up the commit history so that it should now be easier to understand. However, there are still things to be done (see checklist in PR description). |
This force-push is mostly renaming stuff and moving commits around iirc; there should be no real changes. |
The PR is ready for review, and if everything is okay, also for merge. |
This force-push is mostly splitting commits; only minimal changes. |
KIWMI_STRATUM_LS_TOP, | ||
KIWMI_STRATUM_LS_OVERLAY, | ||
KIWMI_STRATUM_POPUPS, |
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.
Other compositors have top, normal popups, fulscreen, overlay, overlay popups, but since kiwmi doesn’t support client-initiated fulscreen, i left it like this.
(This is just a note for later ig.)
Also handle NULL output in output_damage(). Co-authored-by: Uks2 <[email protected]>
This is a preparation for switching to the wlroots scene-graph. There is no replacement planned for output:redraw() because it will no longer be necessary (as far as i can tell), while scene-compatible replacements for the view pre_render/post_render events are planned.
With the migration to wlr_scene, some objects (desktop, output etc) will no longer have any reason to care about individual shells and similar; handling each one on its own would introduce code that is, from their perspective, over-complicated. Strata (sg. stratum; this name was chosen to avoid confusion with the over-used 'layer') represent logical layers of surfaces on the desktop, such as every layer shell layer, one for xdg shell, another for popups.
At the moment it isn't used at all and a lot of data is duplicated. This is a temporary state introduced for nicer diff separation into several commits.
Apart from removing a lot of code, this commit also introduces (thanks to wlr_scene) fine-grained damage tracking. The lack of our own rendering code will only be an issue if the need for custom effects (such as blur) arises; however, that's very unlikely and it would probably require a lot of changes anyway.
Use it for getting the surface under cursor, position of surfaces, etc.
Thank you very much! |
It is still far from done, but apart from (not) raising view on focus it should be at least usable.Depends on #44 (current commits from there are included) and wlroots 0.15 release.TODOs –