git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit92c655071fe374be7f0d9bbcdcdc8fc940a11a2f
parente713d2c7de
authorLucas Galante <[email protected]>
date2026-09-08 21:58
docs(ccectl): move-window-left/-right/-up/-down step floating windows too

The policy crate now steps a floating window by one grid period (tiled
still swaps); the usage text and the dispatch comment said "TILED only".

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 src/cce_ctl.rs               | 5 +++--
 src/server/window_manager.rs | 7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/cce_ctl.rs b/src/cce_ctl.rs
index 2a4142e..d83d98c 100644
--- a/src/cce_ctl.rs
+++ b/src/cce_ctl.rs
@@ -55,8 +55,9 @@ fn usage(name: &str, to_stderr: bool) {
     print("  close-window <app_id|id> [title-substring]  # close a specific window");
     print("  center-window [<app_id>]   # pan focused/named window on-screen; replies x= y= w= h=");
     print("  move-window <square> [<app_id>] # put focused/named window on a desktop square (e.g. C-9)");
-    print("  move-window-left|-right|-up|-down    # step the focused TILED window one grid");
-    print("                              # cell; swaps with the tiled window already there");
+    print("  move-window-left|-right|-up|-down    # step the focused window one grid cell;");
+    print("                              # tiled swaps with the tiled window already there,");
+    print("                              # floating just moves");
     print("  place-next <app_id> <x> <y> # one-shot: next map of app_id lands near this layout pos");
     print("  place-next-cell <app_id> <x> <y> # one-shot: next map covers the grid square at this pos,");
     print("                              # keeping its size and growing away from its neighbours");
diff --git a/src/server/window_manager.rs b/src/server/window_manager.rs
index 4f2f714..f725d8d 100644
--- a/src/server/window_manager.rs
+++ b/src/server/window_manager.rs
@@ -4385,9 +4385,10 @@ impl WindowManager {
                 self.execute_action(&crate::config::Action::FocusPrev, None);
                 "ok\n".to_string()
             }
-            // Relative grid steps for the focused TILED window, swapping with
-            // whatever tiled window holds the destination. Absolute placement
-            // is "move-window <square>", above.
+            // Relative grid steps for the focused window: a tiled one swaps
+            // with whatever tiled window holds the destination, a floating one
+            // just moves by the period. Absolute placement is
+            // "move-window <square>", above.
             "move-window-left" | "move-window-right" | "move-window-up" | "move-window-down" => {
                 let a = match action {
                     "move-window-left" => crate::config::Action::MoveWindowLeft,