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
c81b1142
Commit
c81b1142
authored
Mar 10, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only restore the style and exStyle when it is untouched.
parent
a9fb81b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
10 deletions
+36
-10
device.c
dlls/wined3d/device.c
+36
-10
No files found.
dlls/wined3d/device.c
View file @
c81b1142
...
...
@@ -1248,6 +1248,27 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
* window: Window to setup
*
*****************************************************************************/
static
LONG
fullscreen_style
(
LONG
orig_style
)
{
LONG
style
=
orig_style
;
style
&=
~
WS_CAPTION
;
style
&=
~
WS_THICKFRAME
;
/* Make sure the window is managed, otherwise we won't get keyboard input */
style
|=
WS_POPUP
|
WS_SYSMENU
;
return
style
;
}
static
LONG
fullscreen_exStyle
(
LONG
orig_exStyle
)
{
LONG
exStyle
=
orig_exStyle
;
/* Filter out window decorations */
exStyle
&=
~
WS_EX_WINDOWEDGE
;
exStyle
&=
~
WS_EX_CLIENTEDGE
;
return
exStyle
;
}
static
void
WINAPI
IWineD3DDeviceImpl_SetupFullscreenWindow
(
IWineD3DDevice
*
iface
,
HWND
window
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -1267,14 +1288,8 @@ static void WINAPI IWineD3DDeviceImpl_SetupFullscreenWindow(IWineD3DDevice *ifac
This
->
style
=
style
;
This
->
exStyle
=
exStyle
;
/* Filter out window decorations */
style
&=
~
WS_CAPTION
;
style
&=
~
WS_THICKFRAME
;
exStyle
&=
~
WS_EX_WINDOWEDGE
;
exStyle
&=
~
WS_EX_CLIENTEDGE
;
/* Make sure the window is managed, otherwise we won't get keyboard input */
style
|=
WS_POPUP
|
WS_SYSMENU
;
style
=
fullscreen_style
(
style
);
exStyle
=
fullscreen_exStyle
(
exStyle
);
TRACE
(
"Old style was %08x,%08x, setting to %08x,%08x
\n
"
,
This
->
style
,
This
->
exStyle
,
style
,
exStyle
);
...
...
@@ -1301,6 +1316,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupFullscreenWindow(IWineD3DDevice *ifac
*****************************************************************************/
static
void
WINAPI
IWineD3DDeviceImpl_RestoreWindow
(
IWineD3DDevice
*
iface
,
HWND
window
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
LONG
style
,
exStyle
;
/* This could be a DDSCL_NORMAL -> DDSCL_NORMAL
* switch, do nothing
...
...
@@ -1310,8 +1326,18 @@ static void WINAPI IWineD3DDeviceImpl_RestoreWindow(IWineD3DDevice *iface, HWND
TRACE
(
"(%p): Restoring window settings of window %p to %08x, %08x
\n
"
,
This
,
window
,
This
->
style
,
This
->
exStyle
);
SetWindowLongW
(
window
,
GWL_STYLE
,
This
->
style
);
SetWindowLongW
(
window
,
GWL_EXSTYLE
,
This
->
exStyle
);
style
=
GetWindowLongW
(
window
,
GWL_STYLE
);
exStyle
=
GetWindowLongW
(
window
,
GWL_EXSTYLE
);
/* 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 depend on the original style(Eve Online)
*/
if
(
style
==
fullscreen_style
(
This
->
style
)
&&
exStyle
==
fullscreen_style
(
This
->
exStyle
))
{
SetWindowLongW
(
window
,
GWL_STYLE
,
This
->
style
);
SetWindowLongW
(
window
,
GWL_EXSTYLE
,
This
->
exStyle
);
}
/* Delete the old values */
This
->
style
=
0
;
...
...
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