Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Dec 28, 2024
1 parent 8f26b2a commit 0e48277
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,15 @@ void MainWindow::toggleMainWindow( bool ensureShow )
}
activateWindow();

// Rare cases, on Windows, the window can not be brought to the front.
auto flags = windowFlags();
setWindowFlags( flags | Qt::WindowStaysOnTopHint );

QTimer::singleShot( 10, this, [this]() {
auto flags = windowFlags();
setWindowFlags( flags & ~Qt::WindowStaysOnTopHint );
} );

shown = true;
}
else if ( !ensureShow ) {
Expand Down

0 comments on commit 0e48277

Please sign in to comment.