From 8df5c38357f61f823419c0ddef591daf5399a9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 22 Feb 2021 13:14:49 +0100 Subject: [PATCH] Fix missing headerbar menu in Flatpak build --- src/headerbarBase.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/headerbarBase.js b/src/headerbarBase.js index a4ab8b44..3bf511b7 100644 --- a/src/headerbarBase.js +++ b/src/headerbarBase.js @@ -137,14 +137,21 @@ class ClapperHeaderBarBase extends Gtk.Box const layoutArr = modLayout.split(','); let lastWidget = null; + let showMinimize = false; let showMaximize = false; let showClose = false; + + let menuAdded = false; let spacerAdded = false; debug(`headerbar layout: ${modLayout}`); for(let name of layoutArr) { + /* Menu might be named "appmenu" */ + if(!menuAdded && name === 'appmenu') + name = 'menu'; + const widget = this[`${name}Widget`]; if(!widget) continue; @@ -168,6 +175,7 @@ class ClapperHeaderBarBase extends Gtk.Box break; case 'menu': this.setMenuOnLeft(!spacerAdded); + menuAdded = true; break; default: break;