topbar: Handle visibility correctly when fullscreen is toggled

This commit is contained in:
Tor Hedin Brønner
2018-04-12 17:02:47 +02:00
parent 0c7f454878
commit 030b030eab

View File

@@ -27,6 +27,18 @@ function enable () {
updateWorkspaceIndicator(to);
}));
screenSignals.push(
global.screen.connect('in-fullscreen-changed',
(screen) => {
let workspace = global.screen.get_active_workspace();
let space = Tiling.spaces.spaceOf(workspace);
if (space.selectedWindow.fullscreen) {
hide();
} else {
show();
}
}));
panelBoxShowId = panelBox.connect('show', show);
panelBoxHideId = panelBox.connect('hide', () => {
let space = Tiling.spaces.spaceOf(global.screen.get_active_workspace());