Windows & Mac types: Skip this post.
Window Manager Tweaks. Accessibility tab. Uncheck “Raise windows when any mouse button is pressed.” That drives me crazy too and it always takes me forever to remember where the setting is. Just had to do it recently, so it was fresh.
I have (thanks to $HOUSEMATE being VERY GENEROUS one birthday anniversary) a Very Nice trackball, with a scroll ring even… EXCEPT its driver defaults to the EVIL HORRID NO-DAMNED-GOOD WILL-GLEEFULLY-RAPE-YOUR-INNOCENT-DAUGHTERS-AND-THEN-BRAG-ABOUT-IT RATFINK vileness of “bump mouse to lose focus.” This post is ALL about fixing that BUG-FROM-HELL!