A press on a title bar (outside the buttons) focuses the window, floats it if it was tiled (WmState::float_window) and starts a move drag; motion moves it, release ends it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f05677178a
commit
8a3ea16b1c
3 files changed
+71
-1
No files matched your search
@@ -880,6 +880,29 @@ pub fn WmState::hit_test(
|
||||
HitNone
|
||||
}
|
||||
|
||||
///| Take a tiled window out of the tiling tree so it can be moved freely; it keeps its
|
||||
/// current geometry. No-op for windows that already float.
|
||||
pub fn WmState::float_window(
|
||||
self : WmState,
|
||||
id : UInt64,
|
||||
work_area : Rect,
|
||||
) -> Array[WmAction] {
|
||||
match self.windows.get(id) {
|
||||
None => []
|
||||
Some(win) =>
|
||||
if win.is_floating || win.maximized || win.fullscreen {
|
||||
[]
|
||||
} else {
|
||||
let ws = self.ensure_workspace(win.workspace)
|
||||
ws.tree = remove_leaf(ws.tree, id)
|
||||
win.is_floating = true
|
||||
win.floating_geometry = win.geometry
|
||||
push_top(ws.floating, id)
|
||||
self.relayout(win.workspace, work_area)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn WmState::start_drag(
|
||||
self : WmState,
|
||||
|
||||
Reference in new issue
Block a user