[Bug]: Main Window Lanches outside screen space #26

Closed
opened 2026-06-09 05:02:13 +00:00 by ValleyGeek · 2 comments
Owner

App version

0.1.1

Platform

Windows

Steps to reproduce

  1. Open the application
  2. Make the application full screen on the primary monitor
  3. Close the application
  4. Reopen the application

Expected behavior

The main application window is fully visible on the monitor and/or or opened in full screen mode.

Actual behavior

The main window is opened at the resolution of the main monitor but shifted up, off the screen, to no overlap the Windows taskbar. The window title and OS minimize/restore/close buttons are unreachable.

Additional context

This is not present on the Linux build.

### App version 0.1.1 ### Platform Windows ### Steps to reproduce 1. Open the application 2. Make the application full screen on the primary monitor 3. Close the application 4. Reopen the application ### Expected behavior The main application window is fully visible on the monitor and/or or opened in full screen mode. ### Actual behavior The main window is opened at the resolution of the main monitor but shifted up, off the screen, to no overlap the Windows taskbar. The window title and OS minimize/restore/close buttons are unreachable. ### Additional context This is not present on the Linux build.
Member

Fix implemented on 0.1.25/issue-26-window-offscreen

Root cause: Session restore saved frameGeometry() but applied it through setGeometry(). On Windows, those APIs disagree about client vs. frame size, so a fullscreen-sized rect could place the title bar above the visible desktop when the app tried to avoid the taskbar.

Changes in session_state.py:

  • Persist Qt saveGeometry() (qt_geometry) plus target screen name for platform-correct restore.
  • Fullscreen sessions skip manual setGeometry; the window re-enters fullscreen on the saved monitor via windowHandle().setScreen() + showFullScreen().
  • Legacy x/y/width/height payloads run through a frame-aware clamp that nudges and shrinks the window until the frame fits inside availableGeometry.

Verification: tests/test_pr13_config.py extended with qt-geometry round-trip, fullscreen restore, and legacy off-screen rect cases (25 tests passing on Linux CI path).

Manual check requested: Please confirm on Windows with the reproduce steps (fullscreen → close → reopen). One normal exit after upgrading writes the new qt_geometry payload; even older saved sessions should clamp safely on the legacy path.

## Fix implemented on `0.1.25/issue-26-window-offscreen` **Root cause:** Session restore saved `frameGeometry()` but applied it through `setGeometry()`. On Windows, those APIs disagree about client vs. frame size, so a fullscreen-sized rect could place the title bar above the visible desktop when the app tried to avoid the taskbar. **Changes in `session_state.py`:** - Persist Qt `saveGeometry()` (`qt_geometry`) plus target `screen` name for platform-correct restore. - Fullscreen sessions skip manual `setGeometry`; the window re-enters fullscreen on the saved monitor via `windowHandle().setScreen()` + `showFullScreen()`. - Legacy x/y/width/height payloads run through a frame-aware clamp that nudges and shrinks the window until the frame fits inside `availableGeometry`. **Verification:** `tests/test_pr13_config.py` extended with qt-geometry round-trip, fullscreen restore, and legacy off-screen rect cases (25 tests passing on Linux CI path). **Manual check requested:** Please confirm on Windows with the reproduce steps (fullscreen → close → reopen). One normal exit after upgrading writes the new `qt_geometry` payload; even older saved sessions should clamp safely on the legacy path.
Grok closed this issue 2026-06-13 00:58:52 +00:00
Member

Resolved in PR #69 (0.1.25/issue-26-window-offscreenmain, release 0.1.26).

Validated on Linux CI path (qt-geometry round-trip, fullscreen re-entry, legacy off-screen rect clamp). Windows manual confirmation of fullscreen → close → reopen is still welcome after merge.

Resolved in PR #69 (`0.1.25/issue-26-window-offscreen` → `main`, release **0.1.26**). Validated on Linux CI path (qt-geometry round-trip, fullscreen re-entry, legacy off-screen rect clamp). Windows manual confirmation of fullscreen → close → reopen is still welcome after merge.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer#26
No description provided.