Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a wp_viewporter implementation #397

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants