1
0
Fork 0
forked from wry/wry

surface: attach sync sub-surface commits to parent commits

This commit is contained in:
Julian Orth 2024-03-20 19:41:43 +01:00
parent 0c48247740
commit 300deecc7d
8 changed files with 268 additions and 52 deletions

View file

@ -79,6 +79,19 @@ pub struct PendingXdgSurfaceData {
geometry: Option<Rect>,
}
impl PendingXdgSurfaceData {
pub fn merge(&mut self, next: &mut Self) {
macro_rules! opt {
($name:ident) => {
if let Some(n) = next.$name.take() {
self.$name = Some(n);
}
};
}
opt!(geometry);
}
}
pub trait XdgSurfaceExt: Debug {
fn initial_configure(self: Rc<Self>) -> Result<(), XdgSurfaceError> {
Ok(())