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

Implement the xwayland shell protocol #1351

Merged
merged 1 commit into from
May 9, 2024

Conversation

colinmarc
Copy link
Contributor

Depends on #1350 (but only trivially).

The xwayland shell protocol moves the responsibility of setting the "xwayland_surface" role on the wl_surface from the x11 side of the connection to the wayland side. Among other things, this avoids the xwm racing the lifecycle of the surface.

Since we can check the serial with a commit hook, this also removes the need for a ugly idle callback in the Xwm, and may allow for better separation of concerns in the future, for example moving the association state tracking out of Xwm.

Without the idle callback, we may be able to remove the hard dependency on calloop in the xwayland stack (which is my ulterior motive). It's still required for send_selection - I'll attempt to figure those issues out in another PR.

@colinmarc colinmarc force-pushed the xwayland-shell branch 2 times, most recently from f227c27 to 64ebcfa Compare March 3, 2024 09:43
@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.49%. Comparing base (fe04633) to head (861dab7).
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1351      +/-   ##
==========================================
- Coverage   20.61%   19.49%   -1.12%     
==========================================
  Files         161      161              
  Lines       26152    26017     -135     
==========================================
- Hits         5390     5072     -318     
- Misses      20762    20945     +183     
Flag Coverage Δ
wlcs-buffer ?
wlcs-core 17.38% <100.00%> (-0.33%) ⬇️
wlcs-output ?
wlcs-pointer-input 19.26% <100.00%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@colinmarc
Copy link
Contributor Author

Rebased and removed the anvil hack. This is only blocked on #1350 now (although I could separate it out if you really want).

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Some nitpicks, overall this is quite clean and I like the implementation a lot.

@colinmarc colinmarc force-pushed the xwayland-shell branch 3 times, most recently from d7d634c to 73eb19b Compare April 25, 2024 21:10
@colinmarc colinmarc force-pushed the xwayland-shell branch 2 times, most recently from 8e51e33 to 3c7d41c Compare May 8, 2024 06:25
@colinmarc
Copy link
Contributor Author

CI failures appear unrelated.

@Drakulix
Copy link
Member

Drakulix commented May 8, 2024

CI failure should be fixed by https://github.com/Smithay/smithay/pull/1424/files, can you rebase?

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Good to go, once CI passes. Thanks for putting in all the work!!

...and use it to associate wl_surfaces to X11 surfaces.

The xwayland shell protocol moves the responsibility of setting the
"xwayland_surface" role on the wl_surface from the x11 side of the connection to
the wayland side. Among other things, this avoids the xwm racing the lifecycle
of the surface.

Since we can check the serial with a commit hook, this also removes the need for
a ugly idle callback in the Xwm, and may allow for better separation of concerns in the
future, for example moving the association state tracking out of Xwm.
@PolyMeilex PolyMeilex merged commit 4838c9a into Smithay:master May 9, 2024
13 checks passed
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