Dotfiles/desktopenvs/hyprlua/astal-menu/ui
Amir Alexander Abdelbaki 68b3f2bdd0 fix(astro-menu): stop the taskbar poll resetting the window list's scroll
The workspace/window panel couldn't be scrolled: it snapped back to the top
about once a second. Nothing to do with the hologram overlay (a DrawingArea
with can_target=False that only ever queue_draw()s itself) — it was the 1 Hz
refresh that start_polling() runs while the menu is open. Both of its
callbacks called _rebuild_panel(), which did _clear(self._panel) and rebuilt
every widget, including a fresh Gtk.ScrolledWindow for the list. Emptying
scrolled content collapses the scroll adjustment's upper bound, so its value
is clamped back to 0 and the viewport jumps to the top.

The panel scaffolding (header, layout stack + switcher, list scroller) is now
built once in _build_panel_scaffold() and refreshed in place by _update_panel:

  * The layout tabs are the same for every workspace — only the selection is
    per-workspace, and _sync_layout_controls() already refreshes that — so
    they no longer get torn down either.
  * _update_window_list() compares the sorted window addresses with the last
    set. Unchanged: row contents (title, ws N, icon) are updated in place, so
    a retitled window can't move the viewport. Changed: only the rows are
    rebuilt, and both scrollers' offsets are saved and restored on idle, once
    the new rows are allocated and the adjustment's upper is no longer stale.
  * _rebuild_strip() gets the same signature guard, so the poll stops
    resetting the compact strip's horizontal scroll and no longer tears down a
    grouped app's instance popover while it's open. It keys on addresses only:
    strip titles are tooltip/popover-only and refresh on the next real change.

Applied identically to hyprlua and hyprdrive.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 23:15:34 +02:00
..
appdrawer.py feat(astal-menu): stats line, side-slide flag, drawer pop, tighter buttons 2026-07-06 09:26:37 +02:00
favorites.py fix(astal-menu): working favourites, 3-day weather, deploy-safe settings 2026-07-05 23:35:23 +02:00
quadcard.py fix(astal-menu): keep toggle switches pill-shaped (valign center) 2026-07-06 00:12:16 +02:00
quadgrid.py style(astal-menu): unfullscreen glyphs, animated takeover, CyberQueer TUIs 2026-07-07 13:43:11 +02:00
statsbar.py feat(astal-menu): stats line, side-slide flag, drawer pop, tighter buttons 2026-07-06 09:26:37 +02:00
taskbar.py fix(astro-menu): stop the taskbar poll resetting the window list's scroll 2026-08-05 23:15:34 +02:00