2009/12/14 Stefan Dösinger stefandoesinger@gmx.at:
- filter_messages = swapchain->filter_messages;
- swapchain->filter_messages = TRUE;
SetWindowLongW(window, GWL_STYLE, style); SetWindowLongW(window, GWL_EXSTYLE, exstyle); SetWindowPos(window, HWND_TOP, 0, 0, w, h, SWP_FRAMECHANGED | SWP_SHOWWINDOW);
- swapchain->filter_messages = filter_messages;
}
I am not seeing any place where swapchain->filter_messages is set so something other than FALSE, except of the same code in restore_fullscreen_window. Am I right to assume that this construct is meant to catch situations where the app's wndproc calls wined3d when receiving a WM_DISPLAYCHANGE message?
It's mostly just that we don't want to care about the initial state of "filter_messages", we just restore it when we're done. In practice it's supposed to always be FALSE.
@@ -965,6 +976,13 @@ void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, U LRESULT swapchain_process_message(IWineD3DSwapChainImpl *swapchain, HWND window, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) {
- if (swapchain->filter_messages)
- {
- TRACE("Filtering message: window %p, message %#x, wparam %#lx, lparam %#lx.\n",
- window, message, wparam, lparam);
- return CallWindowProcW(DefWindowProcW, window, message, wparam, lparam);
- }
This calls the default Win32 wndproc in user32, and thus bypasses the app's wndproc, correct? There's the other call below added by patch 1 which calls proc instead. I'm asking because the lack of a ! in the if condition confused me at first.
Yeah.