command, vo: remove old option change notification mechanisms

These all have been replaced recently.

There was a leftover in window.swift. It couldn't have done anything
useful in the current state of the code, so drop these lines.
This commit is contained in:
wm4 2019-12-17 23:18:17 +01:00
parent 13dff3073d
commit 2a4d7c4aa8
4 changed files with 3 additions and 39 deletions

View File

@ -6117,19 +6117,8 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
}
}
if (mpctx->video_out) {
if (opt_ptr == &opts->vo->fullscreen) {
vo_control(mpctx->video_out, VOCTRL_FULLSCREEN, 0);
if (!opts->vo->fullscreen)
mpctx->mouse_event_ts--; // Show mouse cursor
}
if (opt_ptr == &opts->vo->ontop)
vo_control(mpctx->video_out, VOCTRL_ONTOP, 0);
if (opt_ptr == &opts->vo->border)
vo_control(mpctx->video_out, VOCTRL_BORDER, 0);
if (opt_ptr == &opts->vo->all_workspaces)
vo_control(mpctx->video_out, VOCTRL_ALL_WORKSPACES, 0);
}
if (opt_ptr == &opts->vo->fullscreen && !opts->vo->fullscreen)
mpctx->mouse_event_ts--; // Show mouse cursor
if (opt_ptr == &opts->vo->taskbar_progress)
update_vo_playback_state(mpctx);

View File

@ -845,17 +845,6 @@ static void handle_vo_events(struct MPContext *mpctx)
mp_notify(mpctx, MP_EVENT_WIN_RESIZE, NULL);
if (events & VO_EVENT_WIN_STATE)
mp_notify(mpctx, MP_EVENT_WIN_STATE, NULL);
if (events & VO_EVENT_FULLSCREEN_STATE) {
// The only purpose of this is to update the fullscreen flag on the
// playloop side if it changes "from outside" on the VO.
int old_fs = mpctx->opts->vo->fullscreen;
int fs = old_fs;
vo_control(vo, VOCTRL_GET_FULLSCREEN, &fs);
if (old_fs != fs) {
m_config_set_option_raw(mpctx->mconfig,
m_config_get_co(mpctx->mconfig, bstr0("fullscreen")), &fs, 0);
}
}
}
static void handle_sstep(struct MPContext *mpctx)

View File

@ -230,7 +230,6 @@ class Window: NSWindow, NSWindowDelegate {
setFrame(targetFrame, display: true)
endAnimation()
isInFullscreen = true
cocoaCB.flagEvents(VO_EVENT_FULLSCREEN_STATE)
cocoaCB.layer?.update()
}
@ -242,7 +241,6 @@ class Window: NSWindow, NSWindowDelegate {
styleMask.remove(.fullScreen)
endAnimation()
isInFullscreen = false
cocoaCB.flagEvents(VO_EVENT_FULLSCREEN_STATE)
cocoaCB.layer?.update()
}

View File

@ -45,14 +45,13 @@ enum {
VO_EVENT_LIVE_RESIZING = 1 << 5,
// 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.
VO_EVENT_INITIAL_UNBLOCK = 1 << 7,
// Set of events the player core may be interested in.
VO_EVENTS_USER = VO_EVENT_RESIZE | VO_EVENT_WIN_STATE |
VO_EVENT_FULLSCREEN_STATE | VO_EVENT_INITIAL_UNBLOCK,
VO_EVENT_INITIAL_UNBLOCK,
};
enum mp_voctrl {
@ -85,14 +84,6 @@ 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*
@ -132,9 +123,6 @@ enum mp_voctrl {
VOCTRL_EXTERNAL_RESIZE,
};
// VOCTRL_GET_WIN_STATE (legacy, ignored)
#define VO_WIN_STATE_MINIMIZED (1 << 0)
#define VO_TRUE true
#define VO_FALSE false
#define VO_ERROR -1