Author: fireball Date: Fri Nov 26 23:13:42 2010 New Revision: 49802
URL: http://svn.reactos.org/svn/reactos?rev=49802&view=rev Log: - Sync up to Wine-1.3.8.
Modified: branches/arwinss/reactos/dll/win32/user32/ (props changed) branches/arwinss/reactos/dll/win32/user32/focus.c branches/arwinss/reactos/dll/win32/user32/message.c branches/arwinss/reactos/dll/win32/user32/painting.c branches/arwinss/reactos/dll/win32/user32/user32.spec branches/arwinss/reactos/dll/win32/user32/win.c branches/arwinss/reactos/dll/win32/winex11.drv/ (props changed) branches/arwinss/reactos/dll/win32/winex11.drv/event.c branches/arwinss/reactos/dll/win32/winex11.drv/window.c branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c
Propchange: branches/arwinss/reactos/dll/win32/user32/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Nov 26 23:13:42 2010 @@ -1,3 +1,3 @@ /branches/ros-amd64-bringup/reactos/dll/win32/user32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080 /trunk/reactos/dll/win32/user32:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678 -/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48147,48418,48677,49173,49721 +/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48147,48418,48677,49173,49721,49800
Modified: branches/arwinss/reactos/dll/win32/user32/focus.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/focus.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/focus.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -163,6 +163,7 @@ { GUITHREADINFO info;
+ info.cbSize = sizeof(info); GetGUIThreadInfo( GetCurrentThreadId(), &info ); /* Do not change focus if the window is no more active */ if (hwnd == info.hwndActive)
Modified: branches/arwinss/reactos/dll/win32/user32/message.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -2360,6 +2360,7 @@
/* find the window to dispatch this mouse message to */
+ info.cbSize = sizeof(info); GetGUIThreadInfo( GetCurrentThreadId(), &info ); if (info.hwndCapture) { @@ -4231,11 +4232,27 @@
/********************************************************************** + * IsGUIThread (USER32.@) + */ +BOOL WINAPI IsGUIThread( BOOL convert ) +{ + FIXME( "%u: stub\n", convert ); + return TRUE; +} + + +/********************************************************************** * GetGUIThreadInfo (USER32.@) */ BOOL WINAPI GetGUIThreadInfo( DWORD id, GUITHREADINFO *info ) { BOOL ret; + + if (info->cbSize != sizeof(*info)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + }
SERVER_START_REQ( get_thread_input ) {
Modified: branches/arwinss/reactos/dll/win32/user32/painting.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/painting.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/painting.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -802,6 +802,7 @@ RECT rect, mapped_rcCaret; BOOL hide_caret = FALSE;
+ info.cbSize = sizeof(info); if (!GetGUIThreadInfo( GetCurrentThreadId(), &info )) return 0; if (!info.hwndCaret) return 0;
Modified: branches/arwinss/reactos/dll/win32/user32/user32.spec URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/user32.spec [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/user32.spec [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -436,7 +436,7 @@ @ stdcall IsDialogMessageA(long ptr) @ stdcall IsDialogMessageW(long ptr) @ stdcall IsDlgButtonChecked(long long) -@ stub IsGUIThread +@ stdcall IsGUIThread(long) @ stdcall IsHungAppWindow(long) # @ stub IsHungThread @ stdcall IsIconic(long)
Modified: branches/arwinss/reactos/dll/win32/user32/win.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -1588,6 +1588,7 @@ { GUITHREADINFO info;
+ info.cbSize = sizeof(info); if (GetGUIThreadInfo( GetCurrentThreadId(), &info )) { if (hwnd == info.hwndCaret) DestroyCaret();
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Nov 26 23:13:42 2010 @@ -1,3 +1,3 @@ /branches/ros-amd64-bringup/reactos/dll/win32/winex11.drv:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080 /trunk/reactos/dll/win32/winex11.drv:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678 -/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46915,47274,47321,47798,47861,48147,48418,48677,49173,49721 +/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46915,47274,47321,47798,47861,48147,48418,48677,49173,49721,49800
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/event.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex1... ============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/event.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/event.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -498,6 +498,7 @@ TRACE( "setting foreground window to %p\n", hwnd ); SetForegroundWindow( hwnd );
+ threadinfo.cbSize = sizeof(threadinfo); GetGUIThreadInfo(0, &threadinfo); focus = threadinfo.hwndFocus; if (!focus) focus = threadinfo.hwndActive;
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/window.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex1... ============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -79,6 +79,7 @@ static Time last_user_time; static Window user_time_window;
+static const char foreign_window_prop[] = "__wine_x11_foreign_window"; static const char whole_window_prop[] = "__wine_x11_whole_window"; static const char client_window_prop[]= "__wine_x11_client_window"; static const char icon_window_prop[] = "__wine_x11_icon_window"; @@ -1754,7 +1755,23 @@ */ static void destroy_whole_window( Display *display, struct x11drv_win_data *data, BOOL already_destroyed ) { - if (!data->whole_window) return; + if (!data->whole_window) + { + if (data->embedded) + { + Window xwin = (Window)GetPropA( data->hwnd, foreign_window_prop ); + if (xwin) + { + wine_tsx11_lock(); + if (!already_destroyed) XSelectInput( display, xwin, 0 ); + XDeleteContext( display, xwin, winContext ); + wine_tsx11_unlock(); + RemovePropA( data->hwnd, foreign_window_prop ); + } + } + return; + } +
TRACE( "win %p xwin %lx/%lx\n", data->hwnd, data->whole_window, data->client_window ); wine_tsx11_lock(); @@ -1895,14 +1912,7 @@ if (!(data = X11DRV_get_win_data( hwnd ))) return; if (!data->embedded) FIXME( "window %p/%lx destroyed from the outside\n", hwnd, data->whole_window );
- if (!data->whole_window) - { - wine_tsx11_lock(); - XDeleteContext( display, event->xdestroywindow.window, winContext ); - wine_tsx11_unlock(); - } - else destroy_whole_window( display, data, TRUE ); - + destroy_whole_window( display, data, TRUE ); if (data->embedded) SendMessageW( hwnd, WM_CLOSE, 0, 0 ); }
@@ -2154,6 +2164,7 @@ data->embedded = TRUE; data->mapped = TRUE;
+ SetPropA( hwnd, foreign_window_prop, (HANDLE)xwin ); wine_tsx11_lock(); XSaveContext( display, xwin, winContext, (char *)data->hwnd ); wine_tsx11_unlock();
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex1... ============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c [iso-8859-1] Fri Nov 26 23:13:42 2010 @@ -198,7 +198,7 @@ */ static inline BOOL ignore_error( Display *display, XErrorEvent *event ) { - if (event->request_code == X_SetInputFocus && + if ((event->request_code == X_SetInputFocus || event->request_code == X_ChangeWindowAttributes) && (event->error_code == BadMatch || event->error_code == BadWindow)) return TRUE;
/* ignore a number of errors on gdi display caused by creating/destroying windows */