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.17 #281

Merged
merged 18 commits into from
Jan 26, 2024
Merged

wlroots 0.17 #281

merged 18 commits into from
Jan 26, 2024

Conversation

kennylevinsen
Copy link
Contributor

Makes cage build against wlroots master. We are still lacking an output request_state handler though.

@OctopusET
Copy link
Contributor

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3527
wlroots 0.17 is coming

@kennylevinsen kennylevinsen force-pushed the scene_upgrade branch 2 times, most recently from 50fb260 to 32e41af Compare November 21, 2023 18:35
@joggee-fr
Copy link
Collaborator

I have just checked it very very quickly. Hope I could give it a try soon.
At least, wlroots dependency must also be updated in meson.build and GitHub CI.

@kennylevinsen
Copy link
Contributor Author

Build fails on not being able to find xwayland for some reason, will take a look at that later.

@OctopusET
Copy link
Contributor

OctopusET commented Nov 22, 2023

You can fix CI like this. Change xwayland alpine package to xwayland-dev
OctopusET@850dcd6

But there's other compile errors

@OctopusET
Copy link
Contributor

https://github.com/OctopusET/cage/actions/runs/6953804611/job/18919514519

Here are the compile error logs.
I changed CI config to continue other jobs even one job fails. #291

@OctopusET
Copy link
Contributor

This sway patch will be helpful for fixing this compile error. wlroots changed map/unmap behaviors.
https://github.com/swaywm/sway/pull/7498/files

It's also included on their breaking changes of 0.17.0 release (https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.17.0)

wlroots MR: compositor: unify map logic (https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4043)

@kennylevinsen kennylevinsen force-pushed the scene_upgrade branch 3 times, most recently from e27edad to 46a80d2 Compare November 22, 2023 16:47
@kennylevinsen kennylevinsen changed the title Chase wlroots changes wlroots 0.17 Nov 22, 2023
@kennylevinsen
Copy link
Contributor Author

This sway patch will be helpful for fixing this compile error. wlroots changed map/unmap behaviors. https://github.com/swaywm/sway/pull/7498/files

Indeed, I had missed the xwayland portion of this in chore: Use new map/unmap locations because I had not enabled Xwayland locally.

Should be all good now.

seat.c Show resolved Hide resolved
seat.c Show resolved Hide resolved
output.c Show resolved Hide resolved
@@ -191,19 +191,6 @@ handle_output_commit(struct wl_listener *listener, void *data)
}
}

static void
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reading release notes for wlroots 0.17.0, it seems the WLR_OUTPUT_STATE_MODE flag is not expected to be handled in handle_output_commit()?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, we need to add WLR_OUTPUT_STATE_MODE to OUTPUT_CONFIG_UPDATED.

Maybe we also need to view_position_all()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are no longer expected to monitor mode changes in the commit handler, as this has moved to request_state.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, we still need to notify wlr-output-management-v1 clients of mode changes: #297

@emersion
Copy link
Contributor

Nit: please avoid using prefixes such as "chore", this isn't something we do in cage.

@kennylevinsen
Copy link
Contributor Author

The chore commits are gone - coming up with good summaries for all those commits was by far the hardest part of this PR...

xwayland.c Outdated
@@ -167,9 +167,9 @@ handle_xwayland_surface_new(struct wl_listener *listener, void *data)
xwayland_view->xwayland_surface = xwayland_surface;

xwayland_view->map.notify = handle_xwayland_surface_map;
wl_signal_add(&xwayland_surface->events.map, &xwayland_view->map);
wl_signal_add(&xwayland_surface->surface->events.map, &xwayland_view->map);
Copy link
Contributor

Choose a reason for hiding this comment

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

So… Unfortunately this won't work :/ the surface is not available before the associate event fires, and becomes invalid when the dissociate event fires…

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah sorry, had missed that.

@emersion
Copy link
Contributor

"ci: No need to test multiple compilers": can we discuss this separately maybe?

@emersion
Copy link
Contributor

"output: Implement request_state event listener": hmm, instead of having to call the config update function everytime we might need to, I'd prefer to keep the output commit event handler. That would avoid mistakes where we forget to update the config.

kyechou added a commit to kyechou/aur-cage-git that referenced this pull request Jan 16, 2024
@emersion
Copy link
Contributor

Any chance you have some time to have a look at this again @kennylevinsen?

@kennylevinsen kennylevinsen force-pushed the scene_upgrade branch 2 times, most recently from 28bfc0f to 34d2cf1 Compare January 26, 2024 22:24
This is replaced by monitoring for WLR_OUTPUT_STATE_MODE on commit.
For xwayland we must listen on associate/dissociate to set up and tear
down the map/unmap event handlers instead of during surface
create/destroy.
The latter implemented the KDE protocol which has been dropped.
wlroots as a subproject now yields the xwayland meson option to its
parent. We need to match the type for this to work. This also adds
support for auto mode, where xwayland is used if present but no warning
is given otherwise.
wlroots backends no longer change state on their own, and instead send a
request_state event. Monitor this event and apply any state we receive.
We previously used the wlr_output's built-in pending state and
wlr_output_rollback. The modern state API is much nicer.
@kennylevinsen
Copy link
Contributor Author

Any chance you have some time to have a look at this again @kennylevinsen?

Sorry, had missed the notification for comments!

"output: Implement request_state event listener": hmm, instead of having to call the config update function everytime we might need to, I'd prefer to keep the output commit event handler. That would avoid mistakes where we forget to update the config.

Not a big fan of checking things over and over when something is only rarely triggered from a few explicit places. Either way, I reverted to the commit handler.

Copy link
Contributor

@emersion emersion left a comment

Choose a reason for hiding this comment

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

Thanks!

@emersion emersion merged commit 8a00921 into cage-kiosk:master Jan 26, 2024
10 checks passed
@kennylevinsen kennylevinsen deleted the scene_upgrade branch January 26, 2024 23:05
kyechou added a commit to kyechou/aur-cage-git that referenced this pull request Jan 29, 2024
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.

4 participants