From f5f8c6fd3828285b67e43a9c16d4ac2ff2140944 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 4 Jul 2016 20:44:13 +0200 Subject: [PATCH] Bring window to front after loading a document Fixes #7875. --- src/frontends/qt4/GuiApplication.cpp | 13 +++++++++++-- status.22x | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 2198457de3..9abcf061f8 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1660,10 +1660,19 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) crc = for_each(fname.begin(), fname.end(), crc); createView(crc.checksum()); current_view_->openDocument(fname); - if (current_view_ && !current_view_->documentBufferView()) + if (!current_view_->documentBufferView()) current_view_->close(); - } else + else { + current_view_->raise(); + current_view_->activateWindow(); + current_view_->showNormal(); + } + } else { current_view_->openDocument(fname); + current_view_->raise(); + current_view_->activateWindow(); + current_view_->showNormal(); + } break; } diff --git a/status.22x b/status.22x index e384377c64..c088d1f8b7 100644 --- a/status.22x +++ b/status.22x @@ -33,6 +33,8 @@ What's new - Added a new module "Title and Preamble Hacks". +- Bring window to front after loading a document in single instance (bug 7875). + * DOCUMENTATION AND LOCALIZATION -- 2.39.5