-
Notifications
You must be signed in to change notification settings - Fork 170
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 wayland-server to 0.31 #1115
Conversation
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.
Still blocked, but code wise looks good to me. :)
5df2af0
to
0394e34
Compare
0394e34
to
2aec201
Compare
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.
DRM code looks good!
(I already had a nix update in #1132 but nevermind 😅)
if let Err(e) = socket::bind(fd, &addr) { | ||
let _ = ::nix::unistd::close(fd); | ||
if let Err(e) = socket::bind(fd.as_raw_fd(), &addr) { | ||
let _ = ::nix::unistd::close(fd.as_raw_fd()); |
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.
So socket
now returns an OwnedFd
, would this cause a double close? Or more specifically, why do we still close it manually?
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.
It could use into_raw_fd
, but yeah, there should be no reason to call close
manually with OwnedFd
s.
if let Err(e) = socket::listen(fd, 1) { | ||
let _ = ::nix::unistd::close(fd); | ||
if let Err(e) = socket::listen(&fd, 1) { | ||
let _ = ::nix::unistd::close(fd.as_raw_fd()); |
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.
see above
return Err(e); | ||
} | ||
Ok(unsafe { FromRawFd::from_raw_fd(fd) }) | ||
Ok(unsafe { FromRawFd::from_raw_fd(fd.as_raw_fd()) }) |
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.
Ok(unsafe { FromRawFd::from_raw_fd(fd.as_raw_fd()) }) | |
Ok(fd.into()) |
Also implements From<OwnedFd>
. The current approach would drop fd
afterwards and close the file descriptor we just created the unix socket from.
Based on #1108
Blocked on Smithay/gbm.rs#26
This is a pretty boring PR, mostly just fixing the prototypes of the methods that changed.
I tested that anvil still runs and is able to display weston-terminal.