]> git.lyx.org Git - lyx.git/blobdiff - src/Server.cpp
Use InsetLayout for LaTeX output.
[lyx.git] / src / Server.cpp
index 76ee88060bd980af2e92234ab1ebffbddb9c5f15..1e673e6f8708e9fa1701b74dc0572dcc0d271c42 100644 (file)
@@ -59,6 +59,7 @@
 #include "support/bind.h"
 
 #ifdef _WIN32
+#include <io.h>
 #include <QCoreApplication>
 #endif
 #include <QThread>
@@ -1014,7 +1015,8 @@ bool LyXComm::loadFilesInOtherInstance()
                        break;
                string const cmd = "LYXCMD:pipe:file-open:" +
                                        fname.absFileName() + '\n';
-               ::write(pipefd, cmd.c_str(), cmd.length());
+               if (::write(pipefd, cmd.c_str(), cmd.length()) < 0)
+                       LYXERR0("Cannot write to pipe!");
                ::close(pipefd);
                ++loaded_files;
                it = theFilesToLoad().erase(it);
@@ -1171,7 +1173,8 @@ void Server::callback(string const & msg)
                        // connect to the lyxfunc in the single GuiView we
                        // support currently. (Lgb)
 
-                       FuncRequest const fr(lyxaction.lookupFunc(cmd), arg);
+                       FuncRequest fr(lyxaction.lookupFunc(cmd), arg);
+                       fr.setOrigin(FuncRequest::LYXSERVER);
                        DispatchResult dr;
                        theApp()->dispatch(fr, dr);
                        string const rval = to_utf8(dr.message());