[texworks] Wrong TeXWorks window retaining focus following document compilation

Stefan Löffler st.loeffler at gmail.com
Sat Sep 10 14:44:12 CEST 2011


Hi,

I understand the issue. However, as far as I know (and found on the 
internet), there is no (platform-independent) way to determine the 
stacking order of top-level windows in Qt.

On 2011-09-06 15:40, Rainman 3D2002 wrote:
> I understand the why this was done. Prior to this feature, when 
> compiling chapter1_work.pdf, there was no "Console output" being 
> visible on the screen during compilation; you had to click on the 
> chapter1_work.tex window to see it.  But the change is actually now 
> breaking workflow. If there are no errors in compilation that would 
> keep the "Console output" window open, the original editing window 
> should be brought back to the foreground. That was I can just keep 
> editing without having to track it down first.

At the time of typesetting, the only thing the program knows for certain 
is that the pdf window is the top-most window (as you wrote you start 
the typesetting process from that window). Everything else (in 
particular, which window is on top of which other window) is fairly 
arbitrary - after all anything could have interfered with it, from 
manually focusing a window to a browser popup. So, without a proper way 
to determine the _complete_ stacking sequence (and restoring it after 
the typesetting has finished successfully), I don't see a proper way to 
implement this at the moment, unfortunately.

However, I'm wondering why you set Book1.tex as TeX-root. Assuming you 
compile the whole book only for the final product (i.e., after you're 
satisfied with each individual chapter), it would make much more sense 
to set TeX-root as chapter1_work.tex (and compile the full book from 
Book1.tex, only). Alternatively, you could also define a separate tool 
for the whole book, with "Book1.tex" hard-coded instead of "$fullname".

HTH
Stefan

PS: Could you please add this to the Google Code issue tracker so we 
could come back to and fix this once we have implemented the necessary 
framework(s) to work around this issue?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20110910/dae6efe1/attachment.html>


More information about the texworks mailing list