Add some more documentation

This commit is contained in:
Seaotatop 2023-06-23 10:25:10 -05:00
parent 50cede7b70
commit 363350805d

View file

@ -36,9 +36,16 @@ pub struct WindowState {
/// [`CompositorHandler.commit()`]: smithay::wayland::compositor::CompositorHandler#tymethod.commit
#[derive(Debug, Default)]
pub enum WindowResizeState {
/// The window doesn't need to be moved.
#[default]
Idle,
/// The window has received a configure request with a new size. The desired location and the
/// configure request's serial should be provided here.
WaitingForAck(Serial, Point<i32, Logical>),
/// The client has received the configure request and has successfully changed its size. It's
/// now safe to move the window in [`CompositorHandler.commit()`] without flickering.
///
/// [`CompositorHandler.commit()`]: smithay::wayland::compositor::CompositorHandler#tymethod.commit
WaitingForCommit(Point<i32, Logical>),
}