Author: fireball Date: Sun Mar 21 20:14:19 2010 New Revision: 46314 URL: http://svn.reactos.org/svn/reactos?rev=46314&view=rev Log: [VENDOR/WINE] - Import Wine-1.1.41 gdi32, user32, winex11.drv, wineserver.
Modified: vendor/wine/dlls/gdi32/current/Makefile.in vendor/wine/dlls/gdi32/current/bitmap.c vendor/wine/dlls/gdi32/current/tests/Makefile.in vendor/wine/dlls/user32/current/Makefile.in vendor/wine/dlls/user32/current/cursoricon.c vendor/wine/dlls/user32/current/input.c vendor/wine/dlls/user32/current/tests/Makefile.in vendor/wine/dlls/user32/current/tests/cursoricon.c vendor/wine/dlls/user32/current/tests/win.c vendor/wine/dlls/winex11.drv/current/Makefile.in vendor/wine/dlls/winex11.drv/current/clipboard.c vendor/wine/dlls/winex11.drv/current/opengl.c vendor/wine/dlls/winex11.drv/current/window.c vendor/wine/server/current/Makefile.in vendor/wine/server/current/debugger.c vendor/wine/server/current/process.c vendor/wine/server/current/protocol.def vendor/wine/server/current/request.h vendor/wine/server/current/sock.c vendor/wine/server/current/trace.c Modified: vendor/wine/dlls/gdi32/current/Makefile.in URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/Makefile.in?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/gdi32/current/Makefile.in [iso-8859-1] (original) +++ vendor/wine/dlls/gdi32/current/Makefile.in [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -53,5 +53,3 @@ mfdrv @MAKE_DLL_RULES@ - -...@dependencies@ # everything below this line is overwritten by make depend Modified: vendor/wine/dlls/gdi32/current/bitmap.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/bitmap.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/gdi32/current/bitmap.c [iso-8859-1] (original) +++ vendor/wine/dlls/gdi32/current/bitmap.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -436,11 +436,13 @@ LONG count, /* [in] Number of bytes in bitmap array */ LPCVOID bits) /* [in] Address of array with bitmap bits */ { - BITMAPOBJ *bmp = GDI_GetObjPtr( hbitmap, OBJ_BITMAP ); + BITMAPOBJ *bmp; LONG height, ret; - if ((!bmp) || (!bits)) - return 0; + if (!bits) return 0; + + bmp = GDI_GetObjPtr( hbitmap, OBJ_BITMAP ); + if (!bmp) return 0; if (count < 0) { WARN("(%d): Negative number of bytes passed???\n", count ); Modified: vendor/wine/dlls/gdi32/current/tests/Makefile.in URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/tests/Makefile.in?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/gdi32/current/tests/Makefile.in [iso-8859-1] (original) +++ vendor/wine/dlls/gdi32/current/tests/Makefile.in [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -21,5 +21,3 @@ pen.c @MAKE_TEST_RULES@ - -...@dependencies@ # everything below this line is overwritten by make depend Modified: vendor/wine/dlls/user32/current/Makefile.in URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/Makefile.in?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/user32/current/Makefile.in [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/Makefile.in [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -91,5 +91,3 @@ EXTRASUBDIRS = resources @MAKE_DLL_RULES@ - -...@dependencies@ # everything below this line is overwritten by make depend Modified: vendor/wine/dlls/user32/current/cursoricon.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/cursoricon.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/user32/current/cursoricon.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/cursoricon.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -765,6 +765,7 @@ int sizeAnd, sizeXor; HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */ BITMAP bmpXor, bmpAnd; + BOOL do_stretch; INT size; BITMAPINFO *pSrcInfo, *pDestInfo; @@ -788,10 +789,11 @@ if (!width) width = bmi->bmiHeader.biWidth; if (!height) height = bmi->bmiHeader.biHeight/2; + do_stretch = (bmi->bmiHeader.biHeight/2 != height) || + (bmi->bmiHeader.biWidth != width); /* Scale the hotspot */ - if (((bmi->bmiHeader.biHeight/2 != height) || (bmi->bmiHeader.biWidth != width)) && - hotspot.x != ICON_HOTSPOT && hotspot.y != ICON_HOTSPOT) + if (do_stretch && hotspot.x != ICON_HOTSPOT && hotspot.y != ICON_HOTSPOT) { hotspot.x = (hotspot.x * width) / bmi->bmiHeader.biWidth; hotspot.y = (hotspot.y * height) / (bmi->bmiHeader.biHeight / 2); @@ -842,15 +844,29 @@ } else { - hXorBits = CreateCompatibleBitmap(screen_dc, width, height); - - if(hXorBits) + if (do_stretch) { - if(!stretch_blt_icon(hXorBits, pDestInfo, pSrcInfo, (char*)bmi + size)) + hXorBits = CreateCompatibleBitmap(screen_dc, width, height); + if (hXorBits) { - DeleteObject(hXorBits); - hXorBits = 0; + if (!stretch_blt_icon(hXorBits, pDestInfo, pSrcInfo, (char*)bmi + size)) + { + DeleteObject(hXorBits); + hXorBits = 0; + } } + } + else + { + if (is_dib_monochrome(bmi)) + { + hXorBits = CreateBitmap(width, height, 1, 1, NULL); + SetDIBits(screen_dc, hXorBits, 0, height, + (char *)bmi + size, pSrcInfo, DIB_RGB_COLORS); + } + else + hXorBits = CreateDIBitmap(screen_dc, &pSrcInfo->bmiHeader, + CBM_INIT, (char *)bmi + size, pSrcInfo, DIB_RGB_COLORS); } } @@ -879,12 +895,21 @@ } /* Create the AND bitmap */ - hAndBits = CreateBitmap(width, height, 1, 1, NULL); - - if(!stretch_blt_icon(hAndBits, pDestInfo, pSrcInfo, xbits)) + if (do_stretch) { - DeleteObject(hAndBits); - hAndBits = 0; + hAndBits = CreateBitmap(width, height, 1, 1, NULL); + + if (!stretch_blt_icon(hAndBits, pDestInfo, pSrcInfo, xbits)) + { + DeleteObject(hAndBits); + hAndBits = 0; + } + } + else + { + hAndBits = CreateBitmap(width, height, 1, 1, NULL); + SetDIBits(screen_dc, hAndBits, 0, height, + xbits, pSrcInfo, DIB_RGB_COLORS); } if( !hAndBits ) Modified: vendor/wine/dlls/user32/current/input.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/input.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/user32/current/input.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/input.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -208,8 +208,8 @@ BOOL WINAPI GetCursorInfo( PCURSORINFO pci ) { if (!pci) return 0; - if (get_user_thread_info()->cursor_count >= 0) pci->flags = CURSOR_SHOWING; - else pci->flags = 0; + pci->hCursor = LoadCursorW( 0, (LPCWSTR)IDC_ARROW ); + pci->flags = CURSOR_SHOWING; GetCursorPos(&pci->ptScreenPos); return 1; } Modified: vendor/wine/dlls/user32/current/tests/Makefile.in URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/tests/Makefile.in?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/user32/current/tests/Makefile.in [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/tests/Makefile.in [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -34,5 +34,3 @@ RC_SRCS = resource.rc @MAKE_TEST_RULES@ - -...@dependencies@ # everything below this line is overwritten by make depend Modified: vendor/wine/dlls/user32/current/tests/cursoricon.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/tests/cursoricon.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/user32/current/tests/cursoricon.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/tests/cursoricon.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -64,6 +64,8 @@ #define PROC_INIT (WM_USER+1) +static BOOL (WINAPI *pGetCursorInfo)(CURSORINFO *); + static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { BOOL ret; @@ -1353,6 +1355,250 @@ DeleteDC(hdcDst); } +static DWORD parent_id; + +static DWORD CALLBACK set_cursor_thread( void *arg ) +{ + HCURSOR ret; + + PeekMessage( 0, 0, 0, 0, PM_NOREMOVE ); /* create a msg queue */ + if (parent_id) + { + BOOL ret = AttachThreadInput( GetCurrentThreadId(), parent_id, TRUE ); + ok( ret, "AttachThreadInput failed\n" ); + } + if (arg) ret = SetCursor( (HCURSOR)arg ); + else ret = GetCursor(); + return (DWORD_PTR)ret; +} + +static void test_SetCursor(void) +{ + static const BYTE bmp_bits[4096]; + ICONINFO cursorInfo; + HCURSOR cursor, old_cursor, global_cursor = 0; + DWORD error, id, result; + UINT display_bpp; + HDC hdc; + HANDLE thread; + CURSORINFO info; + + if (pGetCursorInfo) + { + memset( &info, 0, sizeof(info) ); + info.cbSize = sizeof(info); + if (!pGetCursorInfo( &info )) + { + win_skip( "GetCursorInfo not working\n" ); + pGetCursorInfo = NULL; + } + else global_cursor = info.hCursor; + } + cursor = GetCursor(); + thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)cursor, "wrong thread cursor %x/%p\n", result, cursor ); + + hdc = GetDC(0); + display_bpp = GetDeviceCaps(hdc, BITSPIXEL); + ReleaseDC(0, hdc); + + cursorInfo.fIcon = FALSE; + cursorInfo.xHotspot = 0; + cursorInfo.yHotspot = 0; + cursorInfo.hbmMask = CreateBitmap(32, 32, 1, 1, bmp_bits); + cursorInfo.hbmColor = CreateBitmap(32, 32, 1, display_bpp, bmp_bits); + + cursor = CreateIconIndirect(&cursorInfo); + ok(cursor != NULL, "CreateIconIndirect returned %p\n", cursor); + old_cursor = SetCursor( cursor ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + /* global cursor doesn't change since we don't have a window */ + ok( info.hCursor == global_cursor || broken(info.hCursor != cursor), /* win9x */ + "wrong info cursor %p/%p\n", info.hCursor, global_cursor ); + } + thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + + SetCursor( 0 ); + ok( GetCursor() == 0, "wrong cursor %p\n", GetCursor() ); + thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + + thread = CreateThread( NULL, 0, set_cursor_thread, cursor, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + ok( GetCursor() == 0, "wrong cursor %p/0\n", GetCursor() ); + + parent_id = GetCurrentThreadId(); + thread = CreateThread( NULL, 0, set_cursor_thread, cursor, 0, &id ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + todo_wine ok( GetCursor() == cursor, "wrong cursor %p/0\n", cursor ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.hCursor == global_cursor || broken(info.hCursor != cursor), /* win9x */ + "wrong info cursor %p/%p\n", info.hCursor, global_cursor ); + } + SetCursor( old_cursor ); + DestroyCursor( cursor ); + + SetLastError( 0xdeadbeef ); + cursor = SetCursor( (HCURSOR)0xbadbad ); + error = GetLastError(); + ok( cursor == 0, "wrong cursor %p/0\n", cursor ); + todo_wine ok( error == ERROR_INVALID_CURSOR_HANDLE || broken( error == 0xdeadbeef ), /* win9x */ + "wrong error %u\n", error ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.hCursor == global_cursor || broken(info.hCursor != cursor), /* win9x */ + "wrong info cursor %p/%p\n", info.hCursor, global_cursor ); + } +} + +static HANDLE event_start, event_next; + +static DWORD CALLBACK show_cursor_thread( void *arg ) +{ + DWORD count = (DWORD_PTR)arg; + int ret; + + PeekMessage( 0, 0, 0, 0, PM_NOREMOVE ); /* create a msg queue */ + if (parent_id) + { + BOOL ret = AttachThreadInput( GetCurrentThreadId(), parent_id, TRUE ); + ok( ret, "AttachThreadInput failed\n" ); + } + if (!count) ret = ShowCursor( FALSE ); + else while (count--) ret = ShowCursor( TRUE ); + SetEvent( event_start ); + WaitForSingleObject( event_next, 2000 ); + return ret; +} + +static void test_ShowCursor(void) +{ + int count; + DWORD id, result; + HANDLE thread; + CURSORINFO info; + + if (pGetCursorInfo) + { + memset( &info, 0, sizeof(info) ); + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } + + event_start = CreateEvent( NULL, FALSE, FALSE, NULL ); + event_next = CreateEvent( NULL, FALSE, FALSE, NULL ); + + count = ShowCursor( TRUE ); + ok( count == 1, "wrong count %d\n", count ); + count = ShowCursor( TRUE ); + ok( count == 2, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == 1, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == 0, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == -1, "wrong count %d\n", count ); + count = ShowCursor( FALSE ); + ok( count == -2, "wrong count %d\n", count ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + /* global show count is not affected since we don't have a window */ + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } + + parent_id = 0; + thread = CreateThread( NULL, 0, show_cursor_thread, NULL, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( FALSE ); + ok( count == -3, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == -1, "wrong thread count %d\n", result ); + count = ShowCursor( FALSE ); + ok( count == -4, "wrong count %d\n", count ); + + thread = CreateThread( NULL, 0, show_cursor_thread, (void *)1, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( TRUE ); + ok( count == -3, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + ok( result == 1, "wrong thread count %d\n", result ); + count = ShowCursor( TRUE ); + ok( count == -2, "wrong count %d\n", count ); + + parent_id = GetCurrentThreadId(); + thread = CreateThread( NULL, 0, show_cursor_thread, NULL, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( TRUE ); + todo_wine ok( count == -2, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + todo_wine ok( result == -3, "wrong thread count %d\n", result ); + count = ShowCursor( FALSE ); + ok( count == -2, "wrong count %d\n", count ); + + thread = CreateThread( NULL, 0, show_cursor_thread, (void *)3, 0, &id ); + WaitForSingleObject( event_start, 1000 ); + count = ShowCursor( TRUE ); + todo_wine ok( count == 2, "wrong count %d\n", count ); + SetEvent( event_next ); + WaitForSingleObject( thread, 1000 ); + GetExitCodeThread( thread, &result ); + todo_wine ok( result == 1, "wrong thread count %d\n", result ); + count = ShowCursor( FALSE ); + ok( count == -2, "wrong count %d\n", count ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } + + count = ShowCursor( TRUE ); + ok( count == -1, "wrong count %d\n", count ); + count = ShowCursor( TRUE ); + ok( count == 0, "wrong count %d\n", count ); + + if (pGetCursorInfo) + { + info.cbSize = sizeof(info); + ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); + ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); + } +} + + static void test_DestroyCursor(void) { static const BYTE bmp_bits[4096]; @@ -1435,6 +1681,7 @@ START_TEST(cursoricon) { + pGetCursorInfo = (void *)GetProcAddress( GetModuleHandleA("user32.dll"), "GetCursorInfo" ); test_argc = winetest_get_mainargs(&test_argv); if (test_argc >= 3) @@ -1463,6 +1710,8 @@ test_DrawIcon(); test_DrawIconEx(); test_DrawState(); + test_SetCursor(); + test_ShowCursor(); test_DestroyCursor(); do_parent(); test_child_process(); Modified: vendor/wine/dlls/user32/current/tests/win.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/tests/win.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/user32/current/tests/win.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/tests/win.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -2476,10 +2476,39 @@ check_wnd_state(hwnd, hwnd, hwnd, 0); } +struct create_window_thread_params +{ + HWND window; + HANDLE window_created; + HANDLE test_finished; +}; + +static DWORD WINAPI create_window_thread(void *param) +{ + struct create_window_thread_params *p = param; + DWORD res; + BOOL ret; + + p->window = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0); + + ret = SetEvent(p->window_created); + ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + + res = WaitForSingleObject(p->test_finished, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + + DestroyWindow(p->window); + return 0; +} + static void test_SetForegroundWindow(HWND hwnd) { + struct create_window_thread_params thread_params; + HANDLE thread; + DWORD res, tid; BOOL ret; HWND hwnd2; + MSG msg; flush_events( TRUE ); ShowWindow(hwnd, SW_HIDE); @@ -2552,6 +2581,34 @@ DestroyWindow(hwnd2); check_wnd_state(hwnd, hwnd, hwnd, 0); + + hwnd2 = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0); + check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + + thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid); + ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + res = WaitForSingleObject(thread_params.window_created, INFINITE); + ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + check_wnd_state(hwnd2, thread_params.window, hwnd2, 0); + + SetForegroundWindow(hwnd2); + check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); + if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow()); + todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus()); + + SetEvent(thread_params.test_finished); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread_params.test_finished); + CloseHandle(thread_params.window_created); + CloseHandle(thread); + DestroyWindow(hwnd2); } static WNDPROC old_button_proc; Modified: vendor/wine/dlls/winex11.drv/current/Makefile.in URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/Makefile.in?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/winex11.drv/current/Makefile.in [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/Makefile.in [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -47,5 +47,3 @@ RC_SRCS = version.rc @MAKE_DLL_RULES@ - -...@dependencies@ # everything below this line is overwritten by make depend Modified: vendor/wine/dlls/winex11.drv/current/clipboard.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/clipboard.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/winex11.drv/current/clipboard.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/clipboard.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -2199,7 +2199,10 @@ HANDLE hData = lpData->lpFormat->lpDrvImportFunc(display, xe.xselection.requestor, xe.xselection.property); - bRet = X11DRV_CLIPBOARD_InsertClipboardData(lpData->wFormatID, hData, 0, lpData->lpFormat, TRUE); + if (hData) + bRet = X11DRV_CLIPBOARD_InsertClipboardData(lpData->wFormatID, hData, 0, lpData->lpFormat, TRUE); + else + TRACE("Import function failed\n"); } else { Modified: vendor/wine/dlls/winex11.drv/current/opengl.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/opengl.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/winex11.drv/current/opengl.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/opengl.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -374,6 +374,21 @@ */ if(!getsockname(fd, (struct sockaddr *)&uaddr, &uaddrlen) && uaddr.sun_family == AF_UNIX) ERR_(winediag)("Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly\n"); + } + else + { + /* In general you would expect that if direct rendering is returned, that you receive hardware + * accelerated OpenGL rendering. The definition of direct rendering is that rendering is performed + * client side without sending all GL commands to X using the GLX protocol. When Mesa falls back to + * software rendering, it shows direct rendering. + * + * Depending on the cause of software rendering a different rendering string is shown. In case Mesa fails + * to load a DRI module 'Software Rasterizer' is returned. When Mesa is compiled as a OpenGL reference driver + * it shows 'Mesa X11'. + */ + const char *gl_renderer = (const char *)pglGetString(GL_RENDERER); + if(!strcmp(gl_renderer, "Software Rasterizer") || !strcmp(gl_renderer, "Mesa X11")) + ERR_(winediag)("The Mesa OpenGL driver is using software rendering, most likely your OpenGL drivers haven't been installed correctly\n"); } if(vis) XFree(vis); Modified: vendor/wine/dlls/winex11.drv/current/window.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/window.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/dlls/winex11.drv/current/window.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/window.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -2089,20 +2089,24 @@ Display *display = thread_display(); struct x11drv_win_data *data; XWindowChanges changes; + DWORD timestamp; if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return; if (!(data = X11DRV_get_win_data( hwnd ))) return; if (data->managed || !data->whole_window) return; + + if (EVENT_x11_time_to_win32_time(0)) + /* ICCCM says don't use CurrentTime, so try to use last message time if possible */ + /* FIXME: this is not entirely correct */ + timestamp = GetMessageTime() - EVENT_x11_time_to_win32_time(0); + else + timestamp = CurrentTime; /* Set X focus and install colormap */ wine_tsx11_lock(); changes.stack_mode = Above; XConfigureWindow( display, data->whole_window, CWStackMode, &changes ); - /* we must not use CurrentTime (ICCCM), so try to use last message time instead */ - /* FIXME: this is not entirely correct */ - XSetInputFocus( display, data->whole_window, RevertToParent, - /* CurrentTime */ - GetMessageTime() - EVENT_x11_time_to_win32_time(0)); + XSetInputFocus( display, data->whole_window, RevertToParent, timestamp ); wine_tsx11_unlock(); } Modified: vendor/wine/server/current/Makefile.in URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/Makefile.in?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/Makefile.in [iso-8859-1] (original) +++ vendor/wine/server/current/Makefile.in [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -77,5 +77,3 @@ uninstall:: $(RM) $(DESTDIR)$(bindir)/wineserver $(DESTDIR)$(mandir)/man$(prog_manext)/wineserver.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wineserver.$(prog_manext) - -...@dependencies@ # everything below this line is overwritten by make depend Modified: vendor/wine/server/current/debugger.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/debugger.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/debugger.c [iso-8859-1] (original) +++ vendor/wine/server/current/debugger.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -421,6 +421,7 @@ static int debugger_attach( struct process *process, struct thread *debugger ) { if (process->debugger) goto error; /* already being debugged */ + if (debugger->process == process) goto error; if (!is_process_init_done( process )) goto error; /* still starting up */ if (list_empty( &process->thread_list )) goto error; /* no thread running in the process */ Modified: vendor/wine/server/current/process.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/process.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/process.c [iso-8859-1] (original) +++ vendor/wine/server/current/process.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -1091,6 +1091,7 @@ reply->start_time = process->start_time; reply->end_time = process->end_time; reply->cpu = process->cpu; + reply->debugger_present = !!process->debugger; release_object( process ); } } Modified: vendor/wine/server/current/protocol.def URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/protocol.def?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/protocol.def [iso-8859-1] (original) +++ vendor/wine/server/current/protocol.def [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -692,6 +692,7 @@ int exit_code; /* process exit code */ int priority; /* priority class */ cpu_type_t cpu; /* CPU that this process is running on */ + int debugger_present; /* process is being debugged */ @END Modified: vendor/wine/server/current/request.h URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/request.h?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/request.h [iso-8859-1] (original) +++ vendor/wine/server/current/request.h [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -697,6 +697,7 @@ C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, exit_code) == 48 ); C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, priority) == 52 ); C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, cpu) == 56 ); +C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, debugger_present) == 60 ); C_ASSERT( sizeof(struct get_process_info_reply) == 64 ); C_ASSERT( FIELD_OFFSET(struct set_process_info_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct set_process_info_request, mask) == 16 ); Modified: vendor/wine/server/current/sock.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/sock.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/sock.c [iso-8859-1] (original) +++ vendor/wine/server/current/sock.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -51,6 +51,7 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" +#include "winerror.h" #include "process.h" #include "file.h" @@ -59,11 +60,34 @@ #include "request.h" #include "user.h" -/* To avoid conflicts with the Unix socket headers. Plus we only need a few - * macros anyway. +/* From winsock.h */ +#define FD_MAX_EVENTS 10 +#define FD_READ_BIT 0 +#define FD_WRITE_BIT 1 +#define FD_OOB_BIT 2 +#define FD_ACCEPT_BIT 3 +#define FD_CONNECT_BIT 4 +#define FD_CLOSE_BIT 5 + +/* + * Define flags to be used with the WSAAsyncSelect() call. */ -#define USE_WS_PREFIX -#include "winsock2.h" +#define FD_READ 0x00000001 +#define FD_WRITE 0x00000002 +#define FD_OOB 0x00000004 +#define FD_ACCEPT 0x00000008 +#define FD_CONNECT 0x00000010 +#define FD_CLOSE 0x00000020 + +/* internal per-socket flags */ +#define FD_WINE_LISTENING 0x10000000 +#define FD_WINE_NONBLOCKING 0x20000000 +#define FD_WINE_CONNECTED 0x40000000 +#define FD_WINE_RAW 0x80000000 +#define FD_WINE_INTERNAL 0xFFFF0000 + +/* Constants for WSAIoctl() */ +#define WSA_FLAG_OVERLAPPED 0x01 struct sock { Modified: vendor/wine/server/current/trace.c URL: http://svn.reactos.org/svn/reactos/vendor/wine/server/current/trace.c?rev=46314&r1=46313&r2=46314&view=diff ============================================================================== --- vendor/wine/server/current/trace.c [iso-8859-1] (original) +++ vendor/wine/server/current/trace.c [iso-8859-1] Sun Mar 21 20:14:19 2010 @@ -1118,6 +1118,7 @@ fprintf( stderr, ", exit_code=%d", req->exit_code ); fprintf( stderr, ", priority=%d", req->priority ); dump_cpu_type( ", cpu=", &req->cpu ); + fprintf( stderr, ", debugger_present=%d", req->debugger_present ); } static void dump_set_process_info_request( const struct set_process_info_request *req )