mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wined3d: Minimize device windows on focus loss.
This commit is contained in:
parent
d732cadf4d
commit
45d530461b
3 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -2702,6 +2702,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;
|
||||
|
|
Loading…
Reference in a new issue