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
79bdecea
Commit
79bdecea
authored
Mar 29, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Clip painting to the items_rect.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1bdd12f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
menu.c
dlls/user32/menu.c
+18
-3
No files found.
dlls/user32/menu.c
View file @
79bdecea
...
...
@@ -1402,6 +1402,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
UINT
arrow_bitmap_width
=
0
,
arrow_bitmap_height
=
0
;
POPUPMENU
*
menu
=
MENU_GetMenu
(
hmenu
);
RECT
bmprc
;
HRGN
old_clip
=
NULL
,
clip
;
debug_print_menuitem
(
"MENU_DrawMenuItem: "
,
lpitem
,
""
);
...
...
@@ -1450,6 +1451,16 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
rect
=
lpitem
->
rect
;
MENU_AdjustMenuItemRect
(
MENU_GetMenu
(
hmenu
),
&
rect
);
old_clip
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
GetClipRgn
(
hdc
,
old_clip
)
<=
0
)
{
DeleteObject
(
old_clip
);
old_clip
=
NULL
;
}
clip
=
CreateRectRgnIndirect
(
&
menu
->
items_rect
);
ExtSelectClipRgn
(
hdc
,
clip
,
RGN_AND
);
DeleteObject
(
clip
);
if
(
lpitem
->
fType
&
MF_OWNERDRAW
)
{
/*
...
...
@@ -1489,10 +1500,10 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
if
(
lpitem
->
fType
&
MF_POPUP
)
draw_popup_arrow
(
hdc
,
rect
,
arrow_bitmap_width
,
arrow_bitmap_height
);
return
;
goto
done
;
}
if
(
menuBar
&&
(
lpitem
->
fType
&
MF_SEPARATOR
))
return
;
if
(
menuBar
&&
(
lpitem
->
fType
&
MF_SEPARATOR
))
goto
done
;
if
(
lpitem
->
fState
&
MF_HILITE
)
{
...
...
@@ -1554,7 +1565,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
}
else
DrawEdge
(
hdc
,
&
rc
,
EDGE_ETCHED
,
BF_TOP
);
return
;
goto
done
;
}
/* helper lines for debugging */
...
...
@@ -1736,6 +1747,10 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
if
(
hfontOld
)
SelectObject
(
hdc
,
hfontOld
);
}
done:
ExtSelectClipRgn
(
hdc
,
old_clip
,
RGN_COPY
);
if
(
old_clip
)
DeleteObject
(
old_clip
);
}
...
...
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