diff options
author | wm4 <wm4@nowhere> | 2019-11-29 12:50:50 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-29 13:56:58 +0100 |
commit | 4e4252f9169edc00c747ffc66fe0b627bbca7ba7 (patch) | |
tree | f3a9c199efe81493bfdaf97f1b0af39782afa962 /video/out/vo.h | |
parent | b16cea750f527088be79772e7cd601f86ce62ef2 (diff) | |
download | mpv-4e4252f9169edc00c747ffc66fe0b627bbca7ba7.tar.bz2 mpv-4e4252f9169edc00c747ffc66fe0b627bbca7ba7.tar.xz |
x11: use new option stuff to implement fullscreen
- remove VOCTRL_FULLSCREEN and VOCTRL_GET_FULLSCREEN
- have your own m_config_cache for the fullscreen option
(vo->opts_cache cannot be used because you lose per-option change
notifications, and it'd be a mess anyway)
- use VOCTRL_VO_OPTS_CHANGED to update it
(it's used for convenience)
- when updating it, check for the fullscreen option
(wasn't sure how to do it best; currently, it compares the raw
option pointers, but this could be changed)
- do not send VO_EVENT_FULLSCREEN_STATE on FS change
- instead write the option on FS change
(assign in opt. struct + m_config_cache_write_opt)
Diffstat (limited to 'video/out/vo.h')
-rw-r--r-- | video/out/vo.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/video/out/vo.h b/video/out/vo.h index a02412a8ea..68d8273937 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -43,7 +43,8 @@ enum { VO_EVENT_AMBIENT_LIGHTING_CHANGED = 1 << 4, // Special mechanism for making resizing with Cocoa react faster VO_EVENT_LIVE_RESIZING = 1 << 5, - // Window fullscreen state changed via external influence. + // Legacy. Use m_config_cache_write_opt() instead to update the fullscreen + // option. VO_EVENT_FULLSCREEN_STATE = 1 << 6, // Special thing for encode mode (vo_driver.initially_blocked). // Part of VO_EVENTS_USER to make vo_is_ready_for_frame() work properly. @@ -67,6 +68,10 @@ enum mp_voctrl { VOCTRL_SET_PANSCAN, VOCTRL_SET_EQUALIZER, + // Trigger by any change to mp_vo_opts. This is for convenience. In theory, + // you could install your own listener. + VOCTRL_VO_OPTS_CHANGED, + /* private to vo_gpu */ VOCTRL_LOAD_HWDEC_API, @@ -80,12 +85,13 @@ enum mp_voctrl { VOCTRL_UNINIT, VOCTRL_RECONFIG, + // Legacy stuff. VOCTRL_FULLSCREEN, VOCTRL_ONTOP, VOCTRL_BORDER, VOCTRL_ALL_WORKSPACES, - VOCTRL_GET_FULLSCREEN, + VOCTRL_GET_WIN_STATE, // int* (VO_WIN_STATE_* flags) VOCTRL_UPDATE_WINDOW_TITLE, // char* VOCTRL_UPDATE_PLAYBACK_STATE, // struct voctrl_playback_state* @@ -102,8 +108,6 @@ enum mp_voctrl { VOCTRL_GET_UNFS_WINDOW_SIZE, // int[2] (w/h) VOCTRL_SET_UNFS_WINDOW_SIZE, // int[2] (w/h) - VOCTRL_GET_WIN_STATE, // int* (VO_WIN_STATE_* flags) - // char *** (NULL terminated array compatible with CONF_TYPE_STRING_LIST) // names for displays the window is on VOCTRL_GET_DISPLAY_NAMES, |