This looks correct to me, I'm just asking to make sure I understand this correctly:
- 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?
@@ -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.