wined3d: Pass WM_SYSCOMMAND(SC_RESTORE) to DefWindowProc.
This commit is contained in:
parent
4d05cfe577
commit
3ef1d6bcd9
|
@ -404,7 +404,7 @@ static const struct IDirect3D8Vtbl d3d8_vtbl =
|
|||
|
||||
BOOL d3d8_init(struct d3d8 *d3d8)
|
||||
{
|
||||
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING;
|
||||
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING | WINED3D_HANDLE_RESTORE;
|
||||
|
||||
d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
|
||||
d3d8->refcount = 1;
|
||||
|
|
|
@ -2622,7 +2622,7 @@ static void test_wndproc(void)
|
|||
|
||||
expect_messages = sc_restore_messages;
|
||||
SendMessageA(focus_window, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
todo_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n",
|
||||
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n",
|
||||
expect_messages->message, expect_messages->window);
|
||||
expect_messages = NULL;
|
||||
flush_events();
|
||||
|
@ -2699,7 +2699,7 @@ static void test_wndproc(void)
|
|||
|
||||
expect_messages = sc_restore_messages;
|
||||
SendMessageA(focus_window, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
todo_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n",
|
||||
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n",
|
||||
expect_messages->message, expect_messages->window);
|
||||
expect_messages = NULL;
|
||||
flush_events();
|
||||
|
|
|
@ -636,7 +636,7 @@ static const struct IDirect3D9ExVtbl d3d9_vtbl =
|
|||
|
||||
BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
|
||||
{
|
||||
DWORD flags = WINED3D_PRESENT_CONVERSION;
|
||||
DWORD flags = WINED3D_PRESENT_CONVERSION | WINED3D_HANDLE_RESTORE;
|
||||
|
||||
if (!extended)
|
||||
flags |= WINED3D_VIDMEM_ACCOUNTING;
|
||||
|
|
|
@ -2172,7 +2172,7 @@ static void test_wndproc(void)
|
|||
|
||||
expect_messages = sc_restore_messages;
|
||||
SendMessageA(focus_window, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
todo_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
expect_messages->message, expect_messages->window, i);
|
||||
expect_messages = NULL;
|
||||
flush_events();
|
||||
|
@ -2249,7 +2249,7 @@ static void test_wndproc(void)
|
|||
|
||||
expect_messages = sc_restore_messages;
|
||||
SendMessageA(focus_window, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
todo_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
expect_messages->message, expect_messages->window, i);
|
||||
expect_messages = NULL;
|
||||
flush_events();
|
||||
|
|
|
@ -3606,7 +3606,7 @@ static void test_wndproc(void)
|
|||
|
||||
expect_messages = sc_restore_messages;
|
||||
SendMessageA(focus_window, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
todo_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
expect_messages->message, expect_messages->window, i);
|
||||
expect_messages = NULL;
|
||||
flush_events();
|
||||
|
@ -3690,7 +3690,7 @@ static void test_wndproc(void)
|
|||
|
||||
expect_messages = sc_restore_messages;
|
||||
SendMessageA(focus_window, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
todo_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n",
|
||||
expect_messages->message, expect_messages->window, i);
|
||||
expect_messages = NULL;
|
||||
flush_events();
|
||||
|
|
|
@ -5018,6 +5018,16 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
|||
|
||||
device->device_parent->ops->activate(device->device_parent, wparam);
|
||||
}
|
||||
else if (message == WM_SYSCOMMAND)
|
||||
{
|
||||
if (wparam == SC_RESTORE && device->wined3d->flags & WINED3D_HANDLE_RESTORE)
|
||||
{
|
||||
if (unicode)
|
||||
DefWindowProcW(window, message, wparam, lparam);
|
||||
else
|
||||
DefWindowProcA(window, message, wparam, lparam);
|
||||
}
|
||||
}
|
||||
|
||||
if (unicode)
|
||||
return CallWindowProcW(proc, window, message, wparam, lparam);
|
||||
|
|
|
@ -1243,6 +1243,7 @@ enum wined3d_display_rotation
|
|||
#define WINED3D_PRESENT_CONVERSION 0x00000008
|
||||
#define WINED3D_RESTORE_MODE_ON_ACTIVATE 0x00000010
|
||||
#define WINED3D_FOCUS_MESSAGES 0x00000020
|
||||
#define WINED3D_HANDLE_RESTORE 0x00000040
|
||||
|
||||
#define WINED3D_RESZ_CODE 0x7fa05000
|
||||
|
||||
|
|
Loading…
Reference in New Issue