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
20074ac8
Commit
20074ac8
authored
Jan 26, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Avoid using a global display DC.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aaf4e1d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
22 deletions
+5
-22
htmlscreen.c
dlls/mshtml/htmlscreen.c
+5
-3
main.c
dlls/mshtml/main.c
+0
-18
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-1
No files found.
dlls/mshtml/htmlscreen.c
View file @
20074ac8
...
...
@@ -123,10 +123,12 @@ static HRESULT WINAPI HTMLScreen_Invoke(IHTMLScreen *iface, DISPID dispIdMember,
static
HRESULT
WINAPI
HTMLScreen_get_colorDepth
(
IHTMLScreen
*
iface
,
LONG
*
p
)
{
HTMLScreen
*
This
=
impl_from_IHTMLScreen
(
iface
);
HDC
hdc
=
GetDC
(
0
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
GetDeviceCaps
(
get_display_dc
(),
BITSPIXEL
);
*
p
=
GetDeviceCaps
(
hdc
,
BITSPIXEL
);
ReleaseDC
(
0
,
hdc
);
return
S_OK
;
}
...
...
@@ -150,7 +152,7 @@ static HRESULT WINAPI HTMLScreen_get_width(IHTMLScreen *iface, LONG *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
Get
DeviceCaps
(
get_display_dc
(),
HORZRES
);
*
p
=
Get
SystemMetrics
(
SM_CXSCREEN
);
return
S_OK
;
}
...
...
@@ -160,7 +162,7 @@ static HRESULT WINAPI HTMLScreen_get_height(IHTMLScreen *iface, LONG *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
Get
DeviceCaps
(
get_display_dc
(),
VERTRES
);
*
p
=
Get
SystemMetrics
(
SM_CYSCREEN
);
return
S_OK
;
}
...
...
dlls/mshtml/main.c
View file @
20074ac8
...
...
@@ -51,7 +51,6 @@ HINSTANCE hInst;
DWORD
mshtml_tls
=
TLS_OUT_OF_INDEXES
;
static
HINSTANCE
shdoclc
=
NULL
;
static
HDC
display_dc
;
static
WCHAR
*
status_strings
[
IDS_STATUS_LAST
-
IDS_STATUS_FIRST
+
1
];
static
IMultiLanguage2
*
mlang
;
...
...
@@ -140,8 +139,6 @@ static void process_detach(void)
FreeLibrary
(
shdoclc
);
if
(
mshtml_tls
!=
TLS_OUT_OF_INDEXES
)
TlsFree
(
mshtml_tls
);
if
(
display_dc
)
DeleteObject
(
display_dc
);
if
(
mlang
)
IMultiLanguage2_Release
(
mlang
);
...
...
@@ -210,21 +207,6 @@ HINSTANCE get_shdoclc(void)
return
shdoclc
=
LoadLibraryExW
(
wszShdoclc
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
}
HDC
get_display_dc
(
void
)
{
static
const
WCHAR
displayW
[]
=
{
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
0
};
if
(
!
display_dc
)
{
HDC
hdc
;
hdc
=
CreateICW
(
displayW
,
NULL
,
NULL
,
NULL
);
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
display_dc
,
hdc
,
NULL
))
DeleteObject
(
hdc
);
}
return
display_dc
;
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
reserved
)
{
switch
(
fdwReason
)
{
...
...
dlls/mshtml/mshtml_private.h
View file @
20074ac8
...
...
@@ -1348,7 +1348,6 @@ extern void *call_thiscall_func;
UINT
cp_from_charset_string
(
BSTR
)
DECLSPEC_HIDDEN
;
BSTR
charset_string_from_cp
(
UINT
)
DECLSPEC_HIDDEN
;
HDC
get_display_dc
(
void
)
DECLSPEC_HIDDEN
;
HINSTANCE
get_shdoclc
(
void
)
DECLSPEC_HIDDEN
;
void
set_statustext
(
HTMLDocumentObj
*
,
INT
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
...
...
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