From c4b08a9a1149a83d7374eaea9863dd4c7cbd12d7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Jul 2013 14:05:39 +0200 Subject: video: remove fullscreen flags chaos There was a MPOpts fullscreen field, a mp_vo_opts.fs field, and VOFLAG_FULLSCREEN. Remove all these and introduce a mp_vo_opts.fullscreen flag instead. When VOs receive VOCTRL_FULLSCREEN, they are supposed to set the current fullscreen mode to the state in mp_vo_opts.fullscreen. They also should do this implicitly on config(). VOs which are capable of doing so can update the mp_vo_opts.fullscreen if the actual fullscreen mode changes (e.g. if the user uses the window manager controls). If fullscreen mode switching fails, they can also set mp_vo_opts.fullscreen to the actual state. Note that the X11 backend does almost none of this, and it has a private fs flag to store the fullscreen flag, instead of getting it from the WM. (Possibly because it has to deal with broken WMs.) The fullscreen option has to be checked on config() to deal with the -fs option, especially with something like: mpv --fs file1.mkv --{ --no-fs file2.mkv --} (It should start in fullscreen mode, but go to windowed mode when playing file2.mkv.) Wayland changes by: Alexander Preisinger Cocoa changes by: Stefano Pigozzi --- video/filter/vf_vo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf_vo.c b/video/filter/vf_vo.c index 22fa38f8d0..60113192b7 100644 --- a/video/filter/vf_vo.c +++ b/video/filter/vf_vo.c @@ -45,11 +45,10 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *p, int flags } const vo_info_t *info = video_out->driver->info; - mp_msg(MSGT_CPLAYER, MSGL_INFO, "VO: [%s] %dx%d => %dx%d %s %s%s\n", + mp_msg(MSGT_CPLAYER, MSGL_INFO, "VO: [%s] %dx%d => %dx%d %s %s\n", info->short_name, p->w, p->h, p->d_w, p->d_h, vo_format_name(p->imgfmt), - (flags & VOFLAG_FULLSCREEN) ? " [fs]" : "", (flags & VOFLAG_FLIPPING) ? " [flip]" : ""); mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Description: %s\n", info->name); mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Author: %s\n", info->author); -- cgit v1.2.3