Refactor panel indicator settings and improve window tiling logic - #75
Merged
Conversation
…pendency logic for Quick Settings toggle
…cies" This reverts commit 35d769b.
* 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.
…uction without moving windows
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.