Hi,

Sorry for the late response, but I wanted to check the source before 
answering.

Currently it is not possible to supply your own window ID to pyglet. It is 
probably possible to to modify the XlibWindow class to allow this, but it 
is not trivial. You can have a look at XlibWindow._recreate and 
XlibWindow._create in pyglet/window/xlib/__init__.py

Kind regards,
Rob

Op donderdag 17 september 2015 03:47:08 UTC+2 schreef Jesse Cox:
>
> I'm looking to write my own screensaver for Linux. The screensaver program 
> says that I need to be able to utilize a window ID that it gives me and 
> draw to that particular window. How would I specify the window ID? I'm 
> using xscreensaver and this is the excert:
>
> ==========================================================================
>>
>>                      Writing new XScreenSaver modules
>>
>> ==========================================================================
>>
>> Any program that can be made to render on an X window created by another
>> process can be used as a screen saver.  Just get the window ID out of
>> $XSCREENSAVER_WINDOW, draw on that, and you're done.
>>
>> In theory, you can write a screen saver in any language you like.  In
>> practice, however, languages other than C or C++ tend not to allow you to
>> draw to windows that they did not create themselves.  Unfortunately, this
>> means that if you want to write a screen saver, you must write it in C.
>>
>> Given that you're going to be writing in C, you might as well take
>> advantage of the various utility functions that I have written to make
>> that easier.  Writing a new screen saver in C using the frameworks
>> included with xscreensaver simplifies things enormously.
>>
>> Generally, the best way to learn how to do something is to find a similar
>> program, and play around with it until you understand it.  Another
>> approach is to not worry about understanding it, but to just hack it out.
>> Either way, your best bet is probably to start with one of the existing
>> xscreensaver demos, included in the "hacks/" directory, rename the file,
>> and edit it until it does what you want.
>>
>> The "Greynetic" and "Deluxe" hacks are probably good ones to start with,
>> since they are so very simple.  For OpenGL programs, "DangerBall" is a
>> good example.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to