xdg-shell: make acked serial part of the pending state
This commit is contained in:
parent
c9f54cd60b
commit
17ac4ca0e1
7 changed files with 85 additions and 36 deletions
|
|
@ -50,7 +50,7 @@ impl TestXdgWmBase {
|
|||
tran: self.tran.clone(),
|
||||
_server: server,
|
||||
destroyed: Cell::new(false),
|
||||
last_serial: Cell::new(0),
|
||||
last_serial: Default::default(),
|
||||
});
|
||||
self.tran.add_obj(xdg.clone())?;
|
||||
Ok(xdg)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub struct TestXdgSurface {
|
|||
pub tran: Rc<TestTransport>,
|
||||
pub _server: Rc<XdgSurface>,
|
||||
pub destroyed: Cell<bool>,
|
||||
pub last_serial: Cell<u32>,
|
||||
pub last_serial: Cell<Option<u32>>,
|
||||
}
|
||||
|
||||
impl TestXdgSurface {
|
||||
|
|
@ -63,7 +63,7 @@ impl TestXdgSurface {
|
|||
|
||||
fn handle_configure(&self, parser: MsgParser<'_, '_>) -> Result<(), TestError> {
|
||||
let ev = Configure::parse_full(parser)?;
|
||||
self.last_serial.set(ev.serial);
|
||||
self.last_serial.set(Some(ev.serial));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ pub struct TestWindow {
|
|||
|
||||
impl TestWindow {
|
||||
pub async fn map(&self) -> Result<(), TestError> {
|
||||
self.xdg.ack_configure(self.xdg.last_serial.get())?;
|
||||
if let Some(serial) = self.xdg.last_serial.take() {
|
||||
self.xdg.ack_configure(serial)?;
|
||||
}
|
||||
self.surface
|
||||
.map(self.tl.core.width.get(), self.tl.core.height.get())
|
||||
.await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue