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
31fab670
Commit
31fab670
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/edit: Call GetWindowTheme() only when necessary.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79516685
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
edit.c
dlls/comctl32/edit.c
+4
-5
No files found.
dlls/comctl32/edit.c
View file @
31fab670
...
@@ -4597,7 +4597,6 @@ static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es)
...
@@ -4597,7 +4597,6 @@ static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es)
static
LRESULT
CALLBACK
EDIT_WindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CALLBACK
EDIT_WindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
EDITSTATE
*
es
=
(
EDITSTATE
*
)
GetWindowLongPtrW
(
hwnd
,
0
);
EDITSTATE
*
es
=
(
EDITSTATE
*
)
GetWindowLongPtrW
(
hwnd
,
0
);
HTHEME
theme
=
GetWindowTheme
(
hwnd
);
LRESULT
result
=
0
;
LRESULT
result
=
0
;
RECT
*
rect
;
RECT
*
rect
;
...
@@ -4905,7 +4904,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
...
@@ -4905,7 +4904,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case
WM_ENABLE
:
case
WM_ENABLE
:
es
->
bEnableState
=
(
BOOL
)
wParam
;
es
->
bEnableState
=
(
BOOL
)
wParam
;
EDIT_UpdateText
(
es
,
NULL
,
TRUE
);
EDIT_UpdateText
(
es
,
NULL
,
TRUE
);
if
(
theme
)
if
(
GetWindowTheme
(
hwnd
)
)
RedrawWindow
(
hwnd
,
NULL
,
NULL
,
RDW_FRAME
|
RDW_INVALIDATE
|
RDW_UPDATENOW
);
RedrawWindow
(
hwnd
,
NULL
,
NULL
,
RDW_FRAME
|
RDW_INVALIDATE
|
RDW_UPDATENOW
);
break
;
break
;
...
@@ -4935,7 +4934,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
...
@@ -4935,7 +4934,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
break
;
break
;
case
WM_KILLFOCUS
:
case
WM_KILLFOCUS
:
result
=
EDIT_WM_KillFocus
(
theme
,
es
);
result
=
EDIT_WM_KillFocus
(
GetWindowTheme
(
hwnd
)
,
es
);
break
;
break
;
case
WM_LBUTTONDBLCLK
:
case
WM_LBUTTONDBLCLK
:
...
@@ -4972,7 +4971,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
...
@@ -4972,7 +4971,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
break
;
break
;
case
WM_SETFOCUS
:
case
WM_SETFOCUS
:
EDIT_WM_SetFocus
(
theme
,
es
);
EDIT_WM_SetFocus
(
GetWindowTheme
(
hwnd
)
,
es
);
break
;
break
;
case
WM_SETFONT
:
case
WM_SETFONT
:
...
@@ -5096,7 +5095,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
...
@@ -5096,7 +5095,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
break
;
break
;
case
WM_THEMECHANGED
:
case
WM_THEMECHANGED
:
CloseThemeData
(
theme
);
CloseThemeData
(
GetWindowTheme
(
hwnd
)
);
OpenThemeData
(
hwnd
,
WC_EDITW
);
OpenThemeData
(
hwnd
,
WC_EDITW
);
break
;
break
;
...
...
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