PDA

View Full Version : python-xlib woes


polin8
11-23-2002, 01:42 PM
I'm trying my hand at python-xlib, was wondering if anyone has used it.

I can happily create a window, put text on it and make it go away with an X.ButtonPress event. But unfortunately I can't figure out how to make new window react only to events that happen to them (ie, in the new window, not the root window). Any one have any pointers?

EscapeCharacter
11-23-2002, 05:23 PM
i dont know how to do it in pythong but if you are doing it in straight xlib you would check the XKeyEvent structure for its window attribute and see if it matches the window you generated the event on, i know thats not what you wanted to hear but hopefully it point you in the right direction, good luck :)

polin8
11-25-2002, 04:50 PM
Thanks, good pointer, I was looking at the python-xlibs docs and should have been looking at the regular xlibs docs, makes alot more sense now ;)