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
5df5972f
Commit
5df5972f
authored
May 23, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
May 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Reimplement CopyIcon() on top of CopyImage().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
beb70a79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
39 deletions
+6
-39
cursoricon.c
dlls/user32/cursoricon.c
+6
-39
No files found.
dlls/user32/cursoricon.c
View file @
5df5972f
...
...
@@ -1667,48 +1667,15 @@ HICON WINAPI CreateIcon( HINSTANCE instance, int width, int height, BYTE planes,
/***********************************************************************
* CopyIcon (USER32.@)
*/
HICON
WINAPI
CopyIcon
(
HICON
hI
con
)
HICON
WINAPI
CopyIcon
(
HICON
i
con
)
{
struct
cursoricon_object
*
ptrOld
,
*
ptrNew
;
HICON
hNew
;
ICONINFOEXW
info
;
if
(
!
(
ptrOld
=
get_icon_ptr
(
hIcon
)))
{
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
0
;
}
if
((
hNew
=
alloc_icon_handle
(
FALSE
,
0
)))
{
struct
cursoricon_frame
*
frameOld
,
*
frameNew
;
info
.
cbSize
=
sizeof
(
info
);
if
(
!
GetIconInfoExW
(
icon
,
&
info
))
return
NULL
;
ptrNew
=
get_icon_ptr
(
hNew
);
ptrNew
->
is_icon
=
ptrOld
->
is_icon
;
ptrNew
->
hotspot
=
ptrOld
->
hotspot
;
if
(
!
(
frameOld
=
get_icon_frame
(
ptrOld
,
0
)))
{
release_user_handle_ptr
(
ptrOld
);
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
0
;
}
if
(
!
(
frameNew
=
get_icon_frame
(
ptrNew
,
0
)))
{
release_icon_frame
(
ptrOld
,
frameOld
);
release_user_handle_ptr
(
ptrOld
);
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
0
;
}
frameNew
->
delay
=
0
;
frameNew
->
width
=
frameOld
->
width
;
frameNew
->
height
=
frameOld
->
height
;
frameNew
->
mask
=
copy_bitmap
(
frameOld
->
mask
);
frameNew
->
color
=
copy_bitmap
(
frameOld
->
color
);
frameNew
->
alpha
=
copy_bitmap
(
frameOld
->
alpha
);
release_icon_frame
(
ptrOld
,
frameOld
);
release_icon_frame
(
ptrNew
,
frameNew
);
release_user_handle_ptr
(
ptrNew
);
}
release_user_handle_ptr
(
ptrOld
);
return
hNew
;
return
CopyImage
(
icon
,
info
.
fIcon
?
IMAGE_ICON
:
IMAGE_CURSOR
,
0
,
0
,
0
);
}
...
...
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