[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Run two top level pygame display surfaces, one per local X display?



Hi,


I suspect the answer here is "no, not within the same process". However here 
goes anyway :-)

I'm using linux/xorg, and have my laptop display set as :0.0, and the external 
display is set as :0.1 - ie they're available as two independent X displays.

Clearly during startup of a pygame program I can do this:

if use_external_display:
   import os
   os.environ["DISPLAY"] = ":0.1"

To cause the pygame display to display on the external display, or default
to starting on the internal display. The question I've really got is this: can
I start 2 top level windows - one on the internal display and one on the
external?

I've tried a couple of obvious things which have failed, and whilst I do
expect the answer to be "nope, you can't really do that in a single
process" I thought I'd ask and see if anyone's tried this. (I realise that I
probably use threads either for this for the same reason)

I can fairly naturally (I _think_) split my code across multiple processes if 
that would work, but would prefer not to if possible. I still suspect the 
answer is no, but... :-)

Thanks in advance to anyone who responds :),  and best regards,


Michael.