Open GoogleCodeExporter opened 9 years ago
Interestingly, the following code *does* work:
---
import pyglet
platform = pyglet.window.get_platform()
display = platform.get_default_display()
def on_draw():
window.clear()
for screen in display.get_screens():
print screen
window = pyglet.window.Window()
window.on_draw = on_draw
window.set_fullscreen(screen=screen)
pyglet.app.run()
---
i.e., if you set the window to fullscreen *after* it has been created, it works
fine. It's the screen argument to the window constructor that doesn't work as
expected.
Original comment by freakboy...@gmail.com
on 27 Sep 2013 at 2:07
That's interesting. In my experience there's a big difference between starting
the window in fullscreen and setting fullscreen after creating it, for example:
the callbacks (1 on_resize in first case, 2 on the second).
I'll investigate, may be I can get the same behaviour in both cases.
It would be really helpful if you could upgrade to the latest repo code. You
can do it in two different ways:
- with pip:
pip install --upgrade http://pyglet.googlecode.com/archive/tip.zip
- download the latest code from: http://pyglet.googlecode.com/archive/tip.zip
and install it with the usual setup.py command.
Thanks for the report!
Original comment by useboxnet
on 28 Sep 2013 at 8:50
I've just tried reproducing with tip (304c4b1dc7f1), and I get the same
behavior -- opening both windows in fullscreen mode results in both windows
opening on the primary monitor.
Something else that occurred to me that *might* make a difference - my setup
has the "primary" monitor set up as the external monitor (so, the mac menu bar
is displayed on the external monitor).
Original comment by freakboy...@gmail.com
on 30 Sep 2013 at 12:32
Thanks for the follow up!
I just tried your script in Linux with the repo code and works as expected. I
configured the external display to be the primary display and no difference.
This was Ubuntu Precise with Unity but at least we can discard is a general
problem but something specific to Mac.
Original comment by useboxnet
on 30 Sep 2013 at 7:09
Original issue reported on code.google.com by
freakboy...@gmail.com
on 26 Sep 2013 at 8:17