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
13d7cad9
Commit
13d7cad9
authored
Nov 26, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/combo: Simplify child controls position update helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b563ea01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
38 deletions
+29
-38
combo.c
dlls/user32/combo.c
+29
-38
No files found.
dlls/user32/combo.c
View file @
13d7cad9
...
...
@@ -1408,45 +1408,36 @@ static LRESULT COMBO_GetTextA( LPHEADCOMBO lphc, INT count, LPSTR buf )
* This function sets window positions according to the updated
* component placement struct.
*/
static
void
CBResetPos
(
LPHEADCOMBO
lphc
,
const
RECT
*
rectEdit
,
const
RECT
*
rectLB
,
BOOL
bRedraw
)
static
void
CBResetPos
(
HEADCOMBO
*
combo
,
BOOL
redraw
)
{
BOOL
bDrop
=
(
CB_GETTYPE
(
lphc
)
!=
CBS_SIMPLE
);
/* NOTE: logs sometimes have WM_LBUTTONUP before a cascade of
* sizing messages */
if
(
lphc
->
wState
&
CBF_EDIT
)
SetWindowPos
(
lphc
->
hWndEdit
,
0
,
rectEdit
->
left
,
rectEdit
->
top
,
rectEdit
->
right
-
rectEdit
->
left
,
rectEdit
->
bottom
-
rectEdit
->
top
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
((
bDrop
)
?
SWP_NOREDRAW
:
0
)
);
SetWindowPos
(
lphc
->
hWndLBox
,
0
,
rectLB
->
left
,
rectLB
->
top
,
rectLB
->
right
-
rectLB
->
left
,
rectLB
->
bottom
-
rectLB
->
top
,
SWP_NOACTIVATE
|
SWP_NOZORDER
|
((
bDrop
)
?
SWP_NOREDRAW
:
0
)
);
if
(
bDrop
)
{
if
(
lphc
->
wState
&
CBF_DROPPED
)
{
lphc
->
wState
&=
~
CBF_DROPPED
;
ShowWindow
(
lphc
->
hWndLBox
,
SW_HIDE
);
}
BOOL
drop
=
CB_GETTYPE
(
combo
)
!=
CBS_SIMPLE
;
/* NOTE: logs sometimes have WM_LBUTTONUP before a cascade of
* sizing messages */
if
(
combo
->
wState
&
CBF_EDIT
)
SetWindowPos
(
combo
->
hWndEdit
,
0
,
combo
->
textRect
.
left
,
combo
->
textRect
.
top
,
combo
->
textRect
.
right
-
combo
->
textRect
.
left
,
combo
->
textRect
.
bottom
-
combo
->
textRect
.
top
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
(
drop
?
SWP_NOREDRAW
:
0
));
SetWindowPos
(
combo
->
hWndLBox
,
0
,
combo
->
droppedRect
.
left
,
combo
->
droppedRect
.
top
,
combo
->
droppedRect
.
right
-
combo
->
droppedRect
.
left
,
combo
->
droppedRect
.
bottom
-
combo
->
droppedRect
.
top
,
SWP_NOACTIVATE
|
SWP_NOZORDER
|
(
drop
?
SWP_NOREDRAW
:
0
));
if
(
drop
)
{
if
(
combo
->
wState
&
CBF_DROPPED
)
{
combo
->
wState
&=
~
CBF_DROPPED
;
ShowWindow
(
combo
->
hWndLBox
,
SW_HIDE
);
}
if
(
bRedraw
&&
!
(
lphc
->
wState
&
CBF_NOREDRAW
)
)
RedrawWindow
(
lphc
->
self
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
|
RDW_UPDATENOW
);
}
if
(
redraw
&&
!
(
combo
->
wState
&
CBF_NOREDRAW
))
RedrawWindow
(
combo
->
self
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
|
RDW_UPDATENOW
);
}
}
/***********************************************************************
* COMBO_Size
*/
...
...
@@ -1491,7 +1482,7 @@ static void COMBO_Size( LPHEADCOMBO lphc )
CBCalcPlacement
(
lphc
);
CBResetPos
(
lphc
,
&
lphc
->
textRect
,
&
lphc
->
droppedRect
,
FALSE
);
CBResetPos
(
lphc
,
FALSE
);
}
...
...
@@ -1519,7 +1510,7 @@ static void COMBO_Font( LPHEADCOMBO lphc, HFONT hFont, BOOL bRedraw )
{
CBCalcPlacement
(
lphc
);
CBResetPos
(
lphc
,
&
lphc
->
textRect
,
&
lphc
->
droppedRect
,
TRUE
);
CBResetPos
(
lphc
,
TRUE
);
}
else
{
...
...
@@ -1548,7 +1539,7 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT index, INT height )
{
CBCalcPlacement
(
lphc
);
CBResetPos
(
lphc
,
&
lphc
->
textRect
,
&
lphc
->
droppedRect
,
TRUE
);
CBResetPos
(
lphc
,
TRUE
);
}
else
{
...
...
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