1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-23 11:47:45 +00:00
mpv/DOCS/man
Guido Cella 9b9ce74afa command: add read-only focused property
Add a property that returns whether the window is focused, currently
only for X11 and Wayland.

My use cause for this is having an equivalent of pause-when-minimize.lua
for tiling window managers: make mpv play only while it's in the current
workspace or is focused (I'm fine with either one but prefer focus).
On X I do this by observing display-names, which is empty when the
rectangles of the display and mpv don't intersect, but on Wayland its
value doesn't change when mpv leaves the current workspace (and the same
check doesn't work since the geometries still intersect).

This could later be made writable as requested in .

Note that on Wayland se shouldn't consider an unactivated window with
keyboard input focused.

The wlroots compositors I tested set activated after changing the
keyboard focus, so if you set wl->focused only in
keyboard_handle_enter() and keyboard_handle_leave() to avoid adding the
"has_keyboard_input" member, focused isn't set to true when first
opening mpv until you focus another window and focus mpv again.

Conversely, if that order can't be assumed for all compositors, we
should toggle wl->focused when necessary in keyboard_handle_enter() and
keyboard_handle_leave() as well as in handle_toplevel_config().
2020-09-08 20:09:17 +02:00
..
af.rst audio: add scaletempo2 filter based on chromium 2020-07-27 00:57:22 +02:00
ao.rst manpage: drop --sdl-bufcnt after 346c687d5a 2020-07-21 15:08:47 +02:00
changes.rst manpage: directly link interface-changes.rst in changelog section 2020-02-21 14:34:02 +01:00
console.rst console: use hidpi scale reporting 2019-12-20 13:00:39 +01:00
encode.rst manpage: explain deprecated usage of multiple items with *-add 2020-01-07 18:13:12 +01:00
input.rst command: add read-only focused property 2020-09-08 20:09:17 +02:00
ipc.rst scripting: make socket FD number for subprocesses dynamic 2020-05-15 16:37:41 +02:00
javascript.rst js: hooks: allow deferred continuation (match d0ab562b) 2020-08-07 15:12:20 +03:00
libmpv.rst manpage: define stricter rules for C plugin return values 2017-01-14 17:41:04 +01:00
lua.rst lua: make hook processing more flexible 2020-08-05 23:19:41 +02:00
mpv.rst manpage: fix typo 2020-09-06 10:45:28 -04:00
options.rst audio: fix stream-silence with push AOs (somewhat) 2020-09-03 22:39:23 +02:00
osc.rst manpage: clarify requirements for boxvideo 2020-08-04 15:20:24 -05:00
stats.rst stats: UP/DOWN scrolling on page 2 (frame stats) 2020-05-17 20:11:50 +02:00
vf.rst video: add alpha type metadata 2020-04-24 14:41:50 +02:00
vo.rst DOCS/vo.rst: TCT: add note on interleaved output 2020-08-16 12:26:27 +03:00