mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-22 18:34:44 +00:00
wineandroid: Implement desktop window proc using driver interface.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
2887655bbc
commit
6b8b981199
|
@ -96,6 +96,7 @@ LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
|
|||
{
|
||||
case WM_NCCREATE:
|
||||
case WM_NCCALCSIZE:
|
||||
case WM_PARENTNOTIFY:
|
||||
return NtUserMessageCall( hwnd, message, wParam, lParam, 0, NtUserDesktopWindowProc, FALSE );
|
||||
|
||||
default:
|
||||
|
|
|
@ -88,6 +88,7 @@ extern void ANDROID_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN;
|
|||
extern NTSTATUS ANDROID_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
|
||||
const LARGE_INTEGER *timeout,
|
||||
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN;
|
||||
extern void ANDROID_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN;
|
||||
extern void ANDROID_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha,
|
||||
DWORD flags ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -343,6 +343,7 @@ static const struct user_driver_funcs android_drv_funcs =
|
|||
.pEnumDisplaySettingsEx = ANDROID_EnumDisplaySettingsEx,
|
||||
.pUpdateDisplayDevices = ANDROID_UpdateDisplayDevices,
|
||||
.pCreateWindow = ANDROID_CreateWindow,
|
||||
.pDesktopWindowProc = ANDROID_DesktopWindowProc,
|
||||
.pDestroyWindow = ANDROID_DestroyWindow,
|
||||
.pMsgWaitForMultipleObjectsEx = ANDROID_MsgWaitForMultipleObjectsEx,
|
||||
.pSetCapture = ANDROID_SetCapture,
|
||||
|
|
|
@ -1186,9 +1186,7 @@ static int get_cursor_system_id( const ICONINFOEXW *info )
|
|||
}
|
||||
|
||||
|
||||
static WNDPROC desktop_orig_wndproc;
|
||||
|
||||
static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
|
||||
LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
|
@ -1196,7 +1194,7 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp,
|
|||
if (LOWORD(wp) == WM_DESTROY) destroy_ioctl_window( (HWND)lp, FALSE );
|
||||
break;
|
||||
}
|
||||
return desktop_orig_wndproc( hwnd, msg, wp, lp );
|
||||
return NtUserMessageCall( hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1655,9 +1653,6 @@ LRESULT 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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue