Skip to content

Commit df2c76c

Browse files
committed
code readability
1 parent 953993b commit df2c76c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

js/ui/panel.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3728,16 +3728,12 @@ Panel.prototype = {
37283728
}
37293729

37303730
const focusedWindow = global.display.get_focus_window();
3731-
if (focusedWindow && focusedWindow.is_fullscreen() && focusedWindow.get_monitor() === this.monitorIndex
3732-
&& this._panelHasOpenMenus()) {
3733-
// An applet has been opened by shortcut key over a fullscreened window so remove
3734-
// focus from fullscreened window so that chrome remains visible until fullscreened
3735-
// window is focused again by user.
3736-
this._focusDesktop();
3737-
} else if (focusedWindow && focusedWindow.get_monitor() !== this.monitorIndex
3738-
&& global.display.get_monitor_in_fullscreen(this.monitorIndex) && this._panelHasOpenMenus()) {
3739-
// Focused window is on other monitor but this monitor has a fullscreened window so
3740-
// remove focus from other window so that chrome remains visible until a window is focused
3731+
if (this._panelHasOpenMenus() && focusedWindow &&
3732+
(focusedWindow.get_monitor() === this.monitorIndex && focusedWindow.is_fullscreen() ||
3733+
focusedWindow.get_monitor() !== this.monitorIndex && global.display.get_monitor_in_fullscreen(this.monitorIndex))) {
3734+
// An applet has been opened by shortcut key either over a focused fullscreened window or on a monitor with a
3735+
// fullscreened window (while focused window is on a different monitor), so focus desktop on current monitor
3736+
// so that chrome (panel) remains visible and usable until the fullscreened window is again focused by user.
37413737
this._focusDesktop();
37423738
}
37433739

0 commit comments

Comments
 (0)