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
23dc2e6a
Commit
23dc2e6a
authored
Jul 15, 1999
by
Alex Priem
Committed by
Alexandre Julliard
Jul 15, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a hang when we process WM_STYLECHANGED.
Small optimization in TREEVIEW_DrawItem. Fix debugging crash in TREEVIEW_Expand.
parent
f78c3bee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
treeview.c
dlls/comctl32/treeview.c
+12
-16
No files found.
dlls/comctl32/treeview.c
View file @
23dc2e6a
...
@@ -509,7 +509,7 @@ static void
...
@@ -509,7 +509,7 @@ static void
TREEVIEW_DrawItem
(
HWND
hwnd
,
HDC
hdc
,
TREEVIEW_ITEM
*
wineItem
)
TREEVIEW_DrawItem
(
HWND
hwnd
,
HDC
hdc
,
TREEVIEW_ITEM
*
wineItem
)
{
{
TREEVIEW_INFO
*
infoPtr
=
TREEVIEW_GetInfoPtr
(
hwnd
);
TREEVIEW_INFO
*
infoPtr
=
TREEVIEW_GetInfoPtr
(
hwnd
);
DWORD
dwStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
INT
center
,
xpos
,
cx
,
cy
,
cditem
,
drawmode
;
INT
center
,
xpos
,
cx
,
cy
,
cditem
,
drawmode
;
HFONT
hOldFont
;
HFONT
hOldFont
;
UINT
uTextJustify
=
DT_LEFT
;
UINT
uTextJustify
=
DT_LEFT
;
...
@@ -546,7 +546,7 @@ TREEVIEW_DrawItem (HWND hwnd, HDC hdc, TREEVIEW_ITEM *wineItem)
...
@@ -546,7 +546,7 @@ TREEVIEW_DrawItem (HWND hwnd, HDC hdc, TREEVIEW_ITEM *wineItem)
/*
/*
* Display the tree hierarchy
* Display the tree hierarchy
*/
*/
if
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
TVS_HASLINES
)
if
(
dwStyle
&
TVS_HASLINES
)
{
{
/*
/*
* Write links to parent node
* Write links to parent node
...
@@ -556,7 +556,7 @@ TREEVIEW_DrawItem (HWND hwnd, HDC hdc, TREEVIEW_ITEM *wineItem)
...
@@ -556,7 +556,7 @@ TREEVIEW_DrawItem (HWND hwnd, HDC hdc, TREEVIEW_ITEM *wineItem)
* points[1] is the L corner
* points[1] is the L corner
* points[2] is attached to the parent or the up sibling
* points[2] is attached to the parent or the up sibling
*/
*/
if
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
TVS_LINESATROOT
)
if
(
dwStyle
&
TVS_LINESATROOT
)
{
{
TREEVIEW_ITEM
*
upNode
=
NULL
;
TREEVIEW_ITEM
*
upNode
=
NULL
;
BOOL
hasParentOrSibling
=
TRUE
;
BOOL
hasParentOrSibling
=
TRUE
;
...
@@ -618,8 +618,7 @@ TREEVIEW_DrawItem (HWND hwnd, HDC hdc, TREEVIEW_ITEM *wineItem)
...
@@ -618,8 +618,7 @@ TREEVIEW_DrawItem (HWND hwnd, HDC hdc, TREEVIEW_ITEM *wineItem)
if
(
wineItem
->
iLevel
!=
0
)
/* update position only for non root node */
if
(
wineItem
->
iLevel
!=
0
)
/* update position only for non root node */
xpos
+=
(
5
*
wineItem
->
iLevel
);
xpos
+=
(
5
*
wineItem
->
iLevel
);
if
((
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
TVS_HASBUTTONS
)
&&
if
((
dwStyle
&
TVS_HASBUTTONS
)
&&
(
dwStyle
&
TVS_HASLINES
))
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
TVS_HASLINES
))
{
{
if
(
(
wineItem
->
cChildren
)
||
if
(
(
wineItem
->
cChildren
)
||
(
wineItem
->
cChildren
==
I_CHILDRENCALLBACK
))
(
wineItem
->
cChildren
==
I_CHILDRENCALLBACK
))
...
@@ -2037,14 +2036,9 @@ TREEVIEW_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -2037,14 +2036,9 @@ TREEVIEW_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
static
LRESULT
static
LRESULT
TREEVIEW_StyleChanged
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
TREEVIEW_StyleChanged
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
LPSTYLESTRUCT
lpss
=
(
LPSTYLESTRUCT
)
lParam
;
TRACE
(
"(%x %lx)
\n
"
,
wParam
,
lParam
);
TRACE
(
"(%x %lx)
\n
"
,
wParam
,
lParam
);
if
(
wParam
&
(
GWL_STYLE
))
TREEVIEW_Refresh
(
hwnd
);
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
lpss
->
styleNew
);
if
(
wParam
&
(
GWL_EXSTYLE
))
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
lpss
->
styleNew
);
return
0
;
return
0
;
}
}
...
@@ -2487,11 +2481,13 @@ TREEVIEW_Expand (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -2487,11 +2481,13 @@ TREEVIEW_Expand (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
!
wineItem
->
cChildren
)
if
(
!
wineItem
->
cChildren
)
return
0
;
return
0
;
TRACE
(
"For (%s) flags:%x item:%d state:%d
\n
"
,
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACKA
)
wineItem
->
pszText
,
TRACE
(
"For item %d, flags %d, state %d
\n
"
,
flag
,
expand
,
flag
,
wineItem
->
state
);
expand
,
else
wineItem
->
state
);
TRACE
(
"For (%s) item:%d, flags %x, state:%d
\n
"
,
wineItem
->
pszText
,
flag
,
expand
,
wineItem
->
state
);
if
(
wineItem
->
cChildren
==
I_CHILDRENCALLBACK
)
{
if
(
wineItem
->
cChildren
==
I_CHILDRENCALLBACK
)
{
FIXME
(
"we don't handle I_CHILDRENCALLBACK yet
\n
"
);
FIXME
(
"we don't handle I_CHILDRENCALLBACK yet
\n
"
);
...
...
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