pygame window

205 views
Skip to first unread message

Tomasz Kaczorek

unread,
Jul 29, 2014, 4:11:30 PM7/29/14
to psychop...@googlegroups.com
Hi,
I am looking for help with my code. 
In my procedure I have psychopy and pygame windows as follow:

win = visual.Window(size=[1200, 680], fullscr=False, screen=0, allowGUI=True, allowStencil=False,
    monitor='testMonitor', color='black', colorSpace='rgb', units='height')
......................

pygame.init()
............
pygame.quit()

and when after closing the pygame window by pygame.quit the psychopy window (win) is not active and there I have to click the window. 
my question is: is there possible to activate by default the psychopy window without an extra click, please?

regards,
tomasz

Michael MacAskill

unread,
Jul 29, 2014, 4:21:47 PM7/29/14
to psychop...@googlegroups.com

On 30/07/2014, at 8:11 a.m., Tomasz Kaczorek <tomasz....@gmail.com> wrote:

> my question is: is there possible to activate by default the psychopy window without an extra click, please?

Something like this suggestion from Jan Kramer?
<https://groups.google.com/forum/#!msg/psychopy-users/zq2E12vnYiI/6mXirJMlq3cJ>

win.winHandle.maximize() #when external program closes, maximize PsychoPy window again
win.fullscr = True
win.winHandle.activate() #re-activate window
win.flip() #redraw the newly activated window

Mike

Joshua Peterson

unread,
Jul 30, 2014, 1:52:54 AM7/30/14
to psychop...@googlegroups.com
What is it that you need the pygame window for? If you are not using the actual window, you can use modules from pygame without calling pygame.init(). Instead, just import and initialize the specific modules you need.
Reply all
Reply to author
Forward
0 new messages