fix(flomni): increase flomni GUI window settle delay after creation (experiment)
CI for csaxs_bec / test (push) Successful in 2m21s

Root cause finally isolated via a live A/B test: closing the whole "flomni"
window and reopening it (flomnigui_show_gui() takes the gui.new() branch,
creating a fresh top-level window) reproduces the "camera image squeezed/
missing until the window is moved" symptom; closing just the xeyegui dock
and reopening it (window already exists in self.gui.windows, reused as-is)
does not. Same OMNY_XRayEye construction either way -- the only variable is
whether the window itself is freshly created, which rules out the widget's
own layout code (already tried and reverted two fixes there this session).

The existing time.sleep(1) after gui.new() is itself evidence someone
already found the RPC response alone doesn't mean the window has actually
settled on screen. Bumping to 2s is a pragmatic, easily-reversible
experiment, not a confirmed fix -- flagging in case it needs to become a
poll-for-actual-geometry wait instead. LamNI's gui_tools.py has the
identical gui.new() + time.sleep(1) pattern (line 46-47) and is presumably
equally exposed, but untouched here -- not reported/tested there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3KffiFyyDMKT8vvPENUW
This commit is contained in:
x01dcandClaude Sonnet 5 committed 2026-09-17 15:59:40 +02:00
1 parent 3728a24c70
commit 631bdedb6c
1 file changed
+11 -1
@@ -59,7 +59,17 @@ class flomniGuiTools:
pos_x = self._SCREEN_WIDTH - self._WINDOW_WIDTH
geometry = (pos_x, self._WINDOW_TOP_MARGIN, self._WINDOW_WIDTH, self._WINDOW_HEIGHT)
self.flomni_window = self.gui.new("flomni", geometry=geometry)
time.sleep(1)
# The RPC response for gui.new() confirms the server has created the
# window object, not that it has actually settled at the requested
# geometry on screen (window-manager-level resize can lag behind
# that, worse over a remote desktop session) -- the very first dock
# added right after this (e.g. flomnigui_show_xeyealign()'s
# OMNY_XRayEye) can otherwise get laid out against a still-settling
# window, squeezing it down until the operator manually moves or
# resizes the window (which forces a relayout, masking the real
# timing issue rather than fixing it). Was 1s; bumped to 2s --
# this is a pragmatic guess, not a confirmed-sufficient bound.
time.sleep(2)
def flomnigui_stop_gui(self):
self.gui.flomni.hide()