Re: [pygtk] How to get the X window ID?

2002-01-18 Thread Martin Grimme

Hello,

 Is there an easy way to get the X window ID from an pygtk window?


If you are working with the stable version of PyGTK, there is an
easy way:

  1. Your window must be realized. You can realize it by calling 'realize()' on it.
 If your window is already visible, you don't have to realize it.

  2. Get the GdkWindow of your GtkWindow.

  3. The GdkWindow has the attribute 'xid' which is what you want.

Example:


from gtk import *

win = GtkWindow()
win.show()

gdkwin = win.get_window()
xid = gdkwin.xid

print xid


Bye, Martin Grimme -- http://www.pycage.de
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] How to get the X window ID?

2002-01-17 Thread Markus Schaber

Hi,

Is there an easy way to get the X window ID from an pygtk window?

I need this for communication with an external program.

Thanks,
Markus
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk