Skip to content

Refactor panel indicator settings and improve window tiling logic - #75

Merged
oliwebd merged 19 commits into
keybinding-fix-66from
main
Aug 10, 2026
Merged

Refactor panel indicator settings and improve window tiling logic#75
oliwebd merged 19 commits into
keybinding-fix-66from
main

Conversation

@oliwebd

@oliwebd oliwebd commented Aug 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

oliwebd and others added 19 commits August 1, 2026 12:43
* fix: retile in spatial order on lock/unlock, remove dead suspend/resume path

Root cause: session-modes defaults to ["user"], so disable()/enable()
run a full teardown/rebuild on every lock cycle. The _first_startup
reseed in signals_attach() fed windows into auto_tile_on() using
tab_list(NORMAL) order, which is Mutter's MRU/alt-tab order, not
spatial order. Whichever window was focused before lock got attached
into the tree first, swapping it into the other window's slot.

- Sort _first_startup window registration by frame_rect (x, then y)
  instead of raw tab_list MRU order.
- Remove suspend()/resume()/suspend_for() and their backing fields
  (suspended, _resuming, _resume_timeout_source) - unreachable since
  the switch to default session-modes, nothing calls them but
  themselves.
- Force a single update_toplevel() pass per toplevel fork after the
  auto_tile_on() batch-attach loop so smart_gapped settles in one
  deterministic geometry pass instead of the incremental flip that
  happens mid-loop as siblings attach.

* refactor: replace console debug/info calls with standard console.log for consistent output

* refactor: remove redundant comments and cleanup requirement in extension disable and log initialization

* feat: implement BSP-based layout reconstruction for tiling windows upon extension re-enble on suspen/resume (#42)
update_toplevel() recomputes length_left from fork.prev_ratio, but
set_ratio() never touches prev_ratio - only length_left and
prev_length_left. Reconstruction never goes through measure()'s
manually_moved path, so every freshly reconstructed toplevel fork
keeps prev_ratio at its class default of 0.5, and update_toplevel()
overwrites the correctly reconstructed split with a flat 50/50 ratio.
This is the flicker seen when auto-tiling is toggled on with windows
already open.

Sync prev_ratio right after each set_ratio() call in subtree(), using
the same length_left/length() formula measure() uses on manual drags.
On first enable() after a shell restart, the work area GNOME reports
isn't necessarily settled yet (panel/monitor layout still finishing
its own boot pass). Tiling immediately can compute splits against a
work area that hasn't stabilized, then jump once the shell catches
up - visible as an outer-gap flicker.

Wait on layoutManager's 'startup-complete' signal when the shell is
still starting (_startingUp), same pattern already used for the OSK
signal registration in this file. If the shell has already finished
starting by the time enable() runs, tile immediately as before.
Updated the description to remove version numbers and simplify the text.
The previous approach stored the restacked signal ID in
_grab_focus_restack_id so on_minimize could cancel it. But restacked
fires before the user can click minimize, so the guard always ran too
late -- the callback had already raised the window and cleared the ID.

Move the guard inside the restacked callback itself: skip raise/activate
if the window is minimized at the time the signal fires.

Ref #70
The WindowAnimationManager previously only applied custom animations
(hyprland, glide) to window creation (_mapWindow) and destruction
(_destroyWindow). This caused minimize/unminimize actions to fall back
to GNOME Shell's default animations, which felt inconsistent.

Hook `_minimizeWindow` and `_unminimizeWindow` to use the same
animation parameters as `_destroyWindow` and `_mapWindow` respectively.
…uling

Track the GLib.timeout_add source for the first-startup auto-tile
in _timeouts so it's cleared before a new one is scheduled and
removed on destroy(), per EGO review guidelines.
@oliwebd
oliwebd merged commit 572a89a into keybinding-fix-66 Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants