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
44ee3bf8
Commit
44ee3bf8
authored
Jul 13, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Hold on to the native window until we get a new one.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
83bed850
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
WineActivity.java
dlls/wineandroid.drv/WineActivity.java
+13
-3
device.c
dlls/wineandroid.drv/device.c
+2
-0
No files found.
dlls/wineandroid.drv/WineActivity.java
View file @
44ee3bf8
...
...
@@ -311,6 +311,8 @@ public class WineActivity extends Activity
protected
WineWindow
parent
;
protected
Surface
window_surface
;
protected
Surface
client_surface
;
protected
SurfaceTexture
window_surftex
;
protected
SurfaceTexture
client_surftex
;
protected
WineWindowGroup
window_group
;
protected
WineWindowGroup
client_group
;
...
...
@@ -442,14 +444,22 @@ public class WineActivity extends Activity
if
(
is_client
)
{
if
(
surftex
==
null
)
client_surface
=
null
;
else
if
(
client_surface
==
null
)
client_surface
=
new
Surface
(
surftex
);
else
if
(
surftex
!=
client_surftex
)
{
client_surftex
=
surftex
;
client_surface
=
new
Surface
(
surftex
);
}
Log
.
i
(
LOGTAG
,
String
.
format
(
"set client surface hwnd %08x %s"
,
hwnd
,
client_surface
));
wine_surface_changed
(
hwnd
,
client_surface
,
true
);
}
else
{
if
(
surftex
==
null
)
window_surface
=
null
;
else
if
(
window_surface
==
null
)
window_surface
=
new
Surface
(
surftex
);
else
if
(
surftex
!=
window_surftex
)
{
window_surftex
=
surftex
;
window_surface
=
new
Surface
(
surftex
);
}
Log
.
i
(
LOGTAG
,
String
.
format
(
"set window surface hwnd %08x %s"
,
hwnd
,
window_surface
));
wine_surface_changed
(
hwnd
,
window_surface
,
false
);
}
...
...
@@ -567,7 +577,7 @@ public class WineActivity extends Activity
Log
.
i
(
LOGTAG
,
String
.
format
(
"onSurfaceTextureDestroyed win %08x %s"
,
window
.
hwnd
,
is_client
?
"client"
:
"whole"
));
window
.
set_surface
(
null
,
is_client
);
return
true
;
return
false
;
// hold on to the texture since the app may still be using it
}
public
void
onSurfaceTextureUpdated
(
SurfaceTexture
surftex
)
...
...
dlls/wineandroid.drv/device.c
View file @
44ee3bf8
...
...
@@ -463,6 +463,8 @@ static void CALLBACK register_native_window_callback( ULONG_PTR arg1, ULONG_PTR
BOOL
opengl
=
arg3
;
struct
native_win_data
*
data
=
get_native_win_data
(
hwnd
,
opengl
);
if
(
!
win
)
return
;
/* do nothing and hold on to the window until we get a new surface */
if
(
!
data
||
data
->
parent
==
win
)
{
if
(
win
)
pANativeWindow_release
(
win
);
...
...
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