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
86612073
Commit
86612073
authored
Jun 04, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Directly use win32u for user calls.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
6b8b9811
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
49 deletions
+78
-49
device.c
dlls/wineandroid.drv/device.c
+5
-5
init.c
dlls/wineandroid.drv/init.c
+8
-4
opengl.c
dlls/wineandroid.drv/opengl.c
+9
-9
window.c
dlls/wineandroid.drv/window.c
+56
-31
No files found.
dlls/wineandroid.drv/device.c
View file @
86612073
...
...
@@ -312,7 +312,7 @@ static struct native_win_data *get_ioctl_native_win_data( const struct ioctl_hea
static
int
get_ioctl_win_parent
(
HWND
parent
)
{
if
(
parent
!=
GetDesktopWindow
()
&&
!
GetAncestor
(
parent
,
GA_PARENT
))
if
(
parent
!=
NtUserGetDesktopWindow
()
&&
!
NtUser
GetAncestor
(
parent
,
GA_PARENT
))
return
HandleToLong
(
HWND_MESSAGE
);
return
HandleToLong
(
parent
);
}
...
...
@@ -522,7 +522,7 @@ static void CALLBACK register_native_window_callback( ULONG_PTR arg1, ULONG_PTR
if
(
!
data
||
data
->
parent
==
win
)
{
pANativeWindow_release
(
win
);
if
(
data
)
PostMessageW
(
hwnd
,
WM_ANDROID_REFRESH
,
opengl
,
0
);
if
(
data
)
NtUserPostMessage
(
hwnd
,
WM_ANDROID_REFRESH
,
opengl
,
0
);
TRACE
(
"%p -> %p win %p (unchanged)
\n
"
,
hwnd
,
data
,
win
);
return
;
}
...
...
@@ -535,7 +535,7 @@ static void CALLBACK register_native_window_callback( ULONG_PTR arg1, ULONG_PTR
win
->
perform
(
win
,
NATIVE_WINDOW_SET_BUFFERS_FORMAT
,
data
->
buffer_format
);
win
->
setSwapInterval
(
win
,
data
->
swap_interval
);
unwrap_java_call
();
PostMessageW
(
hwnd
,
WM_ANDROID_REFRESH
,
opengl
,
0
);
NtUserPostMessage
(
hwnd
,
WM_ANDROID_REFRESH
,
opengl
,
0
);
TRACE
(
"%p -> %p win %p
\n
"
,
hwnd
,
data
,
win
);
}
...
...
@@ -1169,7 +1169,7 @@ static DWORD CALLBACK device_thread( void *arg )
init_java_thread
(
java_vm
);
create_desktop_window
(
GetDesktopWindow
()
);
create_desktop_window
(
NtUser
GetDesktopWindow
()
);
RtlInitUnicodeString
(
&
nameW
,
driver_nameW
);
if
((
status
=
IoCreateDriver
(
&
nameW
,
init_android_driver
)))
...
...
@@ -1559,7 +1559,7 @@ struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl, float scale )
req
.
hdr
.
hwnd
=
HandleToLong
(
win
->
hwnd
);
req
.
hdr
.
opengl
=
win
->
opengl
;
req
.
parent
=
get_ioctl_win_parent
(
GetAncestor
(
hwnd
,
GA_PARENT
));
req
.
parent
=
get_ioctl_win_parent
(
NtUser
GetAncestor
(
hwnd
,
GA_PARENT
));
req
.
scale
=
scale
;
android_ioctl
(
IOCTL_CREATE_WINDOW
,
&
req
,
sizeof
(
req
),
NULL
,
NULL
);
...
...
dlls/wineandroid.drv/init.c
View file @
86612073
...
...
@@ -62,15 +62,19 @@ static const struct user_driver_funcs android_drv_funcs;
void
init_monitors
(
int
width
,
int
height
)
{
static
const
WCHAR
trayW
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
,
0
};
UNICODE_STRING
name
;
RECT
rect
;
HWND
hwnd
=
FindWindowW
(
trayW
,
NULL
);
HWND
hwnd
;
RtlInitUnicodeString
(
&
name
,
trayW
);
hwnd
=
NtUserFindWindowEx
(
0
,
0
,
&
name
,
NULL
,
0
);
virtual_screen_rect
.
right
=
width
;
virtual_screen_rect
.
bottom
=
height
;
monitor_rc_work
=
virtual_screen_rect
;
if
(
!
hwnd
||
!
IsWindowVisible
(
hwnd
))
return
;
if
(
!
GetWindowRect
(
hwnd
,
&
rect
))
return
;
if
(
!
hwnd
||
!
NtUser
IsWindowVisible
(
hwnd
))
return
;
if
(
!
NtUser
GetWindowRect
(
hwnd
,
&
rect
))
return
;
if
(
rect
.
top
)
monitor_rc_work
.
bottom
=
rect
.
top
;
else
monitor_rc_work
.
top
=
rect
.
bottom
;
TRACE
(
"found tray %p %s work area %s
\n
"
,
hwnd
,
...
...
@@ -170,7 +174,7 @@ static void fetch_display_metrics(void)
SERVER_START_REQ
(
get_window_rectangles
)
{
req
->
handle
=
wine_server_user_handle
(
GetDesktopWindow
()
);
req
->
handle
=
wine_server_user_handle
(
NtUser
GetDesktopWindow
()
);
req
->
relative
=
COORDS_CLIENT
;
if
(
!
wine_server_call
(
req
))
{
...
...
dlls/wineandroid.drv/opengl.c
View file @
86612073
...
...
@@ -180,7 +180,7 @@ static BOOL refresh_context( struct wgl_context *ctx )
{
TRACE
(
"refreshing hwnd %p context %p surface %p
\n
"
,
ctx
->
hwnd
,
ctx
->
context
,
ctx
->
surface
);
p_eglMakeCurrent
(
display
,
ctx
->
surface
,
ctx
->
surface
,
ctx
->
context
);
RedrawWindow
(
ctx
->
hwnd
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
);
NtUser
RedrawWindow
(
ctx
->
hwnd
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
);
}
return
ret
;
}
...
...
@@ -207,17 +207,17 @@ void update_gl_drawable( HWND hwnd )
}
}
release_gl_drawable
(
gl
);
RedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
);
NtUser
RedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
);
}
}
static
BOOL
set_pixel_format
(
HDC
hdc
,
int
format
,
BOOL
allow_change
)
{
struct
gl_drawable
*
gl
;
HWND
hwnd
=
WindowFromDC
(
hdc
);
HWND
hwnd
=
NtUser
WindowFromDC
(
hdc
);
int
prev
=
0
;
if
(
!
hwnd
||
hwnd
==
GetDesktopWindow
())
if
(
!
hwnd
||
hwnd
==
NtUser
GetDesktopWindow
())
{
WARN
(
"not a proper window DC %p/%p
\n
"
,
hdc
,
hwnd
);
return
FALSE
;
...
...
@@ -255,7 +255,7 @@ static struct wgl_context *create_context( HDC hdc, struct wgl_context *share, c
struct
gl_drawable
*
gl
;
struct
wgl_context
*
ctx
;
if
(
!
(
gl
=
get_gl_drawable
(
WindowFromDC
(
hdc
),
hdc
)))
return
NULL
;
if
(
!
(
gl
=
get_gl_drawable
(
NtUser
WindowFromDC
(
hdc
),
hdc
)))
return
NULL
;
ctx
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
ctx
)
);
...
...
@@ -348,10 +348,10 @@ static BOOL android_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct
return
TRUE
;
}
draw_hwnd
=
WindowFromDC
(
draw_hdc
);
draw_hwnd
=
NtUser
WindowFromDC
(
draw_hdc
);
if
((
draw_gl
=
get_gl_drawable
(
draw_hwnd
,
draw_hdc
)))
{
read_gl
=
get_gl_drawable
(
WindowFromDC
(
read_hdc
),
read_hdc
);
read_gl
=
get_gl_drawable
(
NtUser
WindowFromDC
(
read_hdc
),
read_hdc
);
draw_surface
=
draw_gl
->
surface
?
draw_gl
->
surface
:
draw_gl
->
pbuffer
;
read_surface
=
read_gl
->
surface
?
read_gl
->
surface
:
read_gl
->
pbuffer
;
TRACE
(
"%p/%p context %p surface %p/%p
\n
"
,
...
...
@@ -500,7 +500,7 @@ static int WINAPI android_wglGetPixelFormat( HDC hdc )
struct
gl_drawable
*
gl
;
int
ret
=
0
;
if
((
gl
=
get_gl_drawable
(
WindowFromDC
(
hdc
),
hdc
)))
if
((
gl
=
get_gl_drawable
(
NtUser
WindowFromDC
(
hdc
),
hdc
)))
{
ret
=
gl
->
format
;
/* offscreen formats can't be used with traditional WGL calls */
...
...
@@ -540,7 +540,7 @@ static BOOL WINAPI android_wglMakeCurrent( HDC hdc, struct wgl_context *ctx )
return
TRUE
;
}
hwnd
=
WindowFromDC
(
hdc
);
hwnd
=
NtUser
WindowFromDC
(
hdc
);
if
((
gl
=
get_gl_drawable
(
hwnd
,
hdc
)))
{
EGLSurface
surface
=
gl
->
surface
?
gl
->
surface
:
gl
->
pbuffer
;
...
...
dlls/wineandroid.drv/window.c
View file @
86612073
...
...
@@ -99,19 +99,22 @@ static inline int get_dib_image_size( const BITMAPINFO *info )
*
abs
(
info
->
bmiHeader
.
biHeight
);
}
static
BOOL
intersect_rect
(
RECT
*
dst
,
const
RECT
*
src1
,
const
RECT
*
src2
)
{
dst
->
left
=
max
(
src1
->
left
,
src2
->
left
);
dst
->
top
=
max
(
src1
->
top
,
src2
->
top
);
dst
->
right
=
min
(
src1
->
right
,
src2
->
right
);
dst
->
bottom
=
min
(
src1
->
bottom
,
src2
->
bottom
);
return
!
IsRectEmpty
(
dst
);
}
/**********************************************************************
* get_win_monitor_dpi
*/
static
UINT
get_win_monitor_dpi
(
HWND
hwnd
)
{
DPI_AWARENESS_CONTEXT
context
;
UINT
ret
;
context
=
SetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
);
ret
=
GetDpiForSystem
();
/* FIXME: get monitor dpi */
SetThreadDpiAwarenessContext
(
context
);
return
ret
;
return
NtUserGetSystemDpiForProcess
(
NULL
);
/* FIXME: get monitor dpi */
}
...
...
@@ -126,7 +129,7 @@ static struct android_win_data *alloc_win_data( HWND hwnd )
{
data
->
hwnd
=
hwnd
;
data
->
window
=
create_ioctl_window
(
hwnd
,
FALSE
,
(
float
)
get_win_monitor_dpi
(
hwnd
)
/
GetDpiForWindow
(
hwnd
));
(
float
)
get_win_monitor_dpi
(
hwnd
)
/
NtUser
GetDpiForWindow
(
hwnd
));
EnterCriticalSection
(
&
win_data_section
);
win_data_context
[
context_idx
(
hwnd
)]
=
data
;
}
...
...
@@ -466,8 +469,8 @@ static int process_events( DWORD mask )
screen_width
=
event
->
data
.
desktop
.
width
;
screen_height
=
event
->
data
.
desktop
.
height
;
init_monitors
(
screen_width
,
screen_height
);
SetWindowPos
(
GetDesktopWindow
(),
0
,
0
,
0
,
screen_width
,
screen_height
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_NOREDRAW
);
NtUserSetWindowPos
(
NtUser
GetDesktopWindow
(),
0
,
0
,
0
,
screen_width
,
screen_height
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_NOREDRAW
);
SetThreadDpiAwarenessContext
(
context
);
break
;
...
...
@@ -728,7 +731,7 @@ static void android_surface_flush( struct window_surface *window_surface )
window_surface
->
funcs
->
lock
(
window_surface
);
SetRect
(
&
rect
,
0
,
0
,
surface
->
header
.
rect
.
right
-
surface
->
header
.
rect
.
left
,
surface
->
header
.
rect
.
bottom
-
surface
->
header
.
rect
.
top
);
needs_flush
=
IntersectR
ect
(
&
rect
,
&
rect
,
&
surface
->
bounds
);
needs_flush
=
intersect_r
ect
(
&
rect
,
&
rect
,
&
surface
->
bounds
);
reset_bounds
(
&
surface
->
bounds
);
window_surface
->
funcs
->
unlock
(
window_surface
);
if
(
!
needs_flush
)
return
;
...
...
@@ -753,7 +756,7 @@ static void android_surface_flush( struct window_surface *window_surface )
rect
.
top
=
rc
.
top
;
rect
.
right
=
rc
.
right
;
rect
.
bottom
=
rc
.
bottom
;
IntersectR
ect
(
&
rect
,
&
rect
,
&
surface
->
header
.
rect
);
intersect_r
ect
(
&
rect
,
&
rect
,
&
surface
->
header
.
rect
);
if
(
surface
->
region_data
)
{
...
...
@@ -874,7 +877,7 @@ static void set_surface_region( struct window_surface *window_surface, HRGN win_
{
region
=
NtGdiCreateRectRgn
(
0
,
0
,
win_data
->
window_rect
.
right
-
win_data
->
window_rect
.
left
,
win_data
->
window_rect
.
bottom
-
win_data
->
window_rect
.
top
);
if
(
GetWindowRgn
(
surface
->
hwnd
,
region
)
==
ERROR
&&
!
surface
->
region
)
goto
done
;
if
(
NtUserGetWindowRgnEx
(
surface
->
hwnd
,
region
,
0
)
==
ERROR
&&
!
surface
->
region
)
goto
done
;
}
NtGdiOffsetRgn
(
region
,
offset_x
,
offset_y
);
...
...
@@ -1222,7 +1225,7 @@ BOOL ANDROID_CreateWindow( HWND hwnd )
{
TRACE
(
"%p
\n
"
,
hwnd
);
if
(
hwnd
==
GetDesktopWindow
())
if
(
hwnd
==
NtUser
GetDesktopWindow
())
{
struct
android_win_data
*
data
;
...
...
@@ -1262,11 +1265,11 @@ static struct android_win_data *create_win_data( HWND hwnd, const RECT *window_r
struct
android_win_data
*
data
;
HWND
parent
;
if
(
!
(
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
)))
return
NULL
;
/* desktop or HWND_MESSAGE */
if
(
!
(
parent
=
NtUser
GetAncestor
(
hwnd
,
GA_PARENT
)))
return
NULL
;
/* desktop or HWND_MESSAGE */
if
(
!
(
data
=
alloc_win_data
(
hwnd
)))
return
NULL
;
data
->
parent
=
(
parent
==
GetDesktopWindow
())
?
0
:
parent
;
data
->
parent
=
(
parent
==
NtUser
GetDesktopWindow
())
?
0
:
parent
;
data
->
whole_rect
=
data
->
window_rect
=
*
window_rect
;
data
->
client_rect
=
*
client_rect
;
return
data
;
...
...
@@ -1275,7 +1278,7 @@ static struct android_win_data *create_win_data( HWND hwnd, const RECT *window_r
static
inline
BOOL
get_surface_rect
(
const
RECT
*
visible_rect
,
RECT
*
surface_rect
)
{
if
(
!
IntersectR
ect
(
surface_rect
,
visible_rect
,
&
virtual_screen_rect
))
return
FALSE
;
if
(
!
intersect_r
ect
(
surface_rect
,
visible_rect
,
&
virtual_screen_rect
))
return
FALSE
;
OffsetRect
(
surface_rect
,
-
visible_rect
->
left
,
-
visible_rect
->
top
);
surface_rect
->
left
&=
~
31
;
surface_rect
->
top
&=
~
31
;
...
...
@@ -1297,11 +1300,11 @@ BOOL ANDROID_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
DWORD
flags
;
COLORREF
key
;
BYTE
alpha
;
BOOL
layered
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_LAYERED
;
BOOL
layered
=
NtUser
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_LAYERED
;
TRACE
(
"win %p window %s client %s style %08x flags %08x
\n
"
,
hwnd
,
wine_dbgstr_rect
(
window_rect
),
wine_dbgstr_rect
(
client_rect
),
GetWindowLongW
(
hwnd
,
GWL_STYLE
),
swp_flags
);
NtUser
GetWindowLongW
(
hwnd
,
GWL_STYLE
),
swp_flags
);
if
(
!
data
&&
!
(
data
=
create_win_data
(
hwnd
,
window_rect
,
client_rect
)))
return
TRUE
;
...
...
@@ -1325,9 +1328,10 @@ BOOL ANDROID_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
goto
done
;
}
}
if
(
!
(
swp_flags
&
SWP_SHOWWINDOW
)
&&
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
))
goto
done
;
if
(
!
(
swp_flags
&
SWP_SHOWWINDOW
)
&&
!
(
NtUserGetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
))
goto
done
;
if
(
!
layered
||
!
GetLayeredWindowAttributes
(
hwnd
,
&
key
,
&
alpha
,
&
flags
))
flags
=
0
;
if
(
!
layered
||
!
NtUser
GetLayeredWindowAttributes
(
hwnd
,
&
key
,
&
alpha
,
&
flags
))
flags
=
0
;
if
(
!
(
flags
&
LWA_ALPHA
))
alpha
=
255
;
if
(
!
(
flags
&
LWA_COLORKEY
))
key
=
CLR_INVALID
;
...
...
@@ -1349,7 +1353,7 @@ void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
struct
window_surface
*
surface
)
{
struct
android_win_data
*
data
;
DWORD
new_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
DWORD
new_style
=
NtUser
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
HWND
owner
=
0
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
;
...
...
@@ -1364,10 +1368,10 @@ void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
if
(
data
->
surface
)
window_surface_release
(
data
->
surface
);
data
->
surface
=
surface
;
}
if
(
!
data
->
parent
)
owner
=
GetWindow
(
hwnd
,
GW_OWNER
);
if
(
!
data
->
parent
)
owner
=
NtUserGetWindowRelative
(
hwnd
,
GW_OWNER
);
release_win_data
(
data
);
if
(
!
(
swp_flags
&
SWP_NOZORDER
))
insert_after
=
GetWindow
(
hwnd
,
GW_HWNDPREV
);
if
(
!
(
swp_flags
&
SWP_NOZORDER
))
insert_after
=
NtUserGetWindowRelative
(
hwnd
,
GW_HWNDPREV
);
TRACE
(
"win %p window %s client %s style %08x owner %p after %p flags %08x
\n
"
,
hwnd
,
wine_dbgstr_rect
(
window_rect
),
wine_dbgstr_rect
(
client_rect
),
...
...
@@ -1383,7 +1387,7 @@ void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
*/
UINT
ANDROID_ShowWindow
(
HWND
hwnd
,
INT
cmd
,
RECT
*
rect
,
UINT
swp
)
{
if
(
!
IsIconic
(
hwnd
))
return
swp
;
if
(
!
(
NtUserGetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_MINIMIZE
))
return
swp
;
/* always hide icons off-screen */
if
(
rect
->
left
!=
-
32000
||
rect
->
top
!=
-
32000
)
{
...
...
@@ -1406,8 +1410,8 @@ void ANDROID_SetParent( HWND hwnd, HWND parent, HWND old_parent )
TRACE
(
"win %p parent %p -> %p
\n
"
,
hwnd
,
old_parent
,
parent
);
data
->
parent
=
(
parent
==
GetDesktopWindow
())
?
0
:
parent
;
ioctl_set_window_parent
(
hwnd
,
parent
,
(
float
)
get_win_monitor_dpi
(
hwnd
)
/
GetDpiForWindow
(
hwnd
));
data
->
parent
=
(
parent
==
NtUser
GetDesktopWindow
())
?
0
:
parent
;
ioctl_set_window_parent
(
hwnd
,
parent
,
(
float
)
get_win_monitor_dpi
(
hwnd
)
/
NtUser
GetDpiForWindow
(
hwnd
));
release_win_data
(
data
);
}
...
...
@@ -1422,6 +1426,28 @@ void ANDROID_SetCapture( HWND hwnd, UINT flags )
}
static
BOOL
get_icon_info
(
HICON
handle
,
ICONINFOEXW
*
ret
)
{
UNICODE_STRING
module
,
res_name
;
ICONINFO
info
;
module
.
Buffer
=
ret
->
szModName
;
module
.
MaximumLength
=
sizeof
(
ret
->
szModName
)
-
sizeof
(
WCHAR
);
res_name
.
Buffer
=
ret
->
szResName
;
res_name
.
MaximumLength
=
sizeof
(
ret
->
szResName
)
-
sizeof
(
WCHAR
);
if
(
!
NtUserGetIconInfo
(
handle
,
&
info
,
&
module
,
&
res_name
,
NULL
,
0
))
return
FALSE
;
ret
->
fIcon
=
info
.
fIcon
;
ret
->
xHotspot
=
info
.
xHotspot
;
ret
->
yHotspot
=
info
.
yHotspot
;
ret
->
hbmColor
=
info
.
hbmColor
;
ret
->
hbmMask
=
info
.
hbmMask
;
ret
->
wResID
=
res_name
.
Length
?
0
:
LOWORD
(
res_name
.
Buffer
);
ret
->
szModName
[
module
.
Length
]
=
0
;
ret
->
szResName
[
res_name
.
Length
]
=
0
;
return
TRUE
;
}
/***********************************************************************
* ANDROID_SetCursor
*/
...
...
@@ -1441,8 +1467,7 @@ void ANDROID_SetCursor( HCURSOR handle )
ICONINFOEXW
info
;
int
id
;
info
.
cbSize
=
sizeof
(
info
);
if
(
!
GetIconInfoExW
(
handle
,
&
info
))
return
;
if
(
!
get_icon_info
(
handle
,
&
info
))
return
;
if
(
!
(
id
=
get_cursor_system_id
(
&
info
)))
{
...
...
@@ -1475,7 +1500,7 @@ void ANDROID_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
struct
android_win_data
*
data
;
DWORD
changed
=
style
->
styleNew
^
style
->
styleOld
;
if
(
hwnd
==
GetDesktopWindow
())
return
;
if
(
hwnd
==
NtUser
GetDesktopWindow
())
return
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
;
if
(
offset
==
GWL_EXSTYLE
&&
(
changed
&
WS_EX_LAYERED
))
/* changing WS_EX_LAYERED resets attributes */
...
...
@@ -1585,7 +1610,7 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info
if
(
info
->
prcDirty
)
{
IntersectR
ect
(
&
rect
,
&
rect
,
info
->
prcDirty
);
intersect_r
ect
(
&
rect
,
&
rect
,
info
->
prcDirty
);
memcpy
(
src_bits
,
dst_bits
,
bmi
->
bmiHeader
.
biSizeImage
);
NtGdiPatBlt
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
BLACKNESS
);
}
...
...
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