From a6de6b6d70dac322bdda23671be343d37912347d Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 25 Oct 2023 18:48:48 +0200 Subject: [PATCH] shell: Fix dragging maximized windows on non-origin outputs --- src/shell/workspace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/workspace.rs b/src/shell/workspace.rs index 2afc092b3..3f1de3790 100644 --- a/src/shell/workspace.rs +++ b/src/shell/workspace.rs @@ -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())