Skip to content

Fix window geometry restoration bug - #13990

Merged
phoerious merged 1 commit into
developfrom
fix/window-restore-geometry
Nov 2, 2026
Merged

phoerious merged 1 commit into
developfrom
fix/window-restore-geometry

Conversation

@phoerious

@phoerious phoerious commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Sometimes KeePassXC did not restore the window geometry properly. This change moves the geometry restoration to before showing the window. That should fix issues especially when the window is moved to another monitor on Wayland, but it may also resolve other strange quirks that can happen when the window starts in the tray.

Fixes #12044 (as a side effect)

Also fixes GUI tests using your actual local config file.

Testing strategy

Works now on my second monitor on Wayland. Before, KeePassXC always started with an 800x600px window.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@phoerious phoerious added this to the v2.8.1 milestone Nov 2, 2026
@phoerious
phoerious requested a review from a team November 2, 2026 13:42
@phoerious phoerious added the pr: bugfix Pull request fixes a bug label Nov 2, 2026
@phoerious
phoerious requested a lite review from Copilot November 2, 2026 13:55
@phoerious phoerious added the pr:backport-pending Pull request to be backported label Nov 2, 2026

This comment was marked as resolved.

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.19%. Comparing base (ba7473c) to head (5b989ae).

Files with missing lines Patch % Lines
src/gui/MainWindow.cpp 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13990      +/-   ##
===========================================
- Coverage    61.22%   61.19%   -0.03%     
===========================================
  Files          396      396              
  Lines        37922    37926       +4     
===========================================
- Hits         23216    23208       -8     
- Misses       14706    14718      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sometimes KeePassXC did not restore the window geometry properly. This change moves the geometry restoration to before showing the window. That should fix issues especially when the window is moved to another monitor on Wayland, but it may also resolve other strange quirks that can happen when the window starts in the tray.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A remaining active finding identifies missing GUI coverage for the one-time persisted geometry/state restore path, leaving a regression in this Wayland-sensitive behavior undetected by the existing tests.

No open issues 🎉

2 resolved since last review

Review effort: Lite

@droidmonkey

Copy link
Copy Markdown
Member

Nice fix!

@phoerious
phoerious merged commit c263a11 into develop Nov 2, 2026
13 checks passed
@phoerious
phoerious deleted the fix/window-restore-geometry branch November 2, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:backport-pending Pull request to be backported pr: bugfix Pull request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview panel occasionally gets collapsed

3 participants