shell.xdg: add XdgRequest::AckConfigure

This will be used for convenient resize state tracking.
This commit is contained in:
Ivan Molodetskikh 2020-02-08 08:42:50 +03:00
parent 223b523f80
commit 9eb51b8439
No known key found for this signature in database
GPG Key ID: 02CE38DA47E9D691
3 changed files with 19 additions and 0 deletions

View File

@ -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,
},
} }

View File

@ -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!(),
} }

View File

@ -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!(),
} }