diff options
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/w32_common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 3fcc24086e..3c66c5a799 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -43,8 +43,11 @@ static BOOL (WINAPI* myEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARA static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { RECT r; POINT p; - if (WinID < 0 || message == WM_PAINT || message == WM_SIZE) { + if (WinID < 0 || message == WM_PAINT || message == WM_ERASEBKGND || + message == WM_SIZE) { switch (message) { + case WM_ERASEBKGND: // no need to erase background seperately + return 1; case WM_PAINT: event_flags |= VO_EVENT_EXPOSE; break; @@ -375,7 +378,7 @@ int vo_w32_init(void) { mplayerIcon = LoadIcon(0, IDI_APPLICATION); { - WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC | CS_DBLCLKS, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), (HBRUSH)GetStockObject(BLACK_BRUSH), 0, classname, mplayerIcon }; + WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC | CS_DBLCLKS, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), NULL, 0, classname, mplayerIcon }; if (!RegisterClassEx(&wcex)) { mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n"); |