Much ado about scripting, Linux & Eclipse: card subject to change


Focus Follows Mouse

Thanks to Deepak Bhagat for the idea of this, and Wayne Beaton for most of the code.

Here's a quick & dirty eclipse plugin to make focus follow your mouse, with a toggle button to turn it on and off (because it can get rather annoying in wizards). EPL, of course.

org.eclipse.xmouse plugin, project w/ source

If you make this better, let me know, thanks!


Steve said...

Most operating system, including Windows, have a setting for this. You should try it out. That way, the whole desktop (including Eclipse) would work that way.

Nick said...

Well, sure, but then *everything* would work that way. I just want Eclipse widgets to follow me around; hence the plugin.

raould said...

Thank you for this - you have saved me from having a heart attack from being so annoyed and stressed out about how utterly broken Eclipse is when it comes to basic usability. Well, OK, while this "hack" (in the good sense of the word) doesn't mean Eclipse stops entirely sucking, it sure reduces the suck by large amounts.

Folks who claim either a) that Windows doesn't support it (platform-swt-dev)
or b) has some control panel setting to make it work are, as far as I can tell empirically with this local WinXP setup, smoking bad, bad crack.

Pardon my vitriol.

raould said...

Oh. Wait. Now I see what you mean about it being annoying with Wizards. Ah, this is pretty un-usable as-is. I need to learn how to hack it to ignore dialog boxes (e.g. so when I'm simply trying to search for text, it doesn't do clearly insane things usability wise in that dialog box). Here's me wishing I had time & energy to learn Eclipse hackery. Still, many thanks for the effort. It is so close... and at least shows that the Right Thing could be done with SWT.

Stu said...

raould: You need to install tweakui... the support is in windows, all this does is change a registry setting... but no, it's not in the control panel by default...

Eclipse is annoying with X Mouse, it keeps popping to the front :-\

Nick said...

Yes, for Windows people tweakui works well if you want all your apps to follow the mouse, but if you just want views in Eclipse to do that, then this is one way to accomplish that which isn't locked in to prereq'ing Windows.

Will said...

Good stuff, gives me the intra-window mouse focus I wanted, instead of the inter-window behavior set by TweakUI.

But I noticed that it's not exactly the same behavior as with some other Windows apps, such as MS Outlook, which enables the scroll bar within the region under the mouse without actually _switching_ focus to the control/region under the mouse. This avoids some of that "annoying" behavior with dialogues and similar (e.g., displaying the keyboard shortcuts with Ctl-Shft-L is incompatible with your plugin).

I poked around a little more and found another mouse-focus plugin that avoids this problem, by delaying the focus switch until the scrollwheel is actually used.

El Erbmocnoc Euqsam said...

Focus follows mouse on Windows: yes, there is a secret setting. Bit 1 (little endian) of registry entry
HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferencesMask
enables focus follows mouse.
I changed mine from 90 52 00 80 to 91 52 00 80 and rebooted, now focus follows the mouse... Except in Eclipse. I wish I didn't have to click in panes before I can scroll using the mouse scroll wheel...

BlueRayONE said...

Does this work with the newest Eclipse?

Where is the button :D?!

BlueRayONE said...

Does this plugin still work with the newest version of Eclipse?

I'm asking because I can't find the toggle-button. Where should he be?