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
cecb3a99
Commit
cecb3a99
authored
Dec 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Allocate user handles for cursors/icons when we don't have 16-bit support.
parent
0f511f3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
user_private.h
dlls/user32/user_private.h
+1
-0
winproc.c
dlls/user32/winproc.c
+14
-6
No files found.
dlls/user32/user_private.h
View file @
cecb3a99
...
@@ -129,6 +129,7 @@ enum user_obj_type
...
@@ -129,6 +129,7 @@ enum user_obj_type
USER_WINDOW
=
1
,
/* window */
USER_WINDOW
=
1
,
/* window */
USER_MENU
,
/* menu */
USER_MENU
,
/* menu */
USER_ACCEL
,
/* accelerator */
USER_ACCEL
,
/* accelerator */
USER_ICON
,
/* icon or cursor */
USER_DWP
/* DeferWindowPos structure */
USER_DWP
/* DeferWindowPos structure */
};
};
...
...
dlls/user32/winproc.c
View file @
cecb3a99
...
@@ -1123,24 +1123,32 @@ static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
...
@@ -1123,24 +1123,32 @@ static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
static
HICON
alloc_icon_handle
(
unsigned
int
size
)
static
HICON
alloc_icon_handle
(
unsigned
int
size
)
{
{
HGLOBAL16
handle
=
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
);
struct
user_object
*
obj
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
obj
)
+
size
);
FarSetOwner16
(
handle
,
0
)
;
if
(
!
obj
)
return
0
;
return
HICON_32
(
handle
);
return
alloc_user_handle
(
obj
,
USER_ICON
);
}
}
static
struct
tagCURSORICONINFO
*
get_icon_ptr
(
HICON
handle
)
static
struct
tagCURSORICONINFO
*
get_icon_ptr
(
HICON
handle
)
{
{
return
GlobalLock16
(
HICON_16
(
handle
)
);
struct
user_object
*
obj
=
get_user_handle_ptr
(
handle
,
USER_ICON
);
if
(
obj
==
OBJ_OTHER_PROCESS
)
{
WARN
(
"cursor handle %p from other process
\n
"
,
handle
);
obj
=
NULL
;
}
return
obj
?
(
struct
tagCURSORICONINFO
*
)(
obj
+
1
)
:
NULL
;
}
}
static
void
release_icon_ptr
(
HICON
handle
,
struct
tagCURSORICONINFO
*
ptr
)
static
void
release_icon_ptr
(
HICON
handle
,
struct
tagCURSORICONINFO
*
ptr
)
{
{
GlobalUnlock16
(
HICON_16
(
handle
)
);
release_user_handle_ptr
(
(
struct
user_object
*
)
ptr
-
1
);
}
}
static
int
free_icon_handle
(
HICON
handle
)
static
int
free_icon_handle
(
HICON
handle
)
{
{
return
GlobalFree16
(
HICON_16
(
handle
)
);
struct
user_object
*
obj
=
free_user_handle
(
handle
,
USER_ICON
);
HeapFree
(
GetProcessHeap
(),
0
,
obj
);
return
!
obj
;
}
}
...
...
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