# HG changeset patch # User reimar # Date 1133907303 0 # Node ID dbe315450a3204d4d7f8ae8f5f1415ea44e1385e # Parent 32fbef7a2e967e9bf0e3a73a2d344fa7acd725b8 Fix message handling, process resize events diff -r 32fbef7a2e96 -r dbe315450a32 libvo/w32_common.c --- a/libvo/w32_common.c Tue Dec 06 21:34:42 2005 +0000 +++ b/libvo/w32_common.c Tue Dec 06 22:15:03 2005 +0000 @@ -21,9 +21,18 @@ static HINSTANCE hInstance; HWND vo_window = 0; static int cursor = 1; +static int event_flags; static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { + case WM_ACTIVATE: + event_flags |= VO_EVENT_EXPOSE; + break; + case WM_SIZE: + event_flags |= VO_EVENT_RESIZE; + vo_dwidth = lParam & 0xffff; + vo_dheight = lParam >> 16; + break; case WM_CLOSE: mplayer_put_key(KEY_CLOSE_WIN); break; @@ -90,18 +99,13 @@ int vo_w32_check_events(void) { MSG msg; - int r = 0; + event_flags = 0; while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); - switch (msg.message) { - case WM_ACTIVATE: - r |= VO_EVENT_EXPOSE; - break; - } } - return r; + return event_flags; } static void updateScreenProperties() {