Allow toplevels to reconfigure themselves
This commit is contained in:
parent
378421d356
commit
51300780f8
4 changed files with 36 additions and 26 deletions
|
|
@ -798,8 +798,8 @@ impl<C: XConnection> ServerState<C> {
|
|||
win.surface_serial = Some(serial);
|
||||
}
|
||||
|
||||
pub fn can_reconfigure_window(&mut self, window: x::Window) -> bool {
|
||||
let Some(win) = self.windows.get_mut(&window) else {
|
||||
pub fn can_change_position(&self, window: x::Window) -> bool {
|
||||
let Some(win) = self.windows.get(&window) else {
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
@ -851,6 +851,11 @@ impl<C: XConnection> ServerState<C> {
|
|||
);
|
||||
popup.popup.reposition(&popup.positioner, 0);
|
||||
}
|
||||
Some(SurfaceRole::Toplevel(Some(_))) => {
|
||||
win.attrs.dims.width = dims.width;
|
||||
win.attrs.dims.height = dims.height;
|
||||
data.update_viewport(win.attrs.dims, win.attrs.size_hints);
|
||||
}
|
||||
other => warn!("Non popup ({other:?}) being reconfigured, behavior may be off."),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue