[MPlayer-cvslog] r31182 - trunk/libvo/w32_common.c
reimar
subversion at mplayerhq.hu
Wed May 19 19:53:47 CEST 2010
Author: reimar
Date: Wed May 19 19:53:47 2010
New Revision: 31182
Log:
Handle -wid Window being closed for direct3d and gl vos on Windows.
Modified:
trunk/libvo/w32_common.c
Modified: trunk/libvo/w32_common.c
==============================================================================
--- trunk/libvo/w32_common.c Wed May 19 15:31:11 2010 (r31181)
+++ trunk/libvo/w32_common.c Wed May 19 19:53:47 2010 (r31182)
@@ -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;
More information about the MPlayer-cvslog
mailing list