Commit a0f6535dbb5c
tarball2 files changed+6-0
@@ -611,6 +611,11 @@ fn window_rect(layout: &Layout, id: WindowId) -> Option<Rect> {
611611
}612612
613613
impl State {614
+ pub fn forget_drag(&mut self, id: WindowId) {615
+ self.input.drag.take_if(|d| d.window == id);616
+ self.wm.resizing.take_if(|r| r.window == id);617
+ }618
+614619
/// Starts moving, or with `edges` resizing, a floating window at a615620
/// client's request. Tiled windows are left alone.616621
pub fn client_drag(&mut self, id: WindowId, edges: Option<Edges>, button: u32) {@@ -346,6 +346,7 @@ impl State {
346346
}347347
348348
pub fn remove_window(&mut self, id: WindowId) -> Option<Window> {349
+ self.forget_drag(id);349350
let state = self.wm.remove(id);350351
if let Some(state) = &state {351352
self.wm.space.unmap_elem(&state.window);