Popup windows (menus, tooltips) from apps like JetBrains IDEs trigger
DestroyNotify without being managed. Previously this caused pointer
warp to focused window center on every popup close, making edge
buttons nearly unusable.
- Add Button1 grab on root for edge resize in gaps between tiled windows
- Add find_edge_from_gap() to detect resize edges when clicking gaps
- Add set_root_cursor() helper for cursor feedback
- Increase edge detection zone to 32px for easier grabbing
- Reset root cursor and unfreeze pointer on resize complete
- Add debug logging for resize diagnostics
Instead of re-detecting the edge during button press (which might fail
due to slight coordinate differences), use the tiled_edge_cursor state
that was already set by motion detection. If the cursor changed to a
resize cursor, we know we're on a valid edge and can use that state
directly to start the resize operation.
When windows are reparented into frames (for title bars), motion and
button events come from the frame window, not the client. This fix:
- Translates frame window IDs to client IDs in motion/button handlers
- Sets/clears cursor on both frame and client windows
- Fixes tiled edge resize not detecting edges when frames are enabled
Complete rewrite of tiled window edge resize detection:
- Detection now based on proximity to window edge (16px zone), not gap center
- Motion events on tiled windows properly trigger edge detection
- Cursor set only on the two windows sharing the edge
- Properly clears cursor when moving away from edge
- Fixed focus-on-hover by not setting cursor on all windows
The previous approach tried to detect the gap between windows, but motion
events only fire when over a window, not the root. The new approach detects
when cursor is near a window's edge and checks for an adjacent window.
- find_tiled_edge now returns both windows sharing the edge
- tiled_edge_cursor tracks (w1, w2, direction) instead of just direction
- Only set/clear cursor on the two edge-adjacent windows, not all windows
When hovering near the edge between tiled windows, the cursor is now
set on all tiled windows (not just root), ensuring the resize cursor
shows even when the mouse is over a window. Also adds debug logging
for tiled edge detection.
Hold Mod and drag a tiled window to swap positions with others.
Features live preview: dragged window follows cursor and swaps
happen in real-time as you hover over targets.
- Add raise_window and move_window to Connection
- Add Clone derive to Node for tree backup/revert
- Store fixed grab offset at drag start for smooth tracking
- Live swap on hover with geometry cache updates
- Immediate flush after moves for responsive feedback
- Green highlight on swap target (configurable via border_color_swap_target)
When navigating between windows with arrow keys, gar now remembers which
window was last focused in each direction. This fixes the issue where
navigating back and forth between a tall window and stacked windows would
always default to the topmost window instead of returning to the previously
focused one.
The memory is stored only when windows share the same row (for Left/Right)
or column (for Up/Down), preventing interference with natural navigation.
- Remove glx-no-rebind-pixmap from picom config (prevents wallpaper change detection)
- Unmap all managed windows before exit so they don't persist on X server
- Kill picom on exit to prevent compositor effects bleeding into greeter
- Add sync to ensure X server processes unmap requests before exit