Worth a check if things are going wrong.
I installed some emulators including PCSX2 & ReDream. Both when capturing my xbox 360 controller would not release outside the emulation box and they would also cause the mouse and select buttons to activate causing weird things like selection menu's & random open folders to pull to the front and be activated.
Turns out when I installed something it must have also installed the capture mouse package. By uninstalling xserver-xorg-input-joystick
it freed up the mouse to act separately again.
I just removed it through symantic package installer rather than the command line. Just to be sure I CTL ALT DEL to reach the login screen and logged out and in again.
Everything worked fine then.
xserver-xorg-input-joystick