shell: Fix dragging maximized windows on non-origin outputs

This commit is contained in:
Victoria Brekenfeld 2023-10-25 18:48:48 +02:00
parent 33ee25c274
commit 1d799f4fa8

View file

@ -670,7 +670,7 @@ impl Workspace {
if mapped.maximized_state.lock().unwrap().is_some() {
// If surface is maximized then unmaximize it
let new_size = self.unmaximize_request(window);
let ratio = pos.x / output.geometry().size.w as f64;
let ratio = pos.to_local(&self.output).x / output.geometry().size.w as f64;
initial_window_location = new_size
.map(|size| (pos.x - (size.w as f64 * ratio), pos.y).into())