Alexandre Julliard : wineandroid: Notify Java also when a window is forcefully destroyed.
Alexandre Julliard
julliard at winehq.org
Thu Jun 1 18:49:37 CDT 2017
Module: wine
Branch: master
Commit: d05f4f586753cfd59261adef6b668bd75d8c35b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d05f4f586753cfd59261adef6b668bd75d8c35b5
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 1 09:44:26 2017 +0200
wineandroid: Notify Java also when a window is forcefully destroyed.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wineandroid.drv/window.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index d889c8d..61f76bf 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -305,6 +305,20 @@ static int wait_events( int timeout )
}
+static WNDPROC desktop_orig_wndproc;
+
+static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
+{
+ switch (msg)
+ {
+ case WM_PARENTNOTIFY:
+ if (LOWORD(wp) == WM_DESTROY) destroy_ioctl_window( (HWND)lp );
+ break;
+ }
+ return desktop_orig_wndproc( hwnd, msg, wp, lp );
+}
+
+
/***********************************************************************
* ANDROID_MsgWaitForMultipleObjectsEx
*/
@@ -334,7 +348,8 @@ 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 );
}
More information about the wine-cvs
mailing list