-
Notifications
You must be signed in to change notification settings - Fork 180
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
[WIP] Upgrade to wayland-rs 0.20 #88
Conversation
30f1b5a
to
e44b0e5
Compare
Okay, with this the porting should be complete. r? @Drakulix 😄 |
With this last commit, we can even work around the rustc bug, and retrieve all functionality 🎉 |
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.
Looks nice, just some minor comments.
Overall I like the API a lot more! 👍
examples/udev.rs
Outdated
@@ -435,14 +421,15 @@ fn main() { | |||
libinput_event_source.remove(); | |||
|
|||
// destroy the udev backend freeing the drm devices | |||
udev_event_source.remove().close(&mut event_loop) | |||
udev_backend = *(downcast_impl(udev_event_source.remove()).unwrap_or_else(|_| unreachable!())); |
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.
Maybe put a small explanation here, what this does?
@@ -48,11 +49,13 @@ pub struct UdevBackend< | |||
S: Session + 'static, | |||
T: UdevHandler<H> + 'static, | |||
> { | |||
devices: Rc<RefCell<HashMap<dev_t, FdEventSource<(DrmDevice<SessionFdDrmDevice>, H)>>>>, | |||
_handler: ::std::marker::PhantomData<H>, |
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.
Is there a good reason to keep this type parameter? Otherwise lets just drop it, if it is not required anymore.
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.
The reason to keep it is because it appears in the T: UdevHandler<H>
constraint.
It may be possible to remove it, but I expect it'd require a significant refactor.
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.
Well than lets skip that for now.
src/wayland/shell/legacy/mod.rs
Outdated
//! This module provides automatic handling of shell surfaces objects, by being registered | ||
//! as a global handler for `wl_shell`. This protocol is deprecated in favor of `xdg_shell`, | ||
//! thus this module is provided as a compatibility layer with older clients. As a consequence, | ||
//! you can as a compositor-writer decide to only support its fonctionnality in a best-effort |
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.
fonctionnality
Looks good for merge! |
Alright then, let's go ! |
Update primary scanout output when not visible on previous output
This is an on-going work to upgrade smithay to the new incoming wayland-rs 0.20 API. Doing this work allows me to find out what is bad/missing from wayland-rs API, notably.
TODO: