Decoupling fullscreen behavior from the generalized border logic
increases the complexity and also inherently changes the behavior in a
way that is not neccesarily desirable. People in IRC notably were
confused about the window controls not being shown in fullscreen because
of this change. We could default the option to yes, but then there will
likely be people confused as to why they suddenly now have the controls
when it wasn't there previously. The best way to avoid all this is just
undo it. If someone wants special fullscreen behavior with
windowcontrols, this can be done with auto profiles already. There's not
much utility in having a separate option.
This reverts commit 3b66428152.
There is concern that with certain user options or script the value of
`{sub,osd}-margin-y` value may be persisted or overwrite user option
when it's changed while OSD is visible and offset is applied.
Fix this by using dedicated option.
This allows to retain deadzone in the middle of the screen when both top
and bottom bars are enabled. We also doesn't have to show bars that
early before moving mouse down.
If `no-border` or `no-title-bar` was used, window controls would enable
also in fullscreen, this was inconsistent, as window decorations are not
visible ragardless of those options in fullscreen mode.
Those zones use input sections, but in OSC we allow them to overlap. So,
we might switch to the other section, after which point we won't get
mouse_leave event that would hide the bar for the other section.
This makes hidding/showing WC and OSC more consistent.
get_virt_mouse_pos() can return dummy -1, -1 in some cases, for example
when mouse is not considered "in" the area. render() is called
immediately and sets the initial mouse position to -1, -1 when the first
tick happens.
When starting player and mouse is already on the window but not moved,
then move the mouse, the mouse_move handler thinks that the mouse moved
from -1, -1 to the current position, triggering showing even when the
amount moved is less than osc-minmousemove.
Fix this by not letting render() init mouse position if the position is
dummy -1.
Volume icon in the OSC did not update when mute toggled or
volume changed while playback was paused and mouse was idle.
This commit adds observers for mute and volume properties to
request_tick(), ensuring OSC updates immediately on mute or
volume changes, even if playback is paused and mouse is idle.
On some compositors, when all touch points disappear the compositors
reset the mouse position, which moves the mouse out of the osc element
trigger area so mouse up events do not happen.
Fix this by tracking the last touch position and use that as the virt
mouse position if the screen is recently touched.
And move show-text ${path} to middle click. This is more useful than the
replaced show-text ${filename} binding since the left click stats
binding already shows the filename, and it matches how right clicking
other buttons shows menus. Alternatively middle click could also be
bound to select-watch-later.
1a558bf5c2 effectively aliased the custom
OSC printing to actual mpv properties instead. These only exist for
backwards compatibility which hopefully will get removed one day so
instead deprecate them and warn users of what they should be using.
Add the generic menu to bar layouts to provide discoverability for the
select menus to users who don't realize you can right click OSC buttons.
There's no space to add it in box layout.
This reverts commit 2dd5bd4cd1.
Instead of drawing the box layout below any other overlay with z >= 0
which may not be wanted, the next commit will increase console's z only
in select mode instead.
Define the icon font and icons in variables instead of scattering them
throughout the code to make it easy to change them in the future, or for
forks to change them. Also put the hex values in comments to easily
compare which icons in the font are unused, and explain how to get the
decimal values of the bytes.
Copied from ModernX.
Right clicking playlist arrows already opens the playlist selector so
bind something else to right clicking the title. Make it show the full
path which is useful but not bound anywhere on either the keyboard or
the OSC.
- It makes more sense to select a playlist entry from the buttons that
navigate the playlist than from the title
- Provides different bindings for right and middle click
- Mirrors chapter button bindings
console is drawn below the OSC. This looks bad only with layout=box
because there is no user-data/osc/margins so it overlaps with it. Fix it
by using z -1 with box layout.
Follow up to 86d24b0 and 9c22d6b.
Introduced a new `fadein` option to control the fade-in effect for the OSC.
The default value is `no`, which disables fade-in. This option allows users
to enable a fade-in effect when the OSC appears. Updated documentation
accordingly.