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

wlroots 0.16.0 #109

Merged
merged 51 commits into from
Feb 20, 2023
Merged

wlroots 0.16.0 #109

merged 51 commits into from
Feb 20, 2023

Conversation

m-col
Copy link
Collaborator

@m-col m-col commented Nov 13, 2022

Most things listed in #108 are complete.

Using Qtile to test everything, I'm struggling to get Internal windows working, which mostly pertains to wlr_buffers, wlr_textures, and wlr_allocator. Still fiddling with these.

Then lastly tinywl will need updating.

@m-col
Copy link
Collaborator Author

m-col commented Nov 13, 2022

Looks like I got the git history messed up at some point, likely starting this branch from a non-main local branch. Ignore the first 10 commits.

@m-col m-col force-pushed the 0.16.0 branch 2 times, most recently from 3c158c1 to 88b501d Compare November 13, 2022 01:11
@m-col m-col mentioned this pull request Dec 30, 2022
@m-col m-col force-pushed the 0.16.0 branch 2 times, most recently from 1c57517 to 32dc26f Compare January 6, 2023 18:55
@m-col m-col marked this pull request as ready for review January 9, 2023 08:45
@m-col
Copy link
Collaborator Author

m-col commented Jan 9, 2023

Marked ready for review as I've covered most ground for the update and have qtile working with these changes (qtile/qtile#3985). While my questions above still stand (as I still sometimes get confused as to which objects need weafreffing), the half-guesses I've made WRT weakrefs do work, so my above questions could be ignored if that expediates review/merge etc.

As for failed github actions, it seems 2 of them pertain to issues setting up wlroots master, and the protocol header test, which I haven't touched - could that be unrelated?

@flacjacket
Copy link
Owner

Awesome! I'll check this out, but we should also be able to just merge and iterate on it until it gets to a working state. The protocols headers test probably just needs the protocol include files to be regenerated since the wlroots headers were updated (with python ./check_headers.py --generate), but I see that is also failing on master.

setup.cfg Outdated Show resolved Hide resolved
wlroots/wlr_types/buffer.py Outdated Show resolved Hide resolved
wlroots/wlr_types/compositor.py Outdated Show resolved Hide resolved
wlroots/wlr_types/compositor.py Outdated Show resolved Hide resolved
wlroots/wlr_types/output_layout.py Outdated Show resolved Hide resolved
@m-col m-col requested a review from flacjacket January 22, 2023 17:41
@m-col
Copy link
Collaborator Author

m-col commented Feb 6, 2023

Pushed a couple more commits. Most are minor changes and fixes. The more interesting one is 771e705 which changes out setting the .data member on structs works. The trouble I was running into was doing something like this:

self.tree.node.data = some_object.some_data

because of how we wrap objects, the objects created by some_object.some_data and self.tree.node are both ephemeral, so keeping the new handle for the former as an attribute on the latter didn't really work. Using a weakkeydict can also be difficult in this situation, because what persists as a key? The two objects and the handle are all ripe for garbage collection after the property setter returns. So as a solution for when this situation happens, I've updated the setter so that one can pass a pre-made handle. This way I can create, say, a handle for each window in the compositor, then pass that handle around to set the data, and the window keeps the handle alive. If instead a user wants to pass in a python object and have the handle made for them, the handle is kept alive in the weakkeydict for as long as the python object is alive, which they would then be responsible for.

@m-col
Copy link
Collaborator Author

m-col commented Feb 16, 2023

Nvm above Q about weakrefs, I think I got it sorted now.

This PR is ready to go. I think the failures are unrelated.

@flacjacket
Copy link
Owner

flacjacket commented Feb 16, 2023 via email

Copy link
Owner

@flacjacket flacjacket left a comment

Choose a reason for hiding this comment

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

Looks good! Lets get this in!

@flacjacket flacjacket merged commit d92ac72 into flacjacket:main Feb 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants