From: Bryan O. <oa...@ba...> - 2006-01-03 16:13:08
|
Jeff Hobbs wrote: > I'm coming a bit late into this conversation (just getting back > from vacation), but if you are doing this on mouse clicks, why > not just use the binding mechanism already in Tk? You can use > that from C as well. [winfo pointerxy] isjust %X and %Y. Because I'm not using the tk event loop to get the event. I'm attempting to track a mouse click along the edge of the screen when my app is *not* the foreground app. I'm using ffidl to call InstallEventHandler with [GetEventMonitorTarget] as one of the parameters. It works, though I have another problem. The click I detect will have already caused some other program to come to the front. I need to figure out what process was in front before the click. In other words, if I click on the left edge of the screen and my app wasn't the foreground app, I want it to be the foreground app. If it was the foreground app, I want to hide it. Yeah, I know I'm breaking some rules here. It's for my own use (at the moment, anyway) but I'm only trying to follow the law! (Fitts law, to be exact :-) |