Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 1 - dlls/quartz/vmr9.c | 1 - dlls/strmbase/window.c | 88 ++++++++++++++++--------------------- include/wine/strmbase.h | 2 - 4 files changed, 38 insertions(+), 54 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 43aef9ffbe7..0e49f27f151 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -444,7 +444,6 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { VideoRenderer_GetClassWindowStyles, VideoRenderer_GetDefaultRect, NULL, - BaseControlWindowImpl_PossiblyEatMessage, VideoRenderer_OnSize };
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 0e04fef3662..413f334d99d 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -607,7 +607,6 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { VMR9_GetClassWindowStyles, VMR9_GetDefaultRect, NULL, - BaseControlWindowImpl_PossiblyEatMessage, VMR9_OnSize, };
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index a7c2201c64e..3d91b05eadd 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -45,21 +45,49 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return BaseWindowImpl_OnReceiveMessage(This, hwnd, uMsg, wParam, lParam); }
-LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam) +LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT message, WPARAM wparam, LPARAM lparam) { - if (This->pFuncsTable->pfnPossiblyEatMessage && This->pFuncsTable->pfnPossiblyEatMessage(This, uMsg, wParam, lParam)) - return 0; + BaseControlWindow *window = impl_from_BaseWindow(This);
- switch (uMsg) + switch (message) { - case WM_SIZE: - if (This->pFuncsTable->pfnOnSize) - return This->pFuncsTable->pfnOnSize(This, LOWORD(lParam), HIWORD(lParam)); - else - return BaseWindowImpl_OnSize(This, LOWORD(lParam), HIWORD(lParam)); + case WM_KEYDOWN: + case WM_KEYUP: + case WM_LBUTTONDBLCLK: + case WM_LBUTTONDOWN: + case WM_LBUTTONUP: + case WM_MBUTTONDBLCLK: + case WM_MBUTTONDOWN: + case WM_MBUTTONUP: + case WM_MOUSEACTIVATE: + case WM_MOUSEMOVE: + case WM_NCLBUTTONDBLCLK: + case WM_NCLBUTTONDOWN: + case WM_NCLBUTTONUP: + case WM_NCMBUTTONDBLCLK: + case WM_NCMBUTTONDOWN: + case WM_NCMBUTTONUP: + case WM_NCMOUSEMOVE: + case WM_NCRBUTTONDBLCLK: + case WM_NCRBUTTONDOWN: + case WM_NCRBUTTONUP: + case WM_RBUTTONDBLCLK: + case WM_RBUTTONDOWN: + case WM_RBUTTONUP: + if (window->hwndDrain) + { + PostMessageW(window->hwndDrain, message, wparam, lparam); + return 0; + } + break; + case WM_SIZE: + if (This->pFuncsTable->pfnOnSize) + return This->pFuncsTable->pfnOnSize(This, LOWORD(lparam), HIWORD(lparam)); + else + return BaseWindowImpl_OnSize(This, LOWORD(lparam), HIWORD(lparam)); }
- return DefWindowProcW(hwnd, uMsg, wParam, lParam); + return DefWindowProcW(hwnd, message, wparam, lparam); }
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height) @@ -147,46 +175,6 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) return S_OK; }
-BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - BaseControlWindow* pControlWindow = impl_from_BaseWindow(This); - - if (pControlWindow->hwndDrain) - { - switch(uMsg) - { - case WM_KEYDOWN: - case WM_KEYUP: - case WM_LBUTTONDBLCLK: - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_MBUTTONDBLCLK: - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - case WM_MOUSEACTIVATE: - case WM_MOUSEMOVE: - case WM_NCLBUTTONDBLCLK: - case WM_NCLBUTTONDOWN: - case WM_NCLBUTTONUP: - case WM_NCMBUTTONDBLCLK: - case WM_NCMBUTTONDOWN: - case WM_NCMBUTTONUP: - case WM_NCMOUSEMOVE: - case WM_NCRBUTTONDBLCLK: - case WM_NCRBUTTONDOWN: - case WM_NCRBUTTONUP: - case WM_RBUTTONDBLCLK: - case WM_RBUTTONDOWN: - case WM_RBUTTONUP: - PostMessageW(pControlWindow->hwndDrain, uMsg, wParam, lParam); - return TRUE; - default: - break; - } - } - return FALSE; -} - HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner, CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable) diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 518db8de3f3..2213f79b975 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -371,7 +371,6 @@ typedef struct tagBaseWindow
typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx); typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This); -typedef BOOL (WINAPI *BaseWindow_PossiblyEatMessage)(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam); typedef LRESULT (WINAPI *BaseWindow_OnReceiveMessage)(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam); typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
@@ -382,7 +381,6 @@ typedef struct BaseWindowFuncTable BaseWindow_GetDefaultRect pfnGetDefaultRect; /* Optional, WinProc Related */ BaseWindow_OnReceiveMessage pfnOnReceiveMessage; - BaseWindow_PossiblyEatMessage pfnPossiblyEatMessage; BaseWindow_OnSize pfnOnSize; } BaseWindowFuncTable;