Focus preferences window if already showing

Previously, if the prefwindow was behind another window, nothing would
happen when opening the preferences.