[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?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Run two top level pygame display surfaces, one per local X display?
- From: Michael Sparks <zathras@xxxxxxxxxxxxx>
- Date: Sat, 24 Sep 2005 22:52:43 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sat, 24 Sep 2005 17:52:38 -0400
- Organization: Mug of tea and a couple of biccies
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: KMail/1.8
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.