Skip to content

Commit 3bf2ed2

Browse files
committed
Cleanup and handle fullscreen
1 parent 113b91c commit 3bf2ed2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/ShellClients/PanelWindow.vala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ public class Gala.PanelWindow : ShellWindow {
7070
hide_tracker.schedule_update ();
7171
}
7272
});
73+
74+
window.display.in_fullscreen_changed.connect (() => {
75+
if (wm.get_display ().get_monitor_in_fullscreen (window.get_monitor ())) {
76+
hide ();
77+
} else if (hide_mode == NEVER) {
78+
show ();
79+
} else {
80+
hide_tracker.update_overlap ();
81+
}
82+
});
7383
}
7484

7585
#if HAS_MUTTER45
@@ -107,6 +117,10 @@ public class Gala.PanelWindow : ShellWindow {
107117
}
108118

109119
private void show () {
120+
if (window.display.get_monitor_in_fullscreen (window.get_monitor ())) {
121+
return;
122+
}
123+
110124
remove_state (CUSTOM_HIDDEN, default_gesture_tracker);
111125
}
112126

src/ShellClients/ShellWindow.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public class Gala.ShellWindow : PositionedWindow {
99
[Flags]
1010
public enum State {
1111
CUSTOM_HIDDEN,
12-
DESKTOP,
13-
MULTITASKING_VIEW
12+
MULTITASKING_VIEW,
13+
DESKTOP
1414
}
1515

1616
private const State HIDING_STATES = CUSTOM_HIDDEN | MULTITASKING_VIEW;

0 commit comments

Comments
 (0)