summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-23 12:09:48 +0200
committerwm4 <wm4@nowhere>2016-09-23 12:09:48 +0200
commitcaa14e3d45cc816d85d7ce0167b97a5ea3fbd794 (patch)
tree0c697ccc24f99b381e433687d1b20b128bf0e93a /player
parent3a436823555b4564775c602289d8bb682c435d90 (diff)
downloadmpv-caa14e3d45cc816d85d7ce0167b97a5ea3fbd794.tar.bz2
mpv-caa14e3d45cc816d85d7ce0167b97a5ea3fbd794.tar.xz
x11: fix external fullscreen update
On x11, you can change the fullscreen via the window manager and without mpv's involvement. In these cases, the internal fullscreen flag has to be updated. The hack used for this didn't really work properly. Change it accordingly. The important thing is that the shadow copy of the option is updated. This is still not really ideal. Fixes #3570.
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c
index c2795e0d40..fc4cfe859e 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -28,6 +28,7 @@
#include "options/options.h"
#include "common/common.h"
#include "common/encode.h"
+#include "options/m_config.h"
#include "options/m_property.h"
#include "common/playlist.h"
#include "input/input.h"
@@ -722,6 +723,14 @@ 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 fs = mpctx->opts->vo->fullscreen;
+ vo_control(vo, VOCTRL_GET_FULLSCREEN, &fs);
+ m_config_set_option_raw_direct(mpctx->mconfig,
+ m_config_get_co(mpctx->mconfig, bstr0("fullscreen")), &fs, 0);
+ }
}
static void handle_sstep(struct MPContext *mpctx)