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
a59d0f45
Commit
a59d0f45
authored
Oct 06, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Acquire / release the focus window during reset.
parent
966d7227
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
device.c
dlls/wined3d/device.c
+23
-3
No files found.
dlls/wined3d/device.c
View file @
a59d0f45
...
...
@@ -6354,15 +6354,30 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface,
if
(
!
pPresentationParameters
->
Windowed
!=
!
swapchain
->
presentParms
.
Windowed
||
DisplayModeChanged
)
{
BOOL
filter
=
This
->
filter_messages
;
This
->
filter_messages
=
TRUE
;
IWineD3DDevice_SetDisplayMode
(
iface
,
0
,
&
mode
);
if
(
!
pPresentationParameters
->
Windowed
)
{
if
(
swapchain
->
presentParms
.
Windowed
)
{
if
(
swapchain
->
presentParms
.
Windowed
)
{
HWND
focus_window
=
This
->
createParms
.
hFocusWindow
;
if
(
!
focus_window
)
focus_window
=
pPresentationParameters
->
hDeviceWindow
;
if
(
FAILED
(
hr
=
IWineD3DDevice_AcquireFocusWindow
(
iface
,
focus_window
)))
{
ERR
(
"Failed to acquire focus window, hr %#x.
\n
"
,
hr
);
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
return
hr
;
}
/* switch from windowed to fs */
swapchain_setup_fullscreen_window
(
swapchain
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
);
}
else
{
}
else
{
/* Fullscreen -> fullscreen mode change */
MoveWindow
(
swapchain
->
device_window
,
0
,
0
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
,
...
...
@@ -6373,9 +6388,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface,
{
/* Fullscreen -> windowed switch */
swapchain_restore_fullscreen_window
(
swapchain
);
IWineD3DDevice_ReleaseFocusWindow
(
iface
);
}
swapchain
->
presentParms
.
Windowed
=
pPresentationParameters
->
Windowed
;
}
else
if
(
!
pPresentationParameters
->
Windowed
)
{
This
->
filter_messages
=
filter
;
}
else
if
(
!
pPresentationParameters
->
Windowed
)
{
DWORD
style
=
This
->
style
,
exStyle
=
This
->
exStyle
;
/* If we're in fullscreen, and the mode wasn't changed, we have to get the window back into
* the right position. Some applications(Battlefield 2, Guild Wars) move it and then call
...
...
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