Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
19c86049
Commit
19c86049
authored
Dec 04, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Filter messages generated by focus handling.
parent
262b9cc6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
24 deletions
+23
-24
device.c
dlls/d3d8/tests/device.c
+1
-1
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+1
-4
device.c
dlls/d3d9/tests/device.c
+3
-10
ddraw.c
dlls/ddraw/ddraw.c
+2
-1
device.c
dlls/wined3d/device.c
+1
-1
swapchain.c
dlls/wined3d/swapchain.c
+14
-7
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/d3d8/tests/device.c
View file @
19c86049
...
...
@@ -2688,7 +2688,7 @@ static void test_wndproc(void)
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
!
expect_messages
->
message
,
"Expected message %#x for window %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
,
expect_messages
->
window
);
todo_wine
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it.
\n
"
);
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it.
\n
"
);
expect_messages
=
NULL
;
/* The window is iconic even though no message was sent. */
...
...
dlls/d3d9/tests/d3d9ex.c
View file @
19c86049
...
...
@@ -2236,10 +2236,7 @@ static void test_wndproc(void)
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
);
if
(
tests
[
i
].
create_flags
&
CREATE_DEVICE_NOWINDOWCHANGES
)
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
else
todo_wine
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
expect_messages
=
NULL
;
/* The window is iconic even though no message was sent. */
...
...
dlls/d3d9/tests/device.c
View file @
19c86049
...
...
@@ -3675,10 +3675,7 @@ static void test_wndproc(void)
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
);
if
(
tests
[
i
].
create_flags
&
CREATE_DEVICE_NOWINDOWCHANGES
)
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
else
todo_wine
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
ok
(
!
windowposchanged_received
,
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
expect_messages
=
NULL
;
/* The window is iconic even though no message was sent. */
...
...
@@ -3730,12 +3727,8 @@ static void test_wndproc(void)
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
);
/* About 1 in 8 test runs receives WM_WINDOWPOSCHANGED on Vista. */
if
(
tests
[
i
].
create_flags
&
CREATE_DEVICE_NOWINDOWCHANGES
)
ok
(
!
windowposchanged_received
||
broken
(
1
),
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
else
todo_wine
ok
(
!
windowposchanged_received
||
broken
(
1
),
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
ok
(
!
windowposchanged_received
||
broken
(
1
),
"Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.
\n
"
,
i
);
expect_messages
=
NULL
;
filter_messages
=
focus_window
;
...
...
dlls/ddraw/ddraw.c
View file @
19c86049
...
...
@@ -4850,7 +4850,8 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type)
ddraw
->
numIfaces
=
1
;
ddraw
->
ref7
=
1
;
flags
=
WINED3D_LEGACY_DEPTH_BIAS
|
WINED3D_VIDMEM_ACCOUNTING
|
WINED3D_RESTORE_MODE_ON_ACTIVATE
;
flags
=
WINED3D_LEGACY_DEPTH_BIAS
|
WINED3D_VIDMEM_ACCOUNTING
|
WINED3D_RESTORE_MODE_ON_ACTIVATE
|
WINED3D_FOCUS_MESSAGES
;
if
(
!
(
ddraw
->
wined3d
=
wined3d_create
(
flags
)))
{
if
(
!
(
ddraw
->
wined3d
=
wined3d_create
(
flags
|
WINED3D_NO3D
)))
...
...
dlls/wined3d/device.c
View file @
19c86049
...
...
@@ -4961,7 +4961,7 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state)
LRESULT
device_process_message
(
struct
wined3d_device
*
device
,
HWND
window
,
BOOL
unicode
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
,
WNDPROC
proc
)
{
if
(
device
->
filter_messages
)
if
(
device
->
filter_messages
&&
message
!=
WM_DISPLAYCHANGE
)
{
TRACE
(
"Filtering message: window %p, message %#x, wparam %#lx, lparam %#lx.
\n
"
,
window
,
message
,
wparam
,
lparam
);
...
...
dlls/wined3d/swapchain.c
View file @
19c86049
...
...
@@ -1176,14 +1176,19 @@ void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain)
void
wined3d_swapchain_activate
(
struct
wined3d_swapchain
*
swapchain
,
BOOL
activate
)
{
struct
wined3d_device
*
device
=
swapchain
->
device
;
BOOL
filter_messages
=
device
->
filter_messages
;
/* This code is not protected by the wined3d mutex, so it may run while
* wined3d_device_reset is active. Testing on Windows shows that changing
* focus during resets and resetting during focus change events causes
* the application to crash with an invalid memory access. */
device
->
filter_messages
=
!
(
device
->
wined3d
->
flags
&
WINED3D_FOCUS_MESSAGES
);
if
(
activate
)
{
if
(
!
(
swapchain
->
device
->
create_parms
.
flags
&
WINED3DCREATE_NOWINDOWCHANGES
))
if
(
!
(
device
->
create_parms
.
flags
&
WINED3DCREATE_NOWINDOWCHANGES
))
{
/* The d3d versions do not agree on the exact messages here. D3d8 restores
* the window but leaves the size untouched, d3d9 sets the size on an
...
...
@@ -1197,23 +1202,25 @@ void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activa
SWP_NOACTIVATE
|
SWP_NOZORDER
);
}
if
(
swapchain
->
device
->
wined3d
->
flags
&
WINED3D_RESTORE_MODE_ON_ACTIVATE
)
if
(
device
->
wined3d
->
flags
&
WINED3D_RESTORE_MODE_ON_ACTIVATE
)
{
if
(
FAILED
(
wined3d_set_adapter_display_mode
(
swapchain
->
device
->
wined3d
,
swapchain
->
device
->
adapter
->
ordinal
,
&
swapchain
->
d3d_mode
)))
if
(
FAILED
(
wined3d_set_adapter_display_mode
(
device
->
wined3d
,
device
->
adapter
->
ordinal
,
&
swapchain
->
d3d_mode
)))
ERR
(
"Failed to set display mode.
\n
"
);
}
}
else
{
if
(
FAILED
(
wined3d_set_adapter_display_mode
(
swapchain
->
device
->
wined3d
,
swapchain
->
device
->
adapter
->
ordinal
,
NULL
)))
if
(
FAILED
(
wined3d_set_adapter_display_mode
(
device
->
wined3d
,
device
->
adapter
->
ordinal
,
NULL
)))
ERR
(
"Failed to set display mode.
\n
"
);
swapchain
->
reapply_mode
=
TRUE
;
if
(
!
(
swapchain
->
device
->
create_parms
.
flags
&
WINED3DCREATE_NOWINDOWCHANGES
)
if
(
!
(
device
->
create_parms
.
flags
&
WINED3DCREATE_NOWINDOWCHANGES
)
&&
IsWindowVisible
(
swapchain
->
device_window
))
ShowWindow
(
swapchain
->
device_window
,
SW_MINIMIZE
);
}
device
->
filter_messages
=
filter_messages
;
}
include/wine/wined3d.h
View file @
19c86049
...
...
@@ -1238,6 +1238,7 @@ enum wined3d_display_rotation
#define WINED3D_VIDMEM_ACCOUNTING 0x00000004
#define WINED3D_PRESENT_CONVERSION 0x00000008
#define WINED3D_RESTORE_MODE_ON_ACTIVATE 0x00000010
#define WINED3D_FOCUS_MESSAGES 0x00000020
#define WINED3D_RESZ_CODE 0x7fa05000
...
...
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