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
f5f3426c
Commit
f5f3426c
authored
May 29, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fallback to normal icon drawing if AlphaBlend fails.
parent
7e23f9ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
cursoricon.c
dlls/user32/cursoricon.c
+15
-13
No files found.
dlls/user32/cursoricon.c
View file @
f5f3426c
...
...
@@ -2030,11 +2030,11 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
r
.
right
=
cxWidth
;
r
.
bottom
=
cxWidth
;
if
(
!
(
hdc_dest
=
CreateCompatibleDC
(
hdc
)))
goto
done
;
if
(
!
(
hdc_dest
=
CreateCompatibleDC
(
hdc
)))
goto
failed
;
if
(
!
(
hB_off
=
CreateCompatibleBitmap
(
hdc
,
cxWidth
,
cyWidth
)))
{
DeleteDC
(
hdc_dest
);
goto
done
;
goto
failed
;
}
SelectObject
(
hdc_dest
,
hB_off
);
FillRect
(
hdc_dest
,
&
r
,
hbr
);
...
...
@@ -2052,7 +2052,16 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
oldFg
=
SetTextColor
(
hdc
,
RGB
(
0
,
0
,
0
)
);
oldBg
=
SetBkColor
(
hdc
,
RGB
(
255
,
255
,
255
)
);
if
((
flags
&
DI_MASK
)
&&
(
!
ptr
->
alpha
||
!
(
flags
&
DI_IMAGE
)))
if
(
ptr
->
alpha
&&
(
flags
&
DI_IMAGE
))
{
BLENDFUNCTION
pixelblend
=
{
AC_SRC_OVER
,
0
,
255
,
AC_SRC_ALPHA
};
SelectObject
(
hMemDC
,
ptr
->
alpha
);
if
(
GdiAlphaBlend
(
hdc_dest
,
x
,
y
,
cxWidth
,
cyWidth
,
hMemDC
,
0
,
0
,
ptr
->
width
,
ptr
->
height
,
pixelblend
))
goto
done
;
}
if
(
flags
&
DI_MASK
)
{
SelectObject
(
hMemDC
,
ptr
->
mask
);
StretchBlt
(
hdc_dest
,
x
,
y
,
cxWidth
,
cyWidth
,
...
...
@@ -2061,15 +2070,7 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
if
(
flags
&
DI_IMAGE
)
{
if
(
ptr
->
alpha
)
{
BLENDFUNCTION
pixelblend
=
{
AC_SRC_OVER
,
0
,
255
,
AC_SRC_ALPHA
};
SelectObject
(
hMemDC
,
ptr
->
alpha
);
GdiAlphaBlend
(
hdc_dest
,
x
,
y
,
cxWidth
,
cyWidth
,
hMemDC
,
0
,
0
,
ptr
->
width
,
ptr
->
height
,
pixelblend
);
}
else
if
(
ptr
->
color
)
if
(
ptr
->
color
)
{
DWORD
rop
=
(
flags
&
DI_MASK
)
?
SRCINVERT
:
SRCCOPY
;
SelectObject
(
hMemDC
,
ptr
->
color
);
...
...
@@ -2085,6 +2086,7 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
}
}
done:
if
(
DoOffscreen
)
BitBlt
(
hdc
,
x0
,
y0
,
cxWidth
,
cyWidth
,
hdc_dest
,
0
,
0
,
SRCCOPY
);
SetTextColor
(
hdc
,
oldFg
);
...
...
@@ -2093,7 +2095,7 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
result
=
TRUE
;
if
(
hdc_dest
!=
hdc
)
DeleteDC
(
hdc_dest
);
if
(
hB_off
)
DeleteObject
(
hB_off
);
done
:
failed
:
DeleteDC
(
hMemDC
);
release_icon_ptr
(
hIcon
,
ptr
);
return
result
;
...
...
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