Commit 95c4516b authored by Alexandre Julliard's avatar Alexandre Julliard

wineandroid: Support creating a separate native window for OpenGL rendering in the client area.

parent 116f8d2e
......@@ -512,7 +512,7 @@ public class WineActivity extends Activity
wine_config_changed( getResources().getConfiguration().densityDpi );
}
public void create_window( int hwnd, int parent, int pid )
public void create_window( int hwnd, boolean opengl, int parent, int pid )
{
WineWindow win = get_window( hwnd );
if (win == null) win = new WineWindow( hwnd, get_window( parent ));
......@@ -544,9 +544,9 @@ public class WineActivity extends Activity
runOnUiThread( new Runnable() { public void run() { create_desktop_window( hwnd ); }} );
}
public void createWindow( final int hwnd, final int parent, final int pid )
public void createWindow( final int hwnd, final boolean opengl, final int parent, final int pid )
{
runOnUiThread( new Runnable() { public void run() { create_window( hwnd, parent, pid ); }} );
runOnUiThread( new Runnable() { public void run() { create_window( hwnd, opengl, parent, pid ); }} );
}
public void destroyWindow( final int hwnd )
......
......@@ -53,11 +53,11 @@ DECL_FUNCPTR( ANativeWindow_release );
*/
extern void start_android_device(void) DECLSPEC_HIDDEN;
extern void register_native_window( HWND hwnd, struct ANativeWindow *win ) DECLSPEC_HIDDEN;
extern struct ANativeWindow *create_ioctl_window( HWND hwnd ) DECLSPEC_HIDDEN;
extern void register_native_window( HWND hwnd, struct ANativeWindow *win, BOOL client ) DECLSPEC_HIDDEN;
extern struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl ) DECLSPEC_HIDDEN;
extern struct ANativeWindow *grab_ioctl_window( struct ANativeWindow *window ) DECLSPEC_HIDDEN;
extern void release_ioctl_window( struct ANativeWindow *window ) DECLSPEC_HIDDEN;
extern void destroy_ioctl_window( HWND hwnd ) DECLSPEC_HIDDEN;
extern void destroy_ioctl_window( HWND hwnd, BOOL opengl ) DECLSPEC_HIDDEN;
extern int ioctl_window_pos_changed( HWND hwnd, const RECT *window_rect, const RECT *client_rect,
const RECT *visible_rect, UINT style, UINT flags,
HWND after, HWND owner ) DECLSPEC_HIDDEN;
......
......@@ -113,7 +113,7 @@ static struct android_win_data *alloc_win_data( HWND hwnd )
if ((data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data))))
{
data->hwnd = hwnd;
data->window = create_ioctl_window( hwnd );
data->window = create_ioctl_window( hwnd, FALSE );
EnterCriticalSection( &win_data_section );
win_data_context[context_idx(hwnd)] = data;
}
......@@ -454,7 +454,7 @@ static int process_events( DWORD mask )
TRACE("SURFACE_CHANGED %p %p size %ux%u\n", event->data.surface.hwnd,
event->data.surface.window, event->data.surface.width, event->data.surface.height );
register_native_window( event->data.surface.hwnd, event->data.surface.window );
register_native_window( event->data.surface.hwnd, event->data.surface.window, FALSE );
break;
case MOTION_EVENT:
......@@ -945,7 +945,7 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp,
switch (msg)
{
case WM_PARENTNOTIFY:
if (LOWORD(wp) == WM_DESTROY) destroy_ioctl_window( (HWND)lp );
if (LOWORD(wp) == WM_DESTROY) destroy_ioctl_window( (HWND)lp, FALSE );
break;
}
return desktop_orig_wndproc( hwnd, msg, wp, lp );
......
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