1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-11 01:17:28 +00:00
mpv/player
Philip Langdale a220f08648 osc: implement pseudo client side decorations via OSC
Today, if window decorations are not present, either because they were
disabled, or because the platform doesn't support them
(eg: gnome-shell on wayland), there are no window controls, meaning it
is not possible to minimize/maximize/close a window without knowing
keyboard shortcuts.

While you can imagine various ways of offering client side decorations,
it is attractive to consider using OSC because that is functionality
that we already have.

The main work here is defining a separate input area from the main
OSC box with its own buttons, etc.

While we could probably handle auto-detection based on whether
decorations are present or not, it's manually controlled for now.

The window control logic is mostly disconnected from the OSC itself,
except in the case of the `topbar` layout, where there has to be
coordination so that the controls don't get drawn on top of each other.

I had to do fine-positioning of the buttons based on the font on
my system, so don't be surprised if it looks wrong elsewhere.

You could also argue that window controls should be unscaled, even
if the main OSC box is scaled, but I've not tried to do this.
2019-11-29 16:56:20 +08:00
..
javascript js: complex key binding: use key_name like the docs say 2019-11-20 16:55:21 +02:00
lua osc: implement pseudo client side decorations via OSC 2019-11-29 16:56:20 +08:00
audio.c command: shuffle some crap around 2019-11-25 00:26:36 +01:00
client.c player: remove mechanisms for better logging with repl.lua 2019-11-18 00:44:54 +01:00
client.h client API: remove unused global event mask 2019-10-24 16:27:24 +02:00
command.c command: add window-maximized and make window-minimized settable 2019-11-29 16:56:20 +08:00
command.h options: remove options-to-property bridge 2019-11-25 20:29:43 +01:00
configfiles.c player: Optionally validate st_mtime when restoring playback state 2019-11-20 15:11:33 +01:00
core.h command: shuffle some crap around 2019-11-25 00:26:36 +01:00
external_files.c
external_files.h
javascript.c js: don't pre-filter log level argument in mp.enable_messages() 2019-11-19 18:13:39 +02:00
loadfile.c player: remove mechanisms for better logging with repl.lua 2019-11-18 00:44:54 +01:00
lua.c lua: don't pre-filter log level argument in mp.enable_messages() 2019-11-18 00:44:54 +01:00
main.c options: remove options-to-property bridge 2019-11-25 20:29:43 +01:00
misc.c player: simplify --stream-dump code 2019-10-31 11:05:55 +01:00
osd.c player: format low cache duration with more decimals 2019-10-11 19:18:43 +02:00
playloop.c options: remove options-to-property bridge 2019-11-25 20:29:43 +01:00
screenshot.c screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
screenshot.h screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
scripting.c
sub.c
video.c options: deprecate --video-sync=display-adrop 2019-11-17 02:11:45 +01:00