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

Update smithay-client-toolkit to v0.18 #5276

Closed
wants to merge 20 commits into from
Closed

Conversation

deviant
Copy link
Contributor

@deviant deviant commented Apr 8, 2024

SCTK v0.18 includes some changes to how cursors are set, which fixes not being able to change the cursor when XCURSOR_THEME is unset (and emitting an error message about this once every frame). Probably fixes #5071 and #4604, and, I think, #5209. Needs testing on GNOME to see if #3106 or #2687 are fixed by this (GNOME unfortunately does not yet implement the cursor-shape-v1 protocol), but that's obviously not a blocker.

@deviant
Copy link
Contributor Author

deviant commented Apr 9, 2024

This appears to break the primary selection, and I'm not sure why. However, I've noticed that the update also has a new delegate_primary_selection macro, which I'm looking into currently.

@deviant deviant marked this pull request as draft April 9, 2024 07:04
Also converts other DataDevice-handling code to use Read/WritePipe
instead of the FileDescriptor API.
rust-analyzer can't find the standard library source code otherwise.
@deviant
Copy link
Contributor Author

deviant commented Apr 9, 2024

This is now complete, and the primary selection works once again. 😊 Pipe handling is a little cleaner as well, and there aren't quite as many unsafe blocks dotted around.

@deviant deviant marked this pull request as ready for review April 9, 2024 09:01
@deviant
Copy link
Contributor Author

deviant commented Apr 12, 2024

Fixed an existing crash that occurred when switching TTYs. Looks like someone else has found and tried to fix this (#5173), but this implementation is more complete (handles loss of each different capability type, not just keyboard) and more correct (releases the associated resources). Should resolve #5154 and #5079.

@deviant
Copy link
Contributor Author

deviant commented May 3, 2024

Fixed a rare, latent crash in code which assumed that capabilities couldn't be lost, uncovered by the previous fix.

@deviant
Copy link
Contributor Author

deviant commented May 3, 2024

@wez Would it be possible to take a look at this? I've been running this (specifically, cce0706 plus this patchset) daily for the past few weeks and not run into any issues (besides the ones I've provided fixes for).

Copy link
Owner

@wez wez left a comment

Choose a reason for hiding this comment

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

Thanks for this!
Just one comment about an unwrap that would be good to avoid.
I did quickly test this against weston running in X and it seemed to startup and be basically functional, so it looks good!

match capability {
Capability::Keyboard => {
log::trace!("Lost keyboard capability");
self.keyboard.take().unwrap().release();
Copy link
Owner

Choose a reason for hiding this comment

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

Please avoid the unwrap for this; I'm assuming that this will work:

Suggested change
self.keyboard.take().unwrap().release();
self.keyboard.take().map(|p| p.release());

@wez
Copy link
Owner

wez commented May 4, 2024

I'll fixup the unwrap and merge this, otherwise it may be a while before I get back to it!

wez added a commit that referenced this pull request May 4, 2024
wez added a commit that referenced this pull request May 4, 2024
wez added a commit that referenced this pull request May 4, 2024
@wez
Copy link
Owner

wez commented May 4, 2024

I rebased and pushed to main, thanks!

@wez wez closed this May 4, 2024
@deviant deviant deleted the sctk-0.18 branch May 4, 2024 23:19
@deviant
Copy link
Contributor Author

deviant commented May 4, 2024

Some of the issues I linked in the initial comment can be closed as well now, I don't think they get auto-closed when the commits are merged in manually and the enclosing PR closed.

@deviant
Copy link
Contributor Author

deviant commented May 4, 2024

Same with the issues/PR linked in #5276 (comment)

@woojiq
Copy link

woojiq commented May 5, 2024

I think these issues can be closed too:
#5363 #5311 #5299 #5258 #5255
They were created recently and have similar description (but I haven't tested each separately).
@deviant , am I right?

@wez
Copy link
Owner

wez commented May 5, 2024

I closed those as duplicates, thanks for pointing me to them!

@deviant
Copy link
Contributor Author

deviant commented May 8, 2024

I think these issues can be closed too: #5363 #5311 #5299 #5258 #5255 They were created recently and have similar description (but I haven't tested each separately). @deviant , am I right?

I've taken a look and am unsure: it's possible that hyprland and river support will have been improved with the dependency bump, but I also don't use either of these compositors— and the errors reported don't seem familiar to me. I guess we'll see if people report seeing further issues.

@Cu3PO42
Copy link

Cu3PO42 commented May 9, 2024

I do use Hyprland. The reported issues are familiar and were resolved by this PR :-)

saep pushed a commit to saep/wezterm that referenced this pull request Jul 14, 2024
saep pushed a commit to saep/wezterm that referenced this pull request Jul 14, 2024
saep pushed a commit to saep/wezterm that referenced this pull request Jul 14, 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.

Cursor hiding on broken on Wayland
4 participants