Sometimes in Ubuntu 12.04 (no modifications), when application X is on top of the screen (i.e. it is the window that I see), the close and minimise buttons are not from application X.
Thus, when I click 'close' suddenly another application gets closed and not the one that appeared on top. Why is this so? And how can I fix it?