From 52ae8fb22bc2010a75b9fe31e9149f3fa8cb0968 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Thu, 4 Aug 2016 01:25:36 -0400 Subject: [PATCH] Activate LyX window after reverse search (#10196) "lyxclient -g" now calls the just implemented lyx-activate (see previous commit) after server-goto-file-row. This allows the PDF viewer to switch to LyX after executing a reverse search. --- src/client/client.cpp | 8 +++++--- src/client/lyxclient.1in | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index f303c1833e..a950f8303b 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -504,9 +504,11 @@ int g(vector const & arg) << endl; return -1; } - singleCommand = "LYXCMD:server-goto-file-row " - + arg[0] + ' ' - + arg[1]; + singleCommand = "LYXCMD:command-sequence " + "server-goto-file-row " + + arg[0] + ' ' + + arg[1] + "; " + + "lyx-activate"; return 2; } diff --git a/src/client/lyxclient.1in b/src/client/lyxclient.1in index f3e9342213..e18fb12ba7 100644 --- a/src/client/lyxclient.1in +++ b/src/client/lyxclient.1in @@ -53,7 +53,7 @@ LyX commands documentation can be found in LyX Help menu. send a single \fIcommand\fR, print LyX information to standard output and exit. LYXCMD prefix is needed in the given command. .TP .BI \-g " file line" -this is simply a wrapper for the command 'server\-goto\-file\-row \fIfile\fR \fIline\fR'. It is used by the DVI previewer to elicit inverse DVI search. +this is simply a wrapper for the command 'command-sequence server\-goto\-file\-row \fIfile\fR \fIline\fR; lyx-activate'. It is used by the PDF and DVI previewer to elicit inverse search and focus the LyX window. .PP If neither \fB\-c\fR nor \fB\-g\fR are used, \fBlyxclient\fR will regard any standard input as commands to be sent to LyX, printing LyX's responses to