Re: monitor mouse coordinates in real-time

2011-08-17 Thread Jabba Laci
Hi, Thanks, the problem got solved. The updated version can be found at https://gist.github.com/1144708 in a comment below the original post. Solution: self.connect("destroy", self.quit) def quit(self, widget): self.mouseThread.kill() gtk.main_quit() It was not evident that quit

Re: monitor mouse coordinates in real-time

2011-08-14 Thread Jabba Laci
I'm trying something similar. In the thread there is a variable which is modified by the parent. However, the thread doesn't quit the infinite loop. If someone could provide a patch, that'd be really useful. Thanks, Laszlo On Sun, Aug 14, 2011 at 13:00, TheSaint wrote: > Jabba Laci wrote: > >>

Re: monitor mouse coordinates in real-time

2011-08-14 Thread TheSaint
Jabba Laci wrote: > Could you please help me out how to close the application correctly? > I think you should put a flag into the code, which the parent might modify it, so it will tell the child process to quit. Then the flag should need to be read periodically to know whether is time to quit.

monitor mouse coordinates in real-time

2011-08-14 Thread Jabba Laci
Hi, I wrote a simple GUI with pygtk to monitor mouse coordinates in real-time. It works but when I close the application, the thread doesn't stop and I can't figure out how to terminate it. Here is the current source: https://gist.github.com/1144708 (83 lines). Could you please help