Alexandre Julliard : wineandroid: Properly clean up windows that aren' t destroyed explicitly.
Alexandre Julliard
julliard at winehq.org
Thu Jun 8 15:54:56 CDT 2017
Module: wine
Branch: master
Commit: c339d7214c2a86592c01a3b4932d498acb237417
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c339d7214c2a86592c01a3b4932d498acb237417
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 8 10:08:15 2017 +0200
wineandroid: Properly clean up windows that aren't destroyed explicitly.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wineandroid.drv/WineActivity.java | 2 ++
dlls/wineandroid.drv/window.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wineandroid.drv/WineActivity.java b/dlls/wineandroid.drv/WineActivity.java
index f12de98..428e79c 100644
--- a/dlls/wineandroid.drv/WineActivity.java
+++ b/dlls/wineandroid.drv/WineActivity.java
@@ -314,7 +314,9 @@ public class WineActivity extends Activity
public void destroy()
{
Log.i( LOGTAG, String.format( "destroy hwnd %08x", hwnd ));
+ if (visible && window_view != null) top_view.removeView( window_view );
visible = false;
+ window_view = null;
win_map.remove( this );
}
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index e3fd865..a663505 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -828,8 +828,6 @@ BOOL CDECL ANDROID_CreateWindow( HWND hwnd )
init_event_queue();
start_android_device();
- desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( hwnd, GWLP_WNDPROC,
- (LONG_PTR)desktop_wndproc_wrapper );
if (!(data = alloc_win_data( hwnd ))) return FALSE;
release_win_data( data );
}
@@ -1214,6 +1212,9 @@ LRESULT CDECL ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
*/
BOOL CDECL ANDROID_create_desktop( UINT width, UINT height )
{
+ desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( GetDesktopWindow(), GWLP_WNDPROC,
+ (LONG_PTR)desktop_wndproc_wrapper );
+
/* wait until we receive the surface changed event */
while (!screen_width)
{
More information about the wine-cvs
mailing list