From 96b57b259ee6ca547564c20745531804deff0f0d Mon Sep 17 00:00:00 2001 From: christoph-heinrich Date: Wed, 15 Nov 2023 20:14:10 +0100 Subject: [PATCH] fix: make maximize workaround windows specific (#795) --- src/uosc/elements/TopBar.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/uosc/elements/TopBar.lua b/src/uosc/elements/TopBar.lua index afb52fb4..694a71e1 100644 --- a/src/uosc/elements/TopBar.lua +++ b/src/uosc/elements/TopBar.lua @@ -54,9 +54,12 @@ function TopBar:init() self.main_title, self.alt_title = nil, nil local function get_maximized_command() - return state.border - and (state.fullscreen and 'set fullscreen no;cycle window-maximized' or 'cycle window-maximized') - or 'set window-maximized no;cycle fullscreen' + if state.platform == 'windows' then + return state.border + and (state.fullscreen and 'set fullscreen no;cycle window-maximized' or 'cycle window-maximized') + or 'set window-maximized no;cycle fullscreen' + end + return state.fullormaxed and 'set fullscreen no;set window-maximized no' or 'set window-maximized yes' end -- Order aligns from right to left