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
50403fec
Commit
50403fec
authored
Oct 01, 2015
by
Alex Henrie
Committed by
Alexandre Julliard
Oct 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Replace release_icon_ptr with release_user_handle_ptr.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
parent
6f97e1a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
25 deletions
+20
-25
cursoricon.c
dlls/user32/cursoricon.c
+20
-25
No files found.
dlls/user32/cursoricon.c
View file @
50403fec
...
...
@@ -158,11 +158,6 @@ static struct cursoricon_object *get_icon_ptr( HICON handle )
return
obj
;
}
static
void
release_icon_ptr
(
HICON
handle
,
struct
cursoricon_object
*
ptr
)
{
release_user_handle_ptr
(
ptr
);
}
static
struct
cursoricon_frame
*
get_icon_frame
(
struct
cursoricon_object
*
obj
,
int
istep
)
{
struct
static_cursoricon_object
*
req_frame
;
...
...
@@ -192,7 +187,7 @@ static void release_icon_frame( struct cursoricon_object *obj, int istep, struct
ani_icon_data
=
(
struct
animated_cursoricon_object
*
)
obj
;
frameobj
=
(
struct
cursoricon_object
*
)
(((
char
*
)
frame
)
-
FIELD_OFFSET
(
struct
static_cursoricon_object
,
frame
));
release_
icon_ptr
(
ani_icon_data
->
frames
[
istep
],
frameobj
);
release_
user_handle_ptr
(
frameobj
);
}
}
...
...
@@ -484,7 +479,7 @@ BOOL get_icon_size( HICON handle, SIZE *size )
size
->
cx
=
frame
->
width
;
size
->
cy
=
frame
->
height
;
release_icon_frame
(
info
,
0
,
frame
);
release_
icon_ptr
(
handle
,
info
);
release_
user_handle_ptr
(
info
);
return
TRUE
;
}
...
...
@@ -976,7 +971,7 @@ done:
info
->
rsrc
=
rsrc
;
list_add_head
(
&
icon_cache
,
&
info
->
entry
);
}
release_
icon_ptr
(
hObj
,
info
);
release_
user_handle_ptr
(
info
);
}
else
{
...
...
@@ -1229,7 +1224,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const BYTE *bits, DWORD bits_size,
{
FIXME_
(
cursor
)(
"Completely failed to create animated cursor!
\n
"
);
ani_icon_data
->
num_frames
=
0
;
release_
icon_ptr
(
cursor
,
info
);
release_
user_handle_ptr
(
info
);
free_icon_handle
(
cursor
);
HeapFree
(
GetProcessHeap
(),
0
,
frames
);
return
0
;
...
...
@@ -1275,7 +1270,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const BYTE *bits, DWORD bits_size,
}
HeapFree
(
GetProcessHeap
(),
0
,
frames
);
release_
icon_ptr
(
cursor
,
info
);
release_
user_handle_ptr
(
info
);
return
cursor
;
}
...
...
@@ -1592,14 +1587,14 @@ HICON WINAPI CopyIcon( HICON hIcon )
ptrNew
->
hotspot
=
ptrOld
->
hotspot
;
if
(
!
(
frameOld
=
get_icon_frame
(
ptrOld
,
0
)))
{
release_
icon_ptr
(
hIcon
,
ptrOld
);
release_
user_handle_ptr
(
ptrOld
);
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
0
;
}
if
(
!
(
frameNew
=
get_icon_frame
(
ptrNew
,
0
)))
{
release_icon_frame
(
ptrOld
,
0
,
frameOld
);
release_
icon_ptr
(
hIcon
,
ptrOld
);
release_
user_handle_ptr
(
ptrOld
);
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
0
;
}
...
...
@@ -1611,9 +1606,9 @@ HICON WINAPI CopyIcon( HICON hIcon )
frameNew
->
alpha
=
copy_bitmap
(
frameOld
->
alpha
);
release_icon_frame
(
ptrOld
,
0
,
frameOld
);
release_icon_frame
(
ptrNew
,
0
,
frameNew
);
release_
icon_ptr
(
hNew
,
ptrNew
);
release_
user_handle_ptr
(
ptrNew
);
}
release_
icon_ptr
(
hIcon
,
ptrOld
);
release_
user_handle_ptr
(
ptrOld
);
return
hNew
;
}
...
...
@@ -1631,7 +1626,7 @@ BOOL WINAPI DestroyIcon( HICON hIcon )
if
(
obj
)
{
BOOL
shared
=
(
obj
->
rsrc
!=
NULL
);
release_
icon_ptr
(
hIcon
,
obj
);
release_
user_handle_ptr
(
obj
);
ret
=
(
GetCursor
()
!=
hIcon
);
if
(
!
shared
)
free_icon_handle
(
hIcon
);
}
...
...
@@ -1688,7 +1683,7 @@ HCURSOR WINAPI DECLSPEC_HOTPATCH SetCursor( HCURSOR hCursor /* [in] Handle of cu
USER_Driver
->
pSetCursor
(
show_count
>=
0
?
hCursor
:
0
);
if
(
!
(
obj
=
get_icon_ptr
(
hOldCursor
)))
return
0
;
release_
icon_ptr
(
hOldCursor
,
obj
);
release_
user_handle_ptr
(
obj
);
return
hOldCursor
;
}
...
...
@@ -1986,7 +1981,7 @@ HCURSOR WINAPI GetCursorFrameInfo(HCURSOR hCursor, DWORD reserved, DWORD istep,
}
}
release_
icon_ptr
(
hCursor
,
ptr
);
release_
user_handle_ptr
(
ptr
);
return
ret
;
}
...
...
@@ -2057,7 +2052,7 @@ BOOL WINAPI GetIconInfoExW( HICON icon, ICONINFOEXW *info )
frame
=
get_icon_frame
(
ptr
,
0
);
if
(
!
frame
)
{
release_
icon_ptr
(
icon
,
ptr
);
release_
user_handle_ptr
(
ptr
);
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
FALSE
;
}
...
...
@@ -2085,7 +2080,7 @@ BOOL WINAPI GetIconInfoExW( HICON icon, ICONINFOEXW *info )
}
module
=
ptr
->
module
;
release_icon_frame
(
ptr
,
0
,
frame
);
release_
icon_ptr
(
icon
,
ptr
);
release_
user_handle_ptr
(
ptr
);
if
(
ret
&&
module
)
GetModuleFileNameW
(
module
,
info
->
szModName
,
MAX_PATH
);
return
ret
;
}
...
...
@@ -2215,7 +2210,7 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo)
info
->
hotspot
.
y
=
iconinfo
->
yHotspot
;
}
release_
icon_ptr
(
hObj
,
info
);
release_
user_handle_ptr
(
info
);
}
return
hObj
;
}
...
...
@@ -2260,19 +2255,19 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
if
(
istep
>=
get_icon_steps
(
ptr
))
{
TRACE_
(
icon
)(
"Stepped past end of animated frames=%d
\n
"
,
istep
);
release_
icon_ptr
(
hIcon
,
ptr
);
release_
user_handle_ptr
(
ptr
);
return
FALSE
;
}
if
(
!
(
frame
=
get_icon_frame
(
ptr
,
istep
)))
{
FIXME_
(
icon
)(
"Error retrieving icon frame %d
\n
"
,
istep
);
release_
icon_ptr
(
hIcon
,
ptr
);
release_
user_handle_ptr
(
ptr
);
return
FALSE
;
}
if
(
!
(
hMemDC
=
CreateCompatibleDC
(
hdc
)))
{
release_icon_frame
(
ptr
,
istep
,
frame
);
release_
icon_ptr
(
hIcon
,
ptr
);
release_
user_handle_ptr
(
ptr
);
return
FALSE
;
}
...
...
@@ -2386,7 +2381,7 @@ done:
failed:
DeleteDC
(
hMemDC
);
release_icon_frame
(
ptr
,
istep
,
frame
);
release_
icon_ptr
(
hIcon
,
ptr
);
release_
user_handle_ptr
(
ptr
);
return
result
;
}
...
...
@@ -2908,7 +2903,7 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
!
icon
->
is_icon
,
flags
);
else
res
=
CopyIcon
(
hnd
);
/* FIXME: change size if necessary */
release_
icon_ptr
(
hnd
,
icon
);
release_
user_handle_ptr
(
icon
);
if
(
res
&&
(
flags
&
LR_COPYDELETEORG
))
DeleteObject
(
hnd
);
return
res
;
...
...
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