Is this happening when you have firefox running and a webpage open, and then try to switch to another application window like gimp or thunar? It could be caused by the web page code i/e a page with images that allow mouse over zooming and also include keystroke shortcuts in the object code, something that is happening more these days because of android compatible pages.
TC