Commit c339d721 authored by Alexandre Julliard's avatar Alexandre Julliard

wineandroid: Properly clean up windows that aren't destroyed explicitly.

parent e6fdea72
......@@ -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 );
}
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment