Skip to content

Conversation

linkmauve
Copy link

This simplifies client code quite a bit.

This makes it easier to use from clients, they don’t have to create
their SimpleGlobal any longer.
It simplifies the code quite a bit.
Comment on lines +90 to +100
/*
/// Set the source rectangle.
pub fn set_source(&self, x: f64, y: f64, width: f64, height: f64) {
self.viewport.set_source(x, y, width, height);
}

/// Set the destination size.
pub fn set_destination(&self, width: i32, height: i32) {
self.viewport.set_destination(width, height);
}
*/
Copy link
Member

Choose a reason for hiding this comment

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

Can we uncomment those?
It would be good to use this wrapper instead of WlVieporter directly, as that would allow for addition of version guards when a new version of viewporter releases some day.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any point to Viewport to begin with? Just getting the viewport from the state and using that is all you need really. My personal implementations never used more than that (https://github.com/catacombing/kumo/blob/master/src/wayland/protocols/viewporter.rs).

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.

3 participants