There was a plugin that does this, maybe it is name is MouseSap.
Unfortunately this feature of Unix/X11 is not well supported in wxWidgets (wxGTK) and we can't implement it correctly.
If someone knows how to be done inside wxGTK, I'll be glad to take a look, because I find it annoying, too.