-
Notifications
You must be signed in to change notification settings - Fork 570
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
Wayland protocol objects versioning & XDG Shell initial size #2254
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.
minor comment otherwise LGTM.
// We don't care about obscure pre version 4 compositors | ||
// and just damage the whole surface instead of | ||
// translating from buffer coordinates to surface coordinates | ||
self.wl_surface.borrow().damage(0, 0, i32::MAX, i32::MAX); |
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.
druid actually uses the damaged region in order to optimize its own drawing, so I think if you damage the whole surface here then you'll end up with a partially rendered window. Which is probably no big deal if all real compositors support this. But I think it at least deserves a warning...
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.
Would self.invalidate()
do the job? The same way we do it for force == true
a few lines abowe.
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.
Yep, I guess that should take care of telling druid that it needs to draw everything. I'm a little confused about that invalidate()
though, because shouldn't we also be calling self.wl_surface.borrow().damage(...)
in that branch?
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.
I think it should be called, as far as I can tell what happens when no damage is sent is not specified in the protocol. So compositor may just do nothing in that case.
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.
Done
Thanks for the PR! It would be great if the wayland backend received consistent love :) The CI is complaining that you need to run |
…der#2254) * wayland: Fix WlSeat versioning * wayland: Fix XdgShell versioning * wayland: Fix XdgToplevel initial size * wayland: Fix WlCompositor versioning * wayland: Fix WlOutput versioning * Address review comments
This PR introduces support for running on a wide variety of versions of core protocols.
Druid can now run on both Weston and Mutter.
While at it, I also fixed the initial size of top levels, they are no longer 1px x 1px, they now use the size provided by the user.