This is a gnome extension that will centre the mouse on the newly focused window when changing focus.
If the mouse is already in the window area, it will not move it.
I use this for multi monitor setups where I have a trackball. When changing focus between windows (usually on different monitors), instead of having to move the mouse over the whole length of the two monitors (from one window to the other), this extension will move my mouse to the other window when I use alt-tab
or super-tab
shortcuts.