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
c24e48d9
Commit
c24e48d9
authored
Dec 14, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Filter window messages generated by switching to fullscreen and back.
parent
0e270bbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
swapchain.c
dlls/wined3d/swapchain.c
+20
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/swapchain.c
View file @
c24e48d9
...
...
@@ -580,6 +580,7 @@ void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w,
{
IWineD3DDeviceImpl
*
device
=
swapchain
->
device
;
HWND
window
=
swapchain
->
win_handle
;
BOOL
filter_messages
;
LONG
style
,
exstyle
;
TRACE
(
"Setting up window %p for fullscreen mode.
\n
"
,
window
);
...
...
@@ -599,15 +600,21 @@ void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w,
TRACE
(
"Old style was %08x, %08x, setting to %08x, %08x.
\n
"
,
device
->
style
,
device
->
exStyle
,
style
,
exstyle
);
filter_messages
=
swapchain
->
filter_messages
;
swapchain
->
filter_messages
=
TRUE
;
SetWindowLongW
(
window
,
GWL_STYLE
,
style
);
SetWindowLongW
(
window
,
GWL_EXSTYLE
,
exstyle
);
SetWindowPos
(
window
,
HWND_TOP
,
0
,
0
,
w
,
h
,
SWP_FRAMECHANGED
|
SWP_SHOWWINDOW
);
swapchain
->
filter_messages
=
filter_messages
;
}
void
swapchain_restore_fullscreen_window
(
IWineD3DSwapChainImpl
*
swapchain
)
{
IWineD3DDeviceImpl
*
device
=
swapchain
->
device
;
HWND
window
=
swapchain
->
win_handle
;
BOOL
filter_messages
;
LONG
style
,
exstyle
;
if
(
!
device
->
style
&&
!
device
->
exStyle
)
return
;
...
...
@@ -618,6 +625,9 @@ void swapchain_restore_fullscreen_window(IWineD3DSwapChainImpl *swapchain)
style
=
GetWindowLongW
(
window
,
GWL_STYLE
);
exstyle
=
GetWindowLongW
(
window
,
GWL_EXSTYLE
);
filter_messages
=
swapchain
->
filter_messages
;
swapchain
->
filter_messages
=
TRUE
;
/* Only restore the style if the application didn't modify it during the
* fullscreen phase. Some applications change it before calling Reset()
* when switching between windowed and fullscreen modes (HL2), some
...
...
@@ -627,12 +637,13 @@ void swapchain_restore_fullscreen_window(IWineD3DSwapChainImpl *swapchain)
SetWindowLongW
(
window
,
GWL_STYLE
,
device
->
style
);
SetWindowLongW
(
window
,
GWL_EXSTYLE
,
device
->
exStyle
);
}
SetWindowPos
(
window
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
);
swapchain
->
filter_messages
=
filter_messages
;
/* Delete the old values. */
device
->
style
=
0
;
device
->
exStyle
=
0
;
SetWindowPos
(
window
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
);
}
...
...
@@ -965,6 +976,13 @@ void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, U
LRESULT
swapchain_process_message
(
IWineD3DSwapChainImpl
*
swapchain
,
HWND
window
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
,
WNDPROC
proc
)
{
if
(
swapchain
->
filter_messages
)
{
TRACE
(
"Filtering message: window %p, message %#x, wparam %#lx, lparam %#lx.
\n
"
,
window
,
message
,
wparam
,
lparam
);
return
DefWindowProcW
(
window
,
message
,
wparam
,
lparam
);
}
if
(
message
==
WM_DESTROY
)
{
TRACE
(
"unregister window %p.
\n
"
,
window
);
...
...
dlls/wined3d/wined3d_private.h
View file @
c24e48d9
...
...
@@ -2417,6 +2417,7 @@ struct IWineD3DSwapChainImpl
WINED3DFORMAT
orig_fmt
;
WINED3DGAMMARAMP
orig_gamma
;
BOOL
render_to_fbo
;
BOOL
filter_messages
;
long
prev_time
,
frames
;
/* Performance tracking */
unsigned
int
vSyncCounter
;
...
...
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