From 4a5cfb4323a276b920ab833ae3409064af58f322 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 4 Jul 2014 02:19:36 +0200 Subject: [PATCH] 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. --- video/out/x11_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));