Skip to content

feat: setting to turn off the lid popup, and show it without taking focus - #249

Open
z1pp090 wants to merge 1 commit into
SpriteOvO:mainfrom
z1pp090:feat/lid-popup-options
Open

z1pp090 wants to merge 1 commit into
SpriteOvO:mainfrom
z1pp090:feat/lid-popup-options

Conversation

@z1pp090

@z1pp090 z1pp090 commented Oct 4, 2026 •

Copy link
Copy Markdown

Closes #203. Refs #233.

Problem

The battery window opens by itself whenever the case lid is seen opening, and it gets activated when it does. Two requests came out of that:

@WolfCTOS mentioned in #233 that they planned to add a setting for this. I asked there on 23 Sep whether they were still on it and offered to take it, and there has been no reply since, so here it is. Happy to close this if a different approach is already in the works.

Changes

  • New setting popup_on_lid_open. It is on by default, so nothing changes for existing users. It gets a card on the Features page, next to automatic ear detection. When it is off, the window only opens from the tray icon or the taskbar status.
  • When the popup opens because of the lid, it is now shown with Qt::WA_ShowWithoutActivating (new MainWindow::ShowWithoutActivating). Opening it from the tray or the taskbar still activates it as before. The lid-only signal ShowSafely is renamed to ShowWithoutActivatingSafely to make that explicit.
  • The auto-hide timer already runs while the app is not active, so a popup shown without activation still slides away after 10 s.
  • UiRenderingTests checks the new checkbox along with the other setting checkboxes (accessible name, minimum size).

The new strings are not in the .ts catalogs yet. I left them for the usual lupdate pass so this doesn't conflict with the open translation PRs.

Testing

Windows 11, AirPods Pro, release build, with the fix from #246 also applied locally:

  • With a normal window in front, I closed and reopened the case. The popup appeared and slid away after 10 s, and the foreground window stayed the same the whole time (logged with GetForegroundWindow).
  • With Age of Empires II: Definitive Edition full screen, I reopened the case. The popup appeared on top of the game, the game kept focus and did not minimize.
  • Not tested by hand: the lid with the setting off. That path is the popup_on_lid_open check in Application.cpp, and the checkbox is wired the same way as the other setting checkboxes.
  • The unit and UI tests pass locally, and the Windows workflow passes on my fork.

🤖 Generated with Claude Code

…ocus

The battery window opens by itself every time the case lid is seen
opening. Users asked for a way to turn that off (SpriteOvO#233) and for it not to
steal focus from the app in use, which minimizes full-screen games (SpriteOvO#203).

- New setting `popup_on_lid_open` (on by default, so nothing changes for
  existing users), with a card on the Features page. When off, the window
  only opens from the tray icon or the taskbar status.
- When the popup opens because of the lid, it is shown with
  Qt::WA_ShowWithoutActivating. Opening it from the tray still activates
  it as before.

Closes SpriteOvO#203
Refs SpriteOvO#233

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Englisabeth

Copy link
Copy Markdown

Amazing work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A "silent" mode or to remove grabbing focus from programs

2 participants