surface: attach sync sub-surface commits to parent commits
This commit is contained in:
parent
0c48247740
commit
300deecc7d
8 changed files with 268 additions and 52 deletions
|
|
@ -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(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue