Fixed bug in Linux where focus is gained without being lost first