Posted on 2007-05-20
After a little bit of hacking, I've got the original compiz plugin working with input enabled. Since the plugin doesn't get MotionNotify events when input isn't grabbed, it has to fetch the motion from other places though. So far I've solved this by fetching in DonePaintScreen() which works very well for me, but both common sense and early reports indicate that it's not enough. The result is a little choppy.
The solution should be fairly simple. Either just add it to a timeout, which is what Beryl's inputzoom plugin does, or... Ok, I guess that's the only real option I can come up with, except modifying core.
In addition to enabeling input, I've also gotten basic focus tracking up. This is by no means well-implemented yet, nor am I satisfied with it. There's two major issues:
The first problem is a fundamental problem that will probably take a lot of tweaking. So far I've added a hardcoded delay (which will be configurable soon) in when to activate focus tracking. This helps avoid jumping around when sloppy focus changes the focus, as focus tracking won't do anything if the mouse has recently moved. This is a fairly reasonable way of doing things, that I'm happy with. I also intend to add a few other mechanism for making the focus tracking more natural. The lack of input transformation really underlines this problem too, since the mouse pointer will jump whenever the zoom area is moved. However, if input transformation was implemented, it would be trivial to disable this mouse wrapping.
As for the bugged zoom area function, that's another story. Basicly, I've come to the conclusion that I can't actually do math while sitting in front of a computer. Right now, the function works after a fashion, for the first zoom level it's also precise. For any other zoom levels, it misses a little bit. This is what I'll be working on next.
I still haven't decided wether this will be an entirely new plugin, or to attempt to get it accepted into the compiz core package. Since it will eventually rely on AT-SPI, I am not sure it makes sense to attempt to get it into the core compiz package, and this is exactly what opencompositing.org is for, anyway. Either way, it'll be easily available to anyone wanting to use it.
As a last note, I've set up a launchpad project for google summer of code. So far I haven't actually started using it, but I intend to use it. You can find it at https://launchpad.net/compiz-zoom (https://launchpad.net/compiz-zoom).