diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-06-19 10:36:15 +0000 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-06 13:01:07 +0300 |
commit | 1b6ae1ff582405652f5543bfc7193eec57d983fc (patch) | |
tree | 2772a959f563492a83d70937f364029b6f3a478d /libvo | |
parent | 1e544365bfd09e4649cb720716f86ec5b75d86ce (diff) | |
download | mpv-1b6ae1ff582405652f5543bfc7193eec57d983fc.tar.bz2 mpv-1b6ae1ff582405652f5543bfc7193eec57d983fc.tar.xz |
VO: w32_common: also generate VO_EVENT_MOVE
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33650 b3059339-0415-0410-9bf9-f77b7e298cf2
Generate VO_EVENT_MOVE also with -wid.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33656 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/w32_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 0c512f3d2d..a8a59d02c9 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -101,6 +101,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l event_flags |= VO_EVENT_EXPOSE; break; case WM_MOVE: + event_flags |= VO_EVENT_MOVE; p.x = 0; p.y = 0; ClientToScreen(vo_window, &p); @@ -219,11 +220,18 @@ int vo_w32_check_events(void) { if (WinID >= 0) { BOOL res; RECT r; + POINT p; 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; } + p.x = 0; p.y = 0; + ClientToScreen(vo_window, &p); + if (p.x != vo_dx || p.y != vo_dy) { + vo_dx = p.x; vo_dy = p.y; + event_flags |= VO_EVENT_MOVE; + } res = GetClientRect(WinID, &r); if (res && (r.right != vo_dwidth || r.bottom != vo_dheight)) MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE); |