osc: add missing window controls for --title-bar=no

This commit is contained in:
Kacper Michajłow 2023-11-25 16:32:37 +01:00 committed by Dudemanguy
parent bb15c50658
commit ad093567e8
1 changed files with 7 additions and 1 deletions

View File

@ -439,7 +439,7 @@ end
function window_controls_enabled()
val = user_opts.windowcontrols
if val == "auto" then
return not state.border
return not (state.border and state.title_bar)
else
return val ~= "no"
end
@ -2786,6 +2786,12 @@ mp.observe_property("border", "bool",
request_init_resize()
end
)
mp.observe_property("title-bar", "bool",
function(name, val)
state.title_bar = val
request_init_resize()
end
)
mp.observe_property("window-maximized", "bool",
function(name, val)
state.maximized = val