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
79516685
Commit
79516685
authored
Mar 03, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Mar 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/ipaddress: Do not open theme data in IPADDRESS_Draw().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
161649e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
ipaddress.c
dlls/comctl32/ipaddress.c
+15
-4
No files found.
dlls/comctl32/ipaddress.c
View file @
79516685
...
...
@@ -145,7 +145,7 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
GetClientRect
(
infoPtr
->
Self
,
&
rect
);
theme
=
OpenThemeData
(
infoPtr
->
Self
,
WC_EDITW
);
theme
=
GetWindowTheme
(
infoPtr
->
Self
);
if
(
theme
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
Self
,
GWL_STYLE
);
...
...
@@ -193,9 +193,6 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
DrawTextW
(
hdc
,
L"."
,
1
,
&
rect
,
DT_SINGLELINE
|
DT_CENTER
|
DT_BOTTOM
);
}
if
(
theme
)
CloseThemeData
(
theme
);
return
0
;
}
...
...
@@ -255,6 +252,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
}
IPADDRESS_UpdateText
(
infoPtr
);
OpenThemeData
(
infoPtr
->
Self
,
WC_EDITW
);
return
0
;
}
...
...
@@ -262,6 +260,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
static
LRESULT
IPADDRESS_Destroy
(
IPADDRESS_INFO
*
infoPtr
)
{
HTHEME
theme
;
int
i
;
TRACE
(
"
\n
"
);
...
...
@@ -272,6 +271,8 @@ static LRESULT IPADDRESS_Destroy (IPADDRESS_INFO *infoPtr)
}
SetWindowLongPtrW
(
infoPtr
->
Self
,
0
,
0
);
theme
=
GetWindowTheme
(
infoPtr
->
Self
);
CloseThemeData
(
theme
);
heap_free
(
infoPtr
);
return
0
;
}
...
...
@@ -456,6 +457,13 @@ static BOOL IPADDRESS_GotoNextField (const IPADDRESS_INFO *infoPtr, int cur, int
return
FALSE
;
}
static
LRESULT
IPADDRESS_ThemeChanged
(
const
IPADDRESS_INFO
*
infoPtr
)
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
Self
);
CloseThemeData
(
theme
);
theme
=
OpenThemeData
(
theme
,
WC_EDITW
);
return
0
;
}
/*
* period: move and select the text in the next field to the right if
...
...
@@ -618,6 +626,9 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
COMCTL32_RefreshSysColors
();
return
0
;
case
WM_THEMECHANGED
:
return
IPADDRESS_ThemeChanged
(
infoPtr
);
case
IPM_CLEARADDRESS
:
return
IPADDRESS_ClearAddress
(
infoPtr
);
...
...
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