Handle -wid Window being closed for direct3d and gl vos on Windows.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31182 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-05-19 17:53:47 +00:00
parent f53f31894c
commit f62044777b
1 changed files with 8 additions and 4 deletions

View File

@ -200,15 +200,19 @@ int vo_w32_check_events(void) {
DispatchMessage(&msg);
}
if (WinID >= 0) {
BOOL res;
RECT r;
GetClientRect(vo_window, &r);
if (r.right != vo_dwidth || r.bottom != vo_dheight) {
res = GetClientRect(vo_window, &r);
if (res && (r.right != vo_dwidth || r.bottom != vo_dheight)) {
vo_dwidth = r.right; vo_dheight = r.bottom;
event_flags |= VO_EVENT_RESIZE;
}
GetClientRect(WinID, &r);
if (r.right != vo_dwidth || r.bottom != vo_dheight)
res = GetClientRect(WinID, &r);
if (res && (r.right != vo_dwidth || r.bottom != vo_dheight))
MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE);
if (!IsWindow(WinID))
// Window has probably been closed, e.g. due to program crash
mplayer_put_key(KEY_CLOSE_WIN);
}
return event_flags;