diff options
author | wm4 <wm4@nowhere> | 2015-03-09 11:46:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-09 11:46:16 +0100 |
commit | b7f242dfcf600b6ec8a861218df5fc0b71217455 (patch) | |
tree | 92073ba9a28d7e433494e830760302fd8997be99 /video | |
parent | a26ea5069412c74e7d68599c6299331bfcd64030 (diff) | |
download | mpv-b7f242dfcf600b6ec8a861218df5fc0b71217455.tar.bz2 mpv-b7f242dfcf600b6ec8a861218df5fc0b71217455.tar.xz |
x11: fix VOCTRL_GET_WIN_STATE
Do not rely on the pointed-to argument to be initialized; VOCTRLs are
supposed to completely overwrite them on success (or not to touch them
on failure).
The currently only caller of VOCTRL_GET_WIN_STATE initializes the value
before calling this, so this is merely about correctness and didn't lead
to any actual bugs.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/x11_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 3ae753a234..2fef802ae8 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1675,6 +1675,7 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) case VOCTRL_GET_WIN_STATE: { if (!x11->pseudo_mapped) return VO_FALSE; + *(int *)arg = 0; int num_elems; long *elems = x11_get_property(x11, x11->window, XA(x11, _NET_WM_STATE), XA_ATOM, 32, &num_elems); |