mirror of https://github.com/mpv-player/mpv
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:
parent
97f6d7f4ec
commit
4a5cfb4323
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue