From 85547e336faaa48ebe72ed2a2832eba47c39a1a4 Mon Sep 17 00:00:00 2001 From: talksik Date: Sun, 1 Feb 2026 13:27:23 -0800 Subject: [PATCH] fix: position always on top --- focusoverlay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/focusoverlay.cpp b/focusoverlay.cpp index cd2fa62..5aa7dbf 100644 --- a/focusoverlay.cpp +++ b/focusoverlay.cpp @@ -10,8 +10,10 @@ FocusOverlay::FocusOverlay(QWidget *parent) ui->setupUi(this); // Set window flags for always-on-top frameless window - setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Tool); + // Use Qt::Window instead of Qt::Tool so it stays visible when app loses focus + setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); setAttribute(Qt::WA_TranslucentBackground); + setAttribute(Qt::WA_ShowWithoutActivating); // Don't steal focus when showing // Connect buttons connect(ui->resetButton, &QPushButton::clicked, @@ -65,7 +67,7 @@ void FocusOverlay::positionAtBottomCenter() QRect screenGeometry = screen->geometry(); int x = (screenGeometry.width() - width()) / 2; - int y = screenGeometry.height() - height() - 300; // 300px from bottom + int y = screenGeometry.height() - height(); move(x, y); }