Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f4d520d6
Commit
f4d520d6
authored
Nov 19, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't minimize hidden windows.
parent
0edb13a2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
4 deletions
+145
-4
device.c
dlls/d3d8/tests/device.c
+47
-1
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+48
-1
device.c
dlls/d3d9/tests/device.c
+48
-1
swapchain.c
dlls/wined3d/swapchain.c
+2
-1
No files found.
dlls/d3d8/tests/device.c
View file @
f4d520d6
...
...
@@ -2140,7 +2140,7 @@ struct message
WPARAM
expect_wparam
;
};
static
const
struct
message
*
expect_messages
;
static
const
struct
message
*
expect_messages
,
*
unexpected_messages
;
static
HWND
device_window
,
focus_window
;
struct
wndproc_thread_param
...
...
@@ -2189,6 +2189,13 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM
}
}
if
(
unexpected_messages
)
{
const
struct
message
*
i
;
for
(
i
=
unexpected_messages
;
i
->
message
;
i
++
)
ok
(
i
->
message
!=
message
,
"Got unexpected message %x on window %p.
\n
"
,
message
,
hwnd
);
}
return
DefWindowProcA
(
hwnd
,
message
,
wparam
,
lparam
);
}
...
...
@@ -2290,6 +2297,21 @@ static void test_wndproc(void)
{
WM_ACTIVATEAPP
,
FOCUS_WINDOW
,
TRUE
,
TRUE
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
message
focus_loss_messages_hidden
[]
=
{
{
WM_DISPLAYCHANGE
,
DEVICE_WINDOW
,
FALSE
,
0
},
{
WM_ACTIVATEAPP
,
FOCUS_WINDOW
,
TRUE
,
FALSE
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
message
focus_loss_messages_hidden_unexpected
[]
=
{
/* KDE randomly does something with the hidden window during the
* mode change that sometimes generates a WM_WINDOWPOSCHANGING
* message. A WM_WINDOWPOSCHANGED message is not generated, so
* just flag WM_WINDOWPOSCHANGED as bad. */
{
WM_WINDOWPOSCHANGED
,
0
,
FALSE
,
0
},
{
0
,
0
,
FALSE
,
0
},
};
d3d8
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
ok
(
!!
d3d8
,
"Failed to create a D3D object.
\n
"
);
...
...
@@ -2498,6 +2520,30 @@ static void test_wndproc(void)
&&
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to reset device, hr %#x.
\n
"
,
hr
);
ShowWindow
(
device_window
,
SW_HIDE
);
flush_events
();
expect_messages
=
focus_loss_messages_hidden
;
unexpected_messages
=
focus_loss_messages_hidden_unexpected
;
SetForegroundWindow
(
GetDesktopWindow
());
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
;
unexpected_messages
=
NULL
;
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
,
"Got unexpect width %u.
\n
"
,
devmode
.
dmPelsWidth
);
ok
(
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect height %u.
\n
"
,
devmode
.
dmPelsHeight
);
ShowWindow
(
focus_window
,
SW_MINIMIZE
);
ShowWindow
(
focus_window
,
SW_RESTORE
);
SetForegroundWindow
(
focus_window
);
flush_events
();
/* Releasing a device in lost state breaks follow-up tests on native. */
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to reset device, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d9/tests/d3d9ex.c
View file @
f4d520d6
...
...
@@ -1706,7 +1706,7 @@ struct message
WPARAM
expect_wparam
;
};
static
const
struct
message
*
expect_messages
;
static
const
struct
message
*
expect_messages
,
*
unexpected_messages
;
static
HWND
device_window
,
focus_window
;
struct
wndproc_thread_param
...
...
@@ -1755,6 +1755,13 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM
}
}
if
(
unexpected_messages
)
{
const
struct
message
*
i
;
for
(
i
=
unexpected_messages
;
i
->
message
;
i
++
)
ok
(
i
->
message
!=
message
,
"Got unexpected message %x on window %p.
\n
"
,
message
,
hwnd
);
}
return
DefWindowProcA
(
hwnd
,
message
,
wparam
,
lparam
);
}
...
...
@@ -1857,6 +1864,21 @@ static void test_wndproc(void)
{
WM_ACTIVATEAPP
,
FOCUS_WINDOW
,
TRUE
,
FALSE
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
message
focus_loss_messages_hidden
[]
=
{
{
WM_DISPLAYCHANGE
,
DEVICE_WINDOW
,
FALSE
,
0
},
{
WM_ACTIVATEAPP
,
FOCUS_WINDOW
,
TRUE
,
FALSE
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
message
focus_loss_messages_hidden_unexpected
[]
=
{
/* KDE randomly does something with the hidden window during the
* mode change that sometimes generates a WM_WINDOWPOSCHANGING
* message. A WM_WINDOWPOSCHANGED message is not generated, so
* just flag WM_WINDOWPOSCHANGED as bad. */
{
WM_WINDOWPOSCHANGED
,
0
,
FALSE
,
0
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
{
DWORD
create_flags
;
...
...
@@ -2076,6 +2098,31 @@ static void test_wndproc(void)
&&
devmode
.
dmPelsHeight
==
d3d_height
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to reset device, hr %#x.
\n
"
,
hr
);
ShowWindow
(
device_window
,
SW_HIDE
);
flush_events
();
expect_messages
=
focus_loss_messages_hidden
;
unexpected_messages
=
focus_loss_messages_hidden_unexpected
;
SetForegroundWindow
(
GetDesktopWindow
());
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
;
unexpected_messages
=
NULL
;
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
,
"Got unexpect width %u.
\n
"
,
devmode
.
dmPelsWidth
);
ok
(
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect height %u.
\n
"
,
devmode
.
dmPelsHeight
);
ShowWindow
(
device_window
,
SW_RESTORE
);
ShowWindow
(
focus_window
,
SW_MINIMIZE
);
ShowWindow
(
focus_window
,
SW_RESTORE
);
SetForegroundWindow
(
focus_window
);
flush_events
();
filter_messages
=
focus_window
;
ref
=
IDirect3DDevice9Ex_Release
(
device
);
ok
(
ref
==
0
,
"The device was not properly freed: refcount %u, i=%u.
\n
"
,
ref
,
i
);
...
...
dlls/d3d9/tests/device.c
View file @
f4d520d6
...
...
@@ -3095,7 +3095,7 @@ struct message
WPARAM
expect_wparam
;
};
static
const
struct
message
*
expect_messages
;
static
const
struct
message
*
expect_messages
,
*
unexpected_messages
;
static
HWND
device_window
,
focus_window
;
struct
wndproc_thread_param
...
...
@@ -3144,6 +3144,13 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM
}
}
if
(
unexpected_messages
)
{
const
struct
message
*
i
;
for
(
i
=
unexpected_messages
;
i
->
message
;
i
++
)
ok
(
i
->
message
!=
message
,
"Got unexpected message %x on window %p.
\n
"
,
message
,
hwnd
);
}
return
DefWindowProcA
(
hwnd
,
message
,
wparam
,
lparam
);
}
...
...
@@ -3259,6 +3266,21 @@ static void test_wndproc(void)
{
WM_ACTIVATE
,
FOCUS_WINDOW
,
TRUE
,
WA_ACTIVE
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
message
focus_loss_messages_hidden
[]
=
{
{
WM_DISPLAYCHANGE
,
DEVICE_WINDOW
,
FALSE
,
0
},
{
WM_ACTIVATEAPP
,
FOCUS_WINDOW
,
TRUE
,
FALSE
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
message
focus_loss_messages_hidden_unexpected
[]
=
{
/* KDE randomly does something with the hidden window during the
* mode change that sometimes generates a WM_WINDOWPOSCHANGING
* message. A WM_WINDOWPOSCHANGED message is not generated, so
* just flag WM_WINDOWPOSCHANGED as bad. */
{
WM_WINDOWPOSCHANGED
,
0
,
FALSE
,
0
},
{
0
,
0
,
FALSE
,
0
},
};
static
const
struct
{
DWORD
create_flags
;
...
...
@@ -3482,6 +3504,31 @@ static void test_wndproc(void)
&&
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to reset device, hr %#x.
\n
"
,
hr
);
ShowWindow
(
device_window
,
SW_HIDE
);
flush_events
();
expect_messages
=
focus_loss_messages_hidden
;
unexpected_messages
=
focus_loss_messages_hidden_unexpected
;
SetForegroundWindow
(
GetDesktopWindow
());
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
;
unexpected_messages
=
NULL
;
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
,
"Got unexpect width %u.
\n
"
,
devmode
.
dmPelsWidth
);
ok
(
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect height %u.
\n
"
,
devmode
.
dmPelsHeight
);
ShowWindow
(
device_window
,
SW_RESTORE
);
ShowWindow
(
focus_window
,
SW_MINIMIZE
);
ShowWindow
(
focus_window
,
SW_RESTORE
);
SetForegroundWindow
(
focus_window
);
flush_events
();
/* Releasing a device in lost state breaks follow-up tests on native. */
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to reset device, hr %#x, i=%u.
\n
"
,
hr
,
i
);
...
...
dlls/wined3d/swapchain.c
View file @
f4d520d6
...
...
@@ -1207,7 +1207,8 @@ void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activa
swapchain
->
reapply_mode
=
TRUE
;
if
(
!
(
swapchain
->
device
->
create_parms
.
flags
&
WINED3DCREATE_NOWINDOWCHANGES
))
if
(
!
(
swapchain
->
device
->
create_parms
.
flags
&
WINED3DCREATE_NOWINDOWCHANGES
)
&&
IsWindowVisible
(
swapchain
->
device_window
))
ShowWindow
(
swapchain
->
device_window
,
SW_MINIMIZE
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment