diff options
author | wm4 <wm4@nowhere> | 2014-07-04 02:19:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-04 02:23:05 +0200 |
commit | 4a5cfb4323a276b920ab833ae3409064af58f322 (patch) | |
tree | 8ff481af59e2378ecf0292950ae8a25b10704932 /video/out/x11_common.c | |
parent | 97f6d7f4ec255f126d76fb6d3bc0d60f0e23f7b6 (diff) | |
download | mpv-4a5cfb4323a276b920ab833ae3409064af58f322.tar.bz2 mpv-4a5cfb4323a276b920ab833ae3409064af58f322.tar.xz |
x11: avoid obscure behavior when --wid is partially garbage
Cast away the "extra" bits (since apparently Window/XID is always
32 bit unsigned). This is not striclty needed, because you're not
supposed to pass garbage to --wid, just because the upper bits are
possibly not interpreted. But if you do so, this change increases
consistency in behavior and removes a strange behavior that was
thought to be a bug.
Also see github issue #906.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index eb4fb158f8..f43c5c03a8 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -777,7 +777,7 @@ int vo_x11_check_events(struct vo *vo) if (x11->window == None) break; vo_x11_update_geometry(vo); - if (Event.xconfigure.window == vo->opts->WinID) { + if (Event.xconfigure.window == (Window)vo->opts->WinID) { XMoveResizeWindow(x11->display, x11->window, x11->winrc.x0, x11->winrc.y0, RC_W(x11->winrc), RC_H(x11->winrc)); |