Just to clarify #2, when you say "compile" you mean File > Export (as opposed to View), correct? If you click the viewer button or use the View menu to generate a PDF, LyX automatically opens the PDF in the designated viewer program (intended behavior).
Paul No, I'm sorry I should have been more clear what I meant. I'm actually using "command-alternatives master-buffer-view pdf2; buffer-view pdf2", which I have been using through a shortcut for a while (since LyX 2.1, I believe). I don't mind this when the pdf viewer opens for the first time, but currently the window focus moves to the sumatrapdf whenever I press the shortcut to update the document.I guess I should use update instead of view, but the previous behavior (which I prefer, because I don't want to have separate shortcuts for first time viewing and subsequent updating) was that the documents gets updated without lyx losing its window focus, even if I use view. Thank you!Joon