mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Bring window to front only for single-instance mode
A window manager could be configured such that to maintain a certain stack order for the windows. It would be annoying that opening a new file through menu brings up the window, so do this only if we are loading a file through the lyx-server.
This commit is contained in:
parent
d13048c7f5
commit
697580006e
@ -1680,7 +1680,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
current_view_->openDocument(fname);
|
current_view_->openDocument(fname);
|
||||||
if (!current_view_->documentBufferView())
|
if (!current_view_->documentBufferView())
|
||||||
current_view_->close();
|
current_view_->close();
|
||||||
else {
|
else if (cmd.origin() == FuncRequest::LYXSERVER) {
|
||||||
current_view_->raise();
|
current_view_->raise();
|
||||||
current_view_->activateWindow();
|
current_view_->activateWindow();
|
||||||
current_view_->showNormal();
|
current_view_->showNormal();
|
||||||
@ -1690,9 +1690,11 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// but let's make sure
|
// but let's make sure
|
||||||
LASSERT(current_view_, break);
|
LASSERT(current_view_, break);
|
||||||
current_view_->openDocument(fname);
|
current_view_->openDocument(fname);
|
||||||
current_view_->raise();
|
if (cmd.origin() == FuncRequest::LYXSERVER) {
|
||||||
current_view_->activateWindow();
|
current_view_->raise();
|
||||||
current_view_->showNormal();
|
current_view_->activateWindow();
|
||||||
|
current_view_->showNormal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user