-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The attached archives contains follow-up patches that implement resolution changes and add tests for CreateAdditionalSwapchain.
I expect that many more small fixes will be needed for some games, similar in nature to patch 19. There are also problems in some window managers (read: those forked from Metacity)for which I haven't filed bugs yet.
Am 2014-11-12 22:15, schrieb Stefan Dösinger:
Tests for d3d8 will follow after 107631 has been committed.
v3: Check for D3DCREATE_NOWINDOWCHANGES.
v2: Move to wined3d. The different behavior in d3d9ex was due to a hidden window and not a difference how d3d9ex handles focus loss. See patch 7.
Another patch will add an action (resize the window to match the backbuffer size) on window activation. For this reason the swapchain helper function is called on both activation and deactivation.
dlls/wined3d/device.c | 5 +++++ dlls/wined3d/swapchain.c | 6 ++++++ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 12 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ee3636e..0de444b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4983,6 +4983,11 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL } else if (message == WM_ACTIVATEAPP) {
UINT i;
for (i = 0; i < device->swapchain_count; i++)
wined3d_swapchain_activate(device->swapchains[i], wparam);
}device->device_parent->ops->activate(device->device_parent, wparam);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 25e2107..4c0948f 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -1175,3 +1175,9 @@ void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) wined3d_resource_update_draw_binding(&swapchain->back_buffers[i]->resource); } }
+void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) +{
- if (!activate && !(swapchain->device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES))
ShowWindow(swapchain->device_window, SW_MINIMIZE);
+} diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0f302c4..5f90e9a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2701,6 +2701,7 @@ struct wined3d_swapchain
void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *rect) DECLSPEC_HIDDEN;
+void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN; struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;