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

[WIP] Upgrade to wayland-rs 0.20 #88

Merged
merged 25 commits into from
Apr 24, 2018
Merged

[WIP] Upgrade to wayland-rs 0.20 #88

merged 25 commits into from
Apr 24, 2018

Conversation

elinorbgr
Copy link
Member

@elinorbgr elinorbgr commented Apr 13, 2018

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:

  • wayland
    • SHM
    • Compositor
    • Shell
    • Output
    • Seat
  • backend
    • winit
    • libinput
    • drm
    • session

@elinorbgr
Copy link
Member Author

Okay, with this the porting should be complete.

r? @Drakulix 😄

@elinorbgr elinorbgr requested a review from Drakulix April 23, 2018 09:41
@elinorbgr
Copy link
Member Author

With this last commit, we can even work around the rustc bug, and retrieve all functionality 🎉

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.

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!()));
Copy link
Member

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>,
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

//! 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
Copy link
Member

Choose a reason for hiding this comment

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

fonctionnality

@Drakulix
Copy link
Member

Looks good for merge!

@elinorbgr
Copy link
Member Author

Alright then, let's go ! :shipit:

@elinorbgr elinorbgr merged commit 60fc479 into master Apr 24, 2018
@elinorbgr elinorbgr deleted the wayland_rs_20 branch November 12, 2018 14:44
Drakulix added a commit that referenced this pull request Dec 7, 2023
Update primary scanout output when not visible on previous output
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.

2 participants