shell.xdg: add XdgRequest::AckConfigure
This will be used for convenient resize state tracking.
This commit is contained in:
parent
223b523f80
commit
9eb51b8439
|
@ -941,4 +941,11 @@ pub enum XdgRequest<R> {
|
||||||
/// location of the menu request
|
/// location of the menu request
|
||||||
location: (i32, i32),
|
location: (i32, i32),
|
||||||
},
|
},
|
||||||
|
/// A surface has acknowledged a configure serial.
|
||||||
|
AckConfigure {
|
||||||
|
/// The surface.
|
||||||
|
surface: wl_surface::WlSurface,
|
||||||
|
/// The configure serial.
|
||||||
|
serial: u32,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,6 +333,12 @@ where
|
||||||
role_data.configured = true;
|
role_data.configured = true;
|
||||||
})
|
})
|
||||||
.expect("xdg_surface exists but surface has not shell_surface role?!");
|
.expect("xdg_surface exists but surface has not shell_surface role?!");
|
||||||
|
|
||||||
|
let mut user_impl = data.shell_data.user_impl.borrow_mut();
|
||||||
|
(&mut *user_impl)(XdgRequest::AckConfigure {
|
||||||
|
surface: data.wl_surface.clone(),
|
||||||
|
serial,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,6 +349,12 @@ fn xdg_surface_implementation<R>(
|
||||||
role_data.configured = true;
|
role_data.configured = true;
|
||||||
})
|
})
|
||||||
.expect("xdg_surface exists but surface has not shell_surface role?!");
|
.expect("xdg_surface exists but surface has not shell_surface role?!");
|
||||||
|
|
||||||
|
let mut user_impl = data.shell_data.user_impl.borrow_mut();
|
||||||
|
(&mut *user_impl)(XdgRequest::AckConfigure {
|
||||||
|
surface: data.wl_surface.clone(),
|
||||||
|
serial,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue