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
65a2e59a
Commit
65a2e59a
authored
Jun 24, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Avoid using CopyRect() on RECT structs.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e201dcac
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
15 deletions
+13
-15
draglist.c
dlls/comctl32/draglist.c
+1
-1
listview.c
dlls/comctl32/listview.c
+2
-3
progress.c
dlls/comctl32/progress.c
+1
-1
propsheet.c
dlls/comctl32/propsheet.c
+1
-1
theme_combo.c
dlls/comctl32/theme_combo.c
+2
-3
toolbar.c
dlls/comctl32/toolbar.c
+6
-6
No files found.
dlls/comctl32/draglist.c
View file @
65a2e59a
...
@@ -264,7 +264,7 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
...
@@ -264,7 +264,7 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
RedrawWindow
(
hwndParent
,
&
data
->
last_drag_icon_rect
,
NULL
,
RedrawWindow
(
hwndParent
,
&
data
->
last_drag_icon_rect
,
NULL
,
RDW_INTERNALPAINT
|
RDW_ERASE
|
RDW_INVALIDATE
|
RDW_UPDATENOW
);
RDW_INTERNALPAINT
|
RDW_ERASE
|
RDW_INVALIDATE
|
RDW_UPDATENOW
);
CopyRect
(
&
data
->
last_drag_icon_rect
,
&
rcDragIcon
)
;
data
->
last_drag_icon_rect
=
rcDragIcon
;
if
(
nItem
>=
0
)
if
(
nItem
>=
0
)
{
{
...
...
dlls/comctl32/listview.c
View file @
65a2e59a
...
@@ -3856,9 +3856,8 @@ static void LISTVIEW_MarqueeHighlight(LISTVIEW_INFO *infoPtr, const POINT *coord
...
@@ -3856,9 +3856,8 @@ static void LISTVIEW_MarqueeHighlight(LISTVIEW_INFO *infoPtr, const POINT *coord
iterator_frameditems_absolute
(
&
old_elems
,
infoPtr
,
&
infoPtr
->
marqueeRect
);
iterator_frameditems_absolute
(
&
old_elems
,
infoPtr
,
&
infoPtr
->
marqueeRect
);
CopyRect
(
&
infoPtr
->
marqueeRect
,
&
rect
);
infoPtr
->
marqueeRect
=
rect
;
infoPtr
->
marqueeDrawRect
=
rect
;
CopyRect
(
&
infoPtr
->
marqueeDrawRect
,
&
rect
);
OffsetRect
(
&
infoPtr
->
marqueeDrawRect
,
offset
->
x
,
offset
->
y
);
OffsetRect
(
&
infoPtr
->
marqueeDrawRect
,
offset
->
x
,
offset
->
y
);
iterator_frameditems_absolute
(
&
new_elems
,
infoPtr
,
&
infoPtr
->
marqueeRect
);
iterator_frameditems_absolute
(
&
new_elems
,
infoPtr
,
&
infoPtr
->
marqueeRect
);
...
...
dlls/comctl32/progress.c
View file @
65a2e59a
...
@@ -355,7 +355,7 @@ static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc)
...
@@ -355,7 +355,7 @@ static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc)
DrawThemeParentBackground
(
infoPtr
->
Self
,
hdc
,
NULL
);
DrawThemeParentBackground
(
infoPtr
->
Self
,
hdc
,
NULL
);
DrawThemeBackground
(
pdi
.
theme
,
hdc
,
part
,
0
,
&
pdi
.
rect
,
NULL
);
DrawThemeBackground
(
pdi
.
theme
,
hdc
,
part
,
0
,
&
pdi
.
rect
,
NULL
);
SelectClipRgn
(
hdc
,
NULL
);
SelectClipRgn
(
hdc
,
NULL
);
CopyRect
(
&
pdi
.
rect
,
&
cntRect
)
;
pdi
.
rect
=
cntRect
;
}
}
/* compute some drawing parameters */
/* compute some drawing parameters */
...
...
dlls/comctl32/propsheet.c
View file @
65a2e59a
...
@@ -3219,7 +3219,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
...
@@ -3219,7 +3219,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
if
(
bm
.
bmWidth
<
r
.
right
||
bm
.
bmHeight
<
r
.
bottom
)
if
(
bm
.
bmWidth
<
r
.
right
||
bm
.
bmHeight
<
r
.
bottom
)
{
{
hbr
=
CreateSolidBrush
(
GetPixel
(
hdcSrc
,
0
,
0
));
hbr
=
CreateSolidBrush
(
GetPixel
(
hdcSrc
,
0
,
0
));
CopyRect
(
&
r
,
&
rzone
)
;
r
=
rzone
;
if
(
bm
.
bmWidth
<
r
.
right
)
if
(
bm
.
bmWidth
<
r
.
right
)
{
{
r
.
left
=
bm
.
bmWidth
;
r
.
left
=
bm
.
bmWidth
;
...
...
dlls/comctl32/theme_combo.c
View file @
65a2e59a
...
@@ -80,7 +80,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c
...
@@ -80,7 +80,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c
/*
/*
* Give ourselves some space.
* Give ourselves some space.
*/
*/
CopyRect
(
&
rectEdit
,
&
cbi
->
rcItem
)
;
rectEdit
=
cbi
->
rcItem
;
InflateRect
(
&
rectEdit
,
-
1
,
-
1
);
InflateRect
(
&
rectEdit
,
-
1
,
-
1
);
if
(
dwStyle
&
(
CBS_OWNERDRAWFIXED
|
CBS_OWNERDRAWVARIABLE
))
if
(
dwStyle
&
(
CBS_OWNERDRAWFIXED
|
CBS_OWNERDRAWVARIABLE
))
...
@@ -187,8 +187,7 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state)
...
@@ -187,8 +187,7 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state)
GetClientRect
(
hwnd
,
&
frameRect
);
GetClientRect
(
hwnd
,
&
frameRect
);
else
else
{
{
CopyRect
(
&
frameRect
,
&
cbi
.
rcItem
);
frameRect
=
cbi
.
rcItem
;
InflateRect
(
&
frameRect
,
InflateRect
(
&
frameRect
,
EDIT_CONTROL_PADDING
+
COMBO_XBORDERSIZE
,
EDIT_CONTROL_PADDING
+
COMBO_XBORDERSIZE
,
EDIT_CONTROL_PADDING
+
COMBO_YBORDERSIZE
);
EDIT_CONTROL_PADDING
+
COMBO_YBORDERSIZE
);
...
...
dlls/comctl32/toolbar.c
View file @
65a2e59a
...
@@ -876,7 +876,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
...
@@ -876,7 +876,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
rc
=
btnPtr
->
rect
;
rc
=
btnPtr
->
rect
;
CopyRect
(
&
rcArrow
,
&
rc
)
;
rcArrow
=
rc
;
/* separator - doesn't send NM_CUSTOMDRAW */
/* separator - doesn't send NM_CUSTOMDRAW */
if
(
btnPtr
->
fsStyle
&
BTNS_SEP
)
{
if
(
btnPtr
->
fsStyle
&
BTNS_SEP
)
{
...
@@ -929,8 +929,8 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
...
@@ -929,8 +929,8 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
/* copy text & bitmap rects after adjusting for drop-down arrow
/* copy text & bitmap rects after adjusting for drop-down arrow
* so that text & bitmap is centered in the rectangle not containing
* so that text & bitmap is centered in the rectangle not containing
* the arrow */
* the arrow */
CopyRect
(
&
rcText
,
&
rc
)
;
rcText
=
rc
;
CopyRect
(
&
rcBitmap
,
&
rc
)
;
rcBitmap
=
rc
;
/* Center the bitmap horizontally and vertically */
/* Center the bitmap horizontally and vertically */
if
(
dwStyle
&
TBSTYLE_LIST
)
if
(
dwStyle
&
TBSTYLE_LIST
)
...
@@ -2648,9 +2648,9 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -2648,9 +2648,9 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
lpdis
->
rcItem
.
right
,
lpdis
->
rcItem
.
bottom
);
lpdis
->
rcItem
.
right
,
lpdis
->
rcItem
.
bottom
);
/* calculate button and text rectangles */
/* calculate button and text rectangles */
CopyRect
(
&
rcButton
,
&
lpdis
->
rcItem
)
;
rcButton
=
lpdis
->
rcItem
;
InflateRect
(
&
rcButton
,
-
1
,
-
1
);
InflateRect
(
&
rcButton
,
-
1
,
-
1
);
CopyRect
(
&
rcText
,
&
rcButton
)
;
rcText
=
rcButton
;
rcButton
.
right
=
rcButton
.
left
+
custInfo
->
tbInfo
->
nBitmapWidth
+
6
;
rcButton
.
right
=
rcButton
.
left
+
custInfo
->
tbInfo
->
nBitmapWidth
+
6
;
rcText
.
left
=
rcButton
.
right
+
2
;
rcText
.
left
=
rcButton
.
right
+
2
;
...
@@ -5550,7 +5550,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
...
@@ -5550,7 +5550,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
RECT
arrowRect
;
RECT
arrowRect
;
infoPtr
->
nOldHit
=
nHit
;
infoPtr
->
nOldHit
=
nHit
;
CopyRect
(
&
arrowRect
,
&
btnPtr
->
rect
)
;
arrowRect
=
btnPtr
->
rect
;
arrowRect
.
left
=
max
(
btnPtr
->
rect
.
left
,
btnPtr
->
rect
.
right
-
DDARROW_WIDTH
);
arrowRect
.
left
=
max
(
btnPtr
->
rect
.
left
,
btnPtr
->
rect
.
right
-
DDARROW_WIDTH
);
/* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */
/* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */
...
...
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