uosc
uosc copied to clipboard
Change behavior of top bar "maximize" control
The "maximize" button in the top bar controls does not maximize mpv, but fullscreens it instead.
In my opinion, it would be more useful if it acted like every other maximize/restore button on windows, especially given the fact that a fullscreen control element already exists in uosc.
borderless maximize is buggy on windows. https://github.com/tomasklaen/uosc/issues/203
Yeah we have tons of issues with the maximize command in top bar, even on other systems. We even have a special handling function that determines what to do in different environments/scenarios so that it doesn't break stuff:
local function get_maximized_command()
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
And there are still issues (#795).
I'm pretty much ready to swap the maximize button to just toggle fullscreen everywhere and remove fullscreen button from default controls list.
For Windows suggested default configuration should be
title-bar=no
border=yes
and in uosc
window_border_size=0
to have all compositor features like limiting the window to work area and so on. border=no
is pure borderless window and it behaves differently as designed by Microsoft.
For Windows suggested default configuration should be
I get this ugly no top border look on Win 10:
I prefer the broken maximize button to be honest :)
Ah, this, yeah it is fixed in Windows 11. Couldn't fine a way to workaround this on Windows 10. Except obviously hiding all borders. Which actually might be better than this.
EDIT: Does this build help https://github.com/mpv-player/mpv/actions/runs/7129695802?pr=12894 ?
For Windows suggested default configuration should be
I get this ugly no top border look on Win 10:
I prefer the broken maximize button to be honest :)
try
autofit=100%
border=no
window-maximized=no
fullscreen=no
title-bar=no border=yes
and in uosc
window_border_size=0
This is exactly what I was looking for, maximizing works properly with this config. I did not know about all the intricacies surrounding this feature.
Does this build help https://github.com/mpv-player/mpv/actions/runs/7129695802?pr=12894 ?
With this all of the borders are gone completely, and maximizing produces a window that covers around 20px of the top of the taskbar.
With this all of the borders are gone completely
Expected, there is no easy way to workaround the top bar sizing issue on Windows 10, without removing WS_CAPTION
, which in turn would work as --no-border
.
While we could limit --no-border
size to work rect, it makes thing more complicated and the different behavior between --border
and --title-bar
is here so you can pick which behavior is preferred. (and I want to avoid adding too much custom sizing code...)
and maximizing produces a window that covers around 20px of the top of the taskbar.
I tested in VM briefly now, will be fixed by latest build in https://github.com/mpv-player/mpv/pull/12894 (https://github.com/mpv-player/mpv/actions/runs/7148952167)
So title-bar=no
will produce a window without borders on Win 10, and with borders on Win 11?
I don't personally care either way, asking just so that I know that there's no way for uosc to determine whether to draw our border or not depending on title-bar
state, and that it'll have to be done by users manually in their configs.
I will add visible-window-border
property to give that information to scripts, depending on what compositor is doing.
Also I need to fix this
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
because it shouldn't live in the lua script. And native OSC have the same issue already.
Just need to find some time to mess with this again.
how to Change behavior of top bar "maximize" control
in mpvnet?
how to use title-bar=no in mpvnet?
Here is not mpvnet's issue tracker. Why not ask your questions there?