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
f39e0210
Commit
f39e0210
authored
Jun 22, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Also create HWND_MESSAGE windows on the Java side.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd2b41a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
28 deletions
+16
-28
WineActivity.java
dlls/wineandroid.drv/WineActivity.java
+5
-0
device.c
dlls/wineandroid.drv/device.c
+9
-3
window.c
dlls/wineandroid.drv/window.c
+2
-25
No files found.
dlls/wineandroid.drv/WineActivity.java
View file @
f39e0210
...
...
@@ -62,6 +62,7 @@ public class WineActivity extends Activity
private
ProgressDialog
progress_dialog
;
protected
WineWindow
desktop_window
;
protected
WineWindow
message_window
;
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
...
...
@@ -290,6 +291,7 @@ public class WineActivity extends Activity
protected
class
WineWindow
extends
Object
{
static
protected
final
int
HWND_MESSAGE
=
0xfffffffd
;
static
protected
final
int
WS_VISIBLE
=
0x10000000
;
protected
int
hwnd
;
...
...
@@ -617,6 +619,9 @@ public class WineActivity extends Activity
desktop_window
=
new
WineWindow
(
hwnd
,
null
);
addView
(
desktop_window
.
create_whole_view
()
);
desktop_window
.
client_group
.
bringToFront
();
message_window
=
new
WineWindow
(
WineWindow
.
HWND_MESSAGE
,
null
);
message_window
.
create_window_groups
();
}
@Override
...
...
dlls/wineandroid.drv/device.c
View file @
f39e0210
...
...
@@ -251,6 +251,13 @@ static struct native_win_data *get_ioctl_native_win_data( const struct ioctl_hea
return
get_native_win_data
(
LongToHandle
(
hdr
->
hwnd
),
hdr
->
opengl
);
}
static
int
get_ioctl_win_parent
(
HWND
parent
)
{
if
(
parent
!=
GetDesktopWindow
()
&&
!
GetAncestor
(
parent
,
GA_PARENT
))
return
HandleToLong
(
HWND_MESSAGE
);
return
HandleToLong
(
parent
);
}
static
void
wait_fence_and_close
(
int
fence
)
{
__s32
timeout
=
1000
;
/* FIXME: should be -1 for infinite timeout */
...
...
@@ -1353,7 +1360,6 @@ struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl )
{
struct
ioctl_android_create_window
req
;
struct
native_win_wrapper
*
win
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
win
)
);
HWND
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
if
(
!
win
)
return
NULL
;
...
...
@@ -1378,7 +1384,7 @@ struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl )
req
.
hdr
.
hwnd
=
HandleToLong
(
win
->
hwnd
);
req
.
hdr
.
opengl
=
win
->
opengl
;
req
.
parent
=
HandleToLong
(
parent
);
req
.
parent
=
get_ioctl_win_parent
(
GetAncestor
(
hwnd
,
GA_PARENT
)
);
android_ioctl
(
IOCTL_CREATE_WINDOW
,
&
req
,
sizeof
(
req
),
NULL
,
NULL
);
return
&
win
->
win
;
...
...
@@ -1438,7 +1444,7 @@ int ioctl_set_window_parent( HWND hwnd, HWND parent )
req
.
hdr
.
hwnd
=
HandleToLong
(
hwnd
);
req
.
hdr
.
opengl
=
FALSE
;
req
.
parent
=
HandleToLong
(
parent
);
req
.
parent
=
get_ioctl_win_parent
(
parent
);
return
android_ioctl
(
IOCTL_SET_WINDOW_PARENT
,
&
req
,
sizeof
(
req
),
NULL
,
NULL
);
}
...
...
dlls/wineandroid.drv/window.c
View file @
f39e0210
...
...
@@ -1018,34 +1018,11 @@ static struct android_win_data *create_win_data( HWND hwnd, const RECT *window_r
if
(
!
(
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
)))
return
NULL
;
/* desktop or HWND_MESSAGE */
if
(
parent
!=
GetDesktopWindow
())
{
if
(
!
(
data
=
get_win_data
(
parent
))
&&
!
(
data
=
create_win_data
(
parent
,
NULL
,
NULL
)))
return
NULL
;
release_win_data
(
data
);
}
if
(
!
(
data
=
alloc_win_data
(
hwnd
)))
return
NULL
;
data
->
parent
=
(
parent
==
GetDesktopWindow
())
?
0
:
parent
;
if
(
window_rect
)
{
data
->
whole_rect
=
data
->
window_rect
=
*
window_rect
;
data
->
client_rect
=
*
client_rect
;
}
else
{
GetWindowRect
(
hwnd
,
&
data
->
window_rect
);
MapWindowPoints
(
0
,
parent
,
(
POINT
*
)
&
data
->
window_rect
,
2
);
data
->
whole_rect
=
data
->
window_rect
;
GetClientRect
(
hwnd
,
&
data
->
client_rect
);
MapWindowPoints
(
hwnd
,
parent
,
(
POINT
*
)
&
data
->
client_rect
,
2
);
ioctl_window_pos_changed
(
hwnd
,
&
data
->
window_rect
,
&
data
->
client_rect
,
&
data
->
whole_rect
,
GetWindowLongW
(
hwnd
,
GWL_STYLE
),
SWP_NOACTIVATE
,
GetWindow
(
hwnd
,
GW_HWNDPREV
),
GetWindow
(
hwnd
,
GW_OWNER
));
}
data
->
whole_rect
=
data
->
window_rect
=
*
window_rect
;
data
->
client_rect
=
*
client_rect
;
return
data
;
}
...
...
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