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
b17b77c7
Commit
b17b77c7
authored
Jan 26, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Set the window cursor immediately in SetCursor.
parent
4b968267
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
28 deletions
+19
-28
window.c
dlls/wineandroid.drv/window.c
+19
-28
No files found.
dlls/wineandroid.drv/window.c
View file @
b17b77c7
...
...
@@ -1448,42 +1448,33 @@ static BOOL get_icon_info( HICON handle, ICONINFOEXW *ret )
*/
void
ANDROID_SetCursor
(
HWND
hwnd
,
HCURSOR
handle
)
{
static
HCURSOR
last_cursor
;
static
DWORD
last_cursor_change
;
if
(
InterlockedExchangePointer
(
(
void
**
)
&
last_cursor
,
handle
)
!=
handle
||
NtGetTickCount
()
-
last_cursor_change
>
100
)
if
(
handle
)
{
last_cursor_change
=
NtGetTickCount
();
unsigned
int
width
=
0
,
height
=
0
,
*
bits
=
NULL
;
ICONINFOEXW
info
;
int
id
;
if
(
handle
)
{
unsigned
int
width
=
0
,
height
=
0
,
*
bits
=
NULL
;
ICONINFOEXW
info
;
int
id
;
if
(
!
get_icon_info
(
handle
,
&
info
))
return
;
if
(
!
get_icon_info
(
handle
,
&
info
))
return
;
if
(
!
(
id
=
get_cursor_system_id
(
&
info
)))
{
HDC
hdc
=
NtGdiCreateCompatibleDC
(
0
);
bits
=
get_bitmap_argb
(
hdc
,
info
.
hbmColor
,
info
.
hbmMask
,
&
width
,
&
height
);
NtGdiDeleteObjectApp
(
hdc
);
if
(
!
(
id
=
get_cursor_system_id
(
&
info
)))
/* make sure hotspot is valid */
if
(
info
.
xHotspot
>=
width
||
info
.
yHotspot
>=
height
)
{
HDC
hdc
=
NtGdiCreateCompatibleDC
(
0
);
bits
=
get_bitmap_argb
(
hdc
,
info
.
hbmColor
,
info
.
hbmMask
,
&
width
,
&
height
);
NtGdiDeleteObjectApp
(
hdc
);
/* make sure hotspot is valid */
if
(
info
.
xHotspot
>=
width
||
info
.
yHotspot
>=
height
)
{
info
.
xHotspot
=
width
/
2
;
info
.
yHotspot
=
height
/
2
;
}
info
.
xHotspot
=
width
/
2
;
info
.
yHotspot
=
height
/
2
;
}
ioctl_set_cursor
(
id
,
width
,
height
,
info
.
xHotspot
,
info
.
yHotspot
,
bits
);
free
(
bits
);
NtGdiDeleteObjectApp
(
info
.
hbmColor
);
NtGdiDeleteObjectApp
(
info
.
hbmMask
);
}
else
ioctl_set_cursor
(
0
,
0
,
0
,
0
,
0
,
NULL
);
ioctl_set_cursor
(
id
,
width
,
height
,
info
.
xHotspot
,
info
.
yHotspot
,
bits
);
free
(
bits
);
NtGdiDeleteObjectApp
(
info
.
hbmColor
);
NtGdiDeleteObjectApp
(
info
.
hbmMask
);
}
else
ioctl_set_cursor
(
0
,
0
,
0
,
0
,
0
,
NULL
);
}
...
...
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