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
|
|
@ -76,6 +76,25 @@ pub struct PendingLayerSurfaceData {
|
|||
any: bool,
|
||||
}
|
||||
|
||||
impl PendingLayerSurfaceData {
|
||||
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!(size);
|
||||
opt!(anchor);
|
||||
opt!(exclusive_zone);
|
||||
opt!(margin);
|
||||
opt!(keyboard_interactivity);
|
||||
opt!(layer);
|
||||
self.any |= mem::take(&mut next.any);
|
||||
}
|
||||
}
|
||||
|
||||
impl ZwlrLayerSurfaceV1 {
|
||||
pub fn new(
|
||||
id: ZwlrLayerSurfaceV1Id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue