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.
This commit is contained in:
wm4 2014-07-04 02:19:36 +02:00
parent 97f6d7f4ec
commit 4a5cfb4323
1 changed files with 1 additions and 1 deletions

View File

@ -777,7 +777,7 @@ int vo_x11_check_events(struct vo *vo)
if (x11->window == None) if (x11->window == None)
break; break;
vo_x11_update_geometry(vo); 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, XMoveResizeWindow(x11->display, x11->window,
x11->winrc.x0, x11->winrc.y0, x11->winrc.x0, x11->winrc.y0,
RC_W(x11->winrc), RC_H(x11->winrc)); RC_W(x11->winrc), RC_H(x11->winrc));