diff options
author | wm4 <wm4@nowhere> | 2017-08-21 15:14:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-21 15:15:55 +0200 |
commit | 437469c103a1c5a45f7df0463b46c183bb48d3af (patch) | |
tree | aeebed0df85165fe1e89e4a7e3a5292a9896c5b6 /video | |
parent | 028faacff56d7f90f6b119b0b0ac686fd614825f (diff) | |
download | mpv-437469c103a1c5a45f7df0463b46c183bb48d3af.tar.bz2 mpv-437469c103a1c5a45f7df0463b46c183bb48d3af.tar.xz |
x11: fix that window could be resized when using embedding
Somewhat lazy fix. The code isn't particularly robust or correct wrt.
window embedding.
Fixes #4784.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/x11_common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 30ad89746f..ffb97d5516 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -997,6 +997,9 @@ static void vo_x11_check_net_wm_state_fullscreen_change(struct vo *vo) { struct vo_x11_state *x11 = vo->x11; + if (x11->parent) + return; + if (x11->wm_type & vo_wm_FULLSCREEN) { int num_elems; long *elems = x11_get_property(x11, x11->window, XA(x11, _NET_WM_STATE), @@ -1777,7 +1780,7 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) } case VOCTRL_GET_UNFS_WINDOW_SIZE: { int *s = arg; - if (!x11->window) + if (!x11->window || x11->parent) return VO_FALSE; s[0] = x11->fs ? RC_W(x11->nofsrc) : RC_W(x11->winrc); s[1] = x11->fs ? RC_H(x11->nofsrc) : RC_H(x11->winrc); @@ -1785,7 +1788,7 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) } case VOCTRL_SET_UNFS_WINDOW_SIZE: { int *s = arg; - if (!x11->window) + if (!x11->window || x11->parent) return VO_FALSE; struct mp_rect rc = x11->winrc; rc.x1 = rc.x0 + s[0]; |