mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 21:27:08 +00:00
osc: add missing window controls for --title-bar=no
This commit is contained in:
parent
bb15c50658
commit
ad093567e8
@ -439,7 +439,7 @@ end
|
|||||||
function window_controls_enabled()
|
function window_controls_enabled()
|
||||||
val = user_opts.windowcontrols
|
val = user_opts.windowcontrols
|
||||||
if val == "auto" then
|
if val == "auto" then
|
||||||
return not state.border
|
return not (state.border and state.title_bar)
|
||||||
else
|
else
|
||||||
return val ~= "no"
|
return val ~= "no"
|
||||||
end
|
end
|
||||||
@ -2786,6 +2786,12 @@ mp.observe_property("border", "bool",
|
|||||||
request_init_resize()
|
request_init_resize()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
mp.observe_property("title-bar", "bool",
|
||||||
|
function(name, val)
|
||||||
|
state.title_bar = val
|
||||||
|
request_init_resize()
|
||||||
|
end
|
||||||
|
)
|
||||||
mp.observe_property("window-maximized", "bool",
|
mp.observe_property("window-maximized", "bool",
|
||||||
function(name, val)
|
function(name, val)
|
||||||
state.maximized = val
|
state.maximized = val
|
||||||
|
Loading…
Reference in New Issue
Block a user