Author: fireball
Date: Sun Feb 21 11:51:40 2010
New Revision: 45646
URL:
http://svn.reactos.org/svn/reactos?rev=45646&view=rev
Log:
[vendor/wine]
- Import Wine-1.1.39 gdi32, user32, winex11.drv, wineserver.
Modified:
vendor/wine/dlls/gdi32/current/clipping.c
vendor/wine/dlls/gdi32/current/gdiobj.c
vendor/wine/dlls/gdi32/current/tests/clipping.c
vendor/wine/dlls/user32/current/controls.h
vendor/wine/dlls/user32/current/cursoricon.c
vendor/wine/dlls/user32/current/defdlg.c
vendor/wine/dlls/user32/current/defwnd.c
vendor/wine/dlls/user32/current/dialog.c
vendor/wine/dlls/user32/current/edit.c
vendor/wine/dlls/user32/current/tests/msg.c
vendor/wine/dlls/user32/current/tests/win.c
vendor/wine/dlls/user32/current/user_main.c
vendor/wine/dlls/user32/current/winpos.c
vendor/wine/dlls/user32/current/winproc.c
vendor/wine/dlls/winex11.drv/current/dib.c
vendor/wine/dlls/winex11.drv/current/ime.c
vendor/wine/dlls/winex11.drv/current/keyboard.c
vendor/wine/dlls/winex11.drv/current/palette.c
vendor/wine/dlls/winex11.drv/current/window.c
vendor/wine/dlls/winex11.drv/current/x11drv.h
vendor/wine/dlls/winex11.drv/current/xim.c
vendor/wine/dlls/winex11.drv/current/xrender.c
vendor/wine/server/current/registry.c
vendor/wine/server/current/trace.c
vendor/wine/server/current/window.c
Modified: vendor/wine/dlls/gdi32/current/clipping.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/clipping.…
==============================================================================
--- vendor/wine/dlls/gdi32/current/clipping.c [iso-8859-1] (original)
+++ vendor/wine/dlls/gdi32/current/clipping.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -385,7 +385,7 @@
{
INT ret = -1;
DC * dc;
- if (hRgn && (dc = get_dc_ptr( hdc )))
+ if ((dc = get_dc_ptr( hdc )))
{
if( dc->hClipRgn )
{
Modified: vendor/wine/dlls/gdi32/current/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/gdiobj.c?…
==============================================================================
--- vendor/wine/dlls/gdi32/current/gdiobj.c [iso-8859-1] (original)
+++ vendor/wine/dlls/gdi32/current/gdiobj.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -578,8 +578,6 @@
if (reason != DLL_PROCESS_ATTACH) return TRUE;
DisableThreadLibraryCalls( inst );
- LoadLibraryA( "gdi.exe16" );
-
WineEngInit();
/* create stock objects */
Modified: vendor/wine/dlls/gdi32/current/tests/clipping.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/tests/cli…
==============================================================================
--- vendor/wine/dlls/gdi32/current/tests/clipping.c [iso-8859-1] (original)
+++ vendor/wine/dlls/gdi32/current/tests/clipping.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -265,8 +265,96 @@
DeleteObject(hrgn);
}
+static void test_GetClipRgn(void)
+{
+ HDC hdc;
+ HRGN hrgn, hrgn2, hrgn3, hrgn4;
+ int ret;
+
+ /* Test calling GetClipRgn with NULL device context and region handles. */
+ ret = GetClipRgn(NULL, NULL);
+ ok(ret == -1, "Expected GetClipRgn to return -1, got %d\n", ret);
+
+ hdc = GetDC(NULL);
+ ok(hdc != NULL, "Expected GetDC to return a valid device context
handle\n");
+
+ /* Test calling GetClipRgn with a valid device context and NULL region. */
+ ret = GetClipRgn(hdc, NULL);
+ ok(ret == 0 ||
+ ret == -1 /* Win9x */,
+ "Expected GetClipRgn to return 0, got %d\n", ret);
+
+ /* Initialize the test regions. */
+ hrgn = CreateRectRgn(100, 100, 100, 100);
+ ok(hrgn != NULL,
+ "Expected CreateRectRgn to return a handle to a new rectangular
region\n");
+
+ hrgn2 = CreateRectRgn(1, 2, 3, 4);
+ ok(hrgn2 != NULL,
+ "Expected CreateRectRgn to return a handle to a new rectangular
region\n");
+
+ hrgn3 = CreateRectRgn(1, 2, 3, 4);
+ ok(hrgn3 != NULL,
+ "Expected CreateRectRgn to return a handle to a new rectangular
region\n");
+
+ hrgn4 = CreateRectRgn(1, 2, 3, 4);
+ ok(hrgn4 != NULL,
+ "Expected CreateRectRgn to return a handle to a new rectangular
region\n");
+
+ /* Try getting a clipping region from the device context
+ * when the device context's clipping region isn't set. */
+ ret = GetClipRgn(hdc, hrgn2);
+ ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret);
+
+ /* The region passed to GetClipRgn should be unchanged. */
+ ret = EqualRgn(hrgn2, hrgn3);
+ ok(ret == 1,
+ "Expected EqualRgn to compare the two regions as equal, got %d\n",
ret);
+
+ /* Try setting and getting back a clipping region. */
+ ret = SelectClipRgn(hdc, hrgn);
+ ok(ret == NULLREGION,
+ "Expected SelectClipRgn to return NULLREGION, got %d\n", ret);
+
+ /* Passing a NULL region handle when the device context
+ * has a clipping region results in an error. */
+ ret = GetClipRgn(hdc, NULL);
+ ok(ret == -1, "Expected GetClipRgn to return -1, got %d\n", ret);
+
+ ret = GetClipRgn(hdc, hrgn2);
+ ok(ret == 1, "Expected GetClipRgn to return 1, got %d\n", ret);
+
+ ret = EqualRgn(hrgn, hrgn2);
+ ok(ret == 1,
+ "Expected EqualRgn to compare the two regions as equal, got %d\n",
ret);
+
+ /* Try unsetting and then query the clipping region. */
+ ret = SelectClipRgn(hdc, NULL);
+ ok(ret == SIMPLEREGION,
+ "Expected SelectClipRgn to return SIMPLEREGION, got %d\n", ret);
+
+ ret = GetClipRgn(hdc, NULL);
+ ok(ret == 0 ||
+ ret == -1 /* Win9x */,
+ "Expected GetClipRgn to return 0, got %d\n", ret);
+
+ ret = GetClipRgn(hdc, hrgn3);
+ ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret);
+
+ ret = EqualRgn(hrgn3, hrgn4);
+ ok(ret == 1,
+ "Expected EqualRgn to compare the two regions as equal, got %d\n",
ret);
+
+ DeleteObject(hrgn4);
+ DeleteObject(hrgn3);
+ DeleteObject(hrgn2);
+ DeleteObject(hrgn);
+ ReleaseDC(NULL, hdc);
+}
+
START_TEST(clipping)
{
test_GetRandomRgn();
test_ExtCreateRegion();
-}
+ test_GetClipRgn();
+}
Modified: vendor/wine/dlls/user32/current/controls.h
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/controls…
==============================================================================
--- vendor/wine/dlls/user32/current/controls.h [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/controls.h [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -100,10 +100,7 @@
HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
- HICON (*alloc_icon_handle)(UINT);
- struct tagCURSORICONINFO *(*get_icon_ptr)(HICON);
- void (*release_icon_ptr)(HICON,struct tagCURSORICONINFO*);
- int (*free_icon_handle)(HICON);
+ void (*free_icon_param)(ULONG_PTR);
};
struct wow_handlers32
@@ -121,6 +118,8 @@
WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
INT (*dialog_box_loop)(HWND,HWND);
+ ULONG_PTR (*get_icon_param)(HICON);
+ ULONG_PTR (*set_icon_param)(HICON,ULONG_PTR);
};
extern struct wow_handlers16 wow_handlers DECLSPEC_HIDDEN;
@@ -132,6 +131,9 @@
extern LRESULT MDIClientWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
extern LRESULT ScrollBarWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
+
+extern ULONG_PTR get_icon_param( HICON handle ) DECLSPEC_HIDDEN;
+extern ULONG_PTR set_icon_param( HICON handle, ULONG_PTR param ) DECLSPEC_HIDDEN;
/* Class functions */
struct tagCLASS; /* opaque structure */
Modified: vendor/wine/dlls/user32/current/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/cursoric…
==============================================================================
--- vendor/wine/dlls/user32/current/cursoricon.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/cursoricon.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -124,6 +124,86 @@
static CRITICAL_SECTION IconCrst = { &critsect_debug, -1, 0, 0, 0, 0 };
static const WORD ICON_HOTSPOT = 0x4242;
+
+
+/**********************************************************************
+ * User objects management
+ */
+
+struct cursoricon_object
+{
+ struct user_object obj; /* object header */
+ ULONG_PTR param; /* opaque param used by 16-bit code */
+ /* followed by cursor data in CURSORICONINFO format */
+};
+
+static HICON alloc_icon_handle( unsigned int size )
+{
+ struct cursoricon_object *obj = HeapAlloc( GetProcessHeap(), 0, sizeof(*obj) + size
);
+ if (!obj) return 0;
+ obj->param = 0;
+ return alloc_user_handle( &obj->obj, USER_ICON );
+}
+
+static struct tagCURSORICONINFO *get_icon_ptr( HICON handle )
+{
+ struct cursoricon_object *obj = get_user_handle_ptr( handle, USER_ICON );
+ if (obj == OBJ_OTHER_PROCESS)
+ {
+ WARN( "icon handle %p from other process\n", handle );
+ obj = NULL;
+ }
+ return obj ? (struct tagCURSORICONINFO *)(obj + 1) : NULL;
+}
+
+static void release_icon_ptr( HICON handle, struct tagCURSORICONINFO *ptr )
+{
+ release_user_handle_ptr( (struct cursoricon_object *)ptr - 1 );
+}
+
+static BOOL free_icon_handle( HICON handle )
+{
+ struct cursoricon_object *obj = free_user_handle( handle, USER_ICON );
+
+ if (obj == OBJ_OTHER_PROCESS) WARN( "icon handle %p from other process\n",
handle );
+ else if (obj)
+ {
+ ULONG_PTR param = obj->param;
+ HeapFree( GetProcessHeap(), 0, obj );
+ if (wow_handlers.free_icon_param && param) wow_handlers.free_icon_param(
param );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+ULONG_PTR get_icon_param( HICON handle )
+{
+ ULONG_PTR ret = 0;
+ struct cursoricon_object *obj = get_user_handle_ptr( handle, USER_ICON );
+
+ if (obj == OBJ_OTHER_PROCESS) WARN( "icon handle %p from other process\n",
handle );
+ else if (obj)
+ {
+ ret = obj->param;
+ release_user_handle_ptr( obj );
+ }
+ return ret;
+}
+
+ULONG_PTR set_icon_param( HICON handle, ULONG_PTR param )
+{
+ ULONG_PTR ret = 0;
+ struct cursoricon_object *obj = get_user_handle_ptr( handle, USER_ICON );
+
+ if (obj == OBJ_OTHER_PROCESS) WARN( "icon handle %p from other process\n",
handle );
+ else if (obj)
+ {
+ ret = obj->param;
+ obj->param = param;
+ release_user_handle_ptr( obj );
+ }
+ return ret;
+}
/***********************************************************************
@@ -451,10 +531,10 @@
{
CURSORICONINFO *info;
- if (!(info = wow_handlers.get_icon_ptr( handle ))) return FALSE;
+ if (!(info = get_icon_ptr( handle ))) return FALSE;
size->cx = info->nWidth;
size->cy = info->nHeight;
- wow_handlers.release_icon_ptr( handle, info );
+ release_icon_ptr( handle, info );
return TRUE;
}
@@ -831,10 +911,10 @@
sizeXor = bmpXor.bmHeight * bmpXor.bmWidthBytes;
sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;
- hObj = wow_handlers.alloc_icon_handle( sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
+ hObj = alloc_icon_handle( sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
if (hObj)
{
- CURSORICONINFO *info = wow_handlers.get_icon_ptr( hObj );
+ CURSORICONINFO *info = get_icon_ptr( hObj );
info->ptHotSpot.x = hotspot.x;
info->ptHotSpot.y = hotspot.y;
@@ -848,7 +928,7 @@
GetBitmapBits( hAndBits, sizeAnd, info + 1 );
GetBitmapBits( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd );
- wow_handlers.release_icon_ptr( hObj, info );
+ release_icon_ptr( hObj, info );
}
DeleteObject( hAndBits );
@@ -1178,7 +1258,7 @@
if (!hInstance) hInstance = user32_module; /* Load OEM cursor/icon */
/* don't cache 16-bit instances (FIXME: should never get 16-bit instances in the
first place) */
- if (!HIWORD( hInstance )) loadflags &= ~LR_SHARED;
+ if ((ULONG_PTR)hInstance >> 16 == 0) loadflags &= ~LR_SHARED;
/* Get directory resource ID */
@@ -1451,15 +1531,15 @@
int size;
HICON hNew;
- if (!(ptrOld = wow_handlers.get_icon_ptr( hIcon ))) return 0;
+ if (!(ptrOld = get_icon_ptr( hIcon ))) return 0;
size = sizeof(CURSORICONINFO);
size += ptrOld->nHeight * get_bitmap_width_bytes( ptrOld->nWidth, 1 ); /* and
bitmap */
size += ptrOld->nHeight * ptrOld->nWidthBytes; /* xor bitmap */
- hNew = wow_handlers.alloc_icon_handle( size );
- ptrNew = wow_handlers.get_icon_ptr( hNew );
+ hNew = alloc_icon_handle( size );
+ ptrNew = get_icon_ptr( hNew );
memcpy( ptrNew, ptrOld, size );
- wow_handlers.release_icon_ptr( hIcon, ptrOld );
- wow_handlers.release_icon_ptr( hNew, ptrNew );
+ release_icon_ptr( hIcon, ptrOld );
+ release_icon_ptr( hNew, ptrNew );
return hNew;
}
@@ -1472,7 +1552,7 @@
TRACE_(icon)("%p\n", hIcon );
if (CURSORICON_DelSharedIcon( hIcon ) == -1)
- wow_handlers.free_icon_handle( hIcon );
+ free_icon_handle( hIcon );
return TRUE;
}
@@ -1572,10 +1652,10 @@
TRACE("%p, (%d,%d), %p\n", hdc, x, y, hIcon);
- if (!(ptr = wow_handlers.get_icon_ptr( hIcon ))) return FALSE;
+ if (!(ptr = get_icon_ptr( hIcon ))) return FALSE;
if (!(hMemDC = CreateCompatibleDC( hdc )))
{
- wow_handlers.release_icon_ptr( hIcon, ptr );
+ release_icon_ptr( hIcon, ptr );
return FALSE;
}
@@ -1641,7 +1721,7 @@
DeleteDC( hMemDC );
if (hXorBits) DeleteObject( hXorBits );
if (hAndBits) DeleteObject( hAndBits );
- wow_handlers.release_icon_ptr( hIcon, ptr );
+ release_icon_ptr( hIcon, ptr );
SetTextColor( hdc, oldFg );
SetBkColor( hdc, oldBg );
return TRUE;
@@ -1667,9 +1747,9 @@
/* Change the cursor shape only if it is visible */
if (thread_info->cursor_count >= 0)
{
- CURSORICONINFO *info = wow_handlers.get_icon_ptr( hCursor );
+ CURSORICONINFO *info = get_icon_ptr( hCursor );
/* release before calling driver (FIXME) */
- if (info) wow_handlers.release_icon_ptr( hCursor, info );
+ if (info) release_icon_ptr( hCursor, info );
USER_Driver->pSetCursor( info );
}
return hOldCursor;
@@ -1688,9 +1768,9 @@
{
if (++thread_info->cursor_count == 0) /* Show it */
{
- CURSORICONINFO *info = wow_handlers.get_icon_ptr( thread_info->cursor );
+ CURSORICONINFO *info = get_icon_ptr( thread_info->cursor );
/* release before calling driver (FIXME) */
- if (info) wow_handlers.release_icon_ptr( thread_info->cursor, info );
+ if (info) release_icon_ptr( thread_info->cursor, info );
USER_Driver->pSetCursor( info );
}
}
@@ -1868,7 +1948,7 @@
CURSORICONINFO *ciconinfo;
INT height;
- if (!(ciconinfo = wow_handlers.get_icon_ptr( hIcon ))) return FALSE;
+ if (!(ciconinfo = get_icon_ptr( hIcon ))) return FALSE;
TRACE("%p => %dx%d, %d bpp\n", hIcon,
ciconinfo->nWidth, ciconinfo->nHeight, ciconinfo->bBitsPerPixel);
@@ -1905,7 +1985,7 @@
iconinfo->hbmMask = CreateBitmap ( ciconinfo->nWidth, height,
1, 1, ciconinfo + 1);
- wow_handlers.release_icon_ptr( hIcon, ciconinfo );
+ release_icon_ptr( hIcon, ciconinfo );
return TRUE;
}
@@ -1946,10 +2026,10 @@
sizeAnd = bmpAnd.bmHeight * get_bitmap_width_bytes(bmpAnd.bmWidth, 1);
- hObj = wow_handlers.alloc_icon_handle( sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
+ hObj = alloc_icon_handle( sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
if (hObj)
{
- CURSORICONINFO *info = wow_handlers.get_icon_ptr( hObj );
+ CURSORICONINFO *info = get_icon_ptr( hObj );
/* If we are creating an icon, the hotspot is unused */
if (iconinfo->fIcon)
@@ -2058,7 +2138,7 @@
dst_bits, &bminfo, DIB_RGB_COLORS );
}
}
- wow_handlers.release_icon_ptr( hObj, info );
+ release_icon_ptr( hObj, info );
}
return hObj;
}
@@ -2099,10 +2179,10 @@
TRACE_(icon)("(hdc=%p,pos=%d.%d,hicon=%p,extend=%d.%d,istep=%d,br=%p,flags=0x%08x)\n",
hdc,x0,y0,hIcon,cxWidth,cyWidth,istep,hbr,flags );
- if (!(ptr = wow_handlers.get_icon_ptr( hIcon ))) return FALSE;
+ if (!(ptr = get_icon_ptr( hIcon ))) return FALSE;
if (!(hMemDC = CreateCompatibleDC( hdc )))
{
- wow_handlers.release_icon_ptr( hIcon, ptr );
+ release_icon_ptr( hIcon, ptr );
return FALSE;
}
@@ -2250,7 +2330,7 @@
if (hMemDC) DeleteDC( hMemDC );
if (hDC_off) DeleteDC(hDC_off);
if (hB_off) DeleteObject(hB_off);
- wow_handlers.release_icon_ptr( hIcon, ptr );
+ release_icon_ptr( hIcon, ptr );
return result;
}
Modified: vendor/wine/dlls/user32/current/defdlg.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/defdlg.c…
==============================================================================
--- vendor/wine/dlls/user32/current/defdlg.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/defdlg.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -339,7 +339,7 @@
dlgInfo->hMenu = 0;
dlgInfo->xBaseUnit = 0;
dlgInfo->yBaseUnit = 0;
- dlgInfo->idResult = 0;
+ dlgInfo->idResult = IDOK;
dlgInfo->flags = 0;
wndPtr->dlgInfo = dlgInfo;
}
Modified: vendor/wine/dlls/user32/current/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/defwnd.c…
==============================================================================
--- vendor/wine/dlls/user32/current/defwnd.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/defwnd.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -528,7 +528,9 @@
* give the parent first chance to set the cursor */
if ((LOWORD(lParam) < HTSIZEFIRST) || (LOWORD(lParam) > HTSIZELAST))
{
- if (SendMessageW(GetParent(hwnd), WM_SETCURSOR, wParam, lParam)) return
TRUE;
+ HWND parent = GetParent( hwnd );
+ if (parent != GetDesktopWindow() &&
+ SendMessageW( parent, WM_SETCURSOR, wParam, lParam )) return TRUE;
}
}
NC_HandleSetCursor( hwnd, wParam, lParam );
Modified: vendor/wine/dlls/user32/current/dialog.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/dialog.c…
==============================================================================
--- vendor/wine/dlls/user32/current/dialog.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/dialog.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -349,10 +349,10 @@
WORD signature;
WORD dlgver;
+ dlgver = GET_WORD(p); p++;
signature = GET_WORD(p); p++;
- dlgver = GET_WORD(p); p++;
-
- if (signature == 1 && dlgver == 0xffff) /* DIALOGEX resource */
+
+ if (dlgver == 1 && signature == 0xffff) /* DIALOGEX resource */
{
result->dialogEx = TRUE;
result->helpId = GET_DWORD(p); p += 2;
@@ -672,7 +672,6 @@
dlgInfo->hMenu = hMenu;
dlgInfo->xBaseUnit = xBaseUnit;
dlgInfo->yBaseUnit = yBaseUnit;
- dlgInfo->idResult = IDOK;
dlgInfo->flags = flags;
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
Modified: vendor/wine/dlls/user32/current/edit.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/edit.c?r…
==============================================================================
--- vendor/wine/dlls/user32/current/edit.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/edit.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -169,6 +169,7 @@
(LPARAM)(es->hwndSelf)); \
} while(0)
+static const WCHAR empty_stringW[] = {0};
/*********************************************************************
*
@@ -2878,8 +2879,7 @@
}
else if (es->style & ES_PASSWORD) {
/* clear selected text in password edit box even with empty clipboard */
- const WCHAR empty_strW[] = { 0 };
- EDIT_EM_ReplaceSel(es, TRUE, empty_strW, TRUE, TRUE);
+ EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE);
}
CloseClipboard();
}
@@ -2921,8 +2921,6 @@
*/
static inline void EDIT_WM_Clear(EDITSTATE *es)
{
- static const WCHAR empty_stringW[] = {0};
-
/* Protect read-only edit control from modification */
if(es->style & ES_READONLY)
return;
@@ -3674,7 +3672,6 @@
}
else
{
- static const WCHAR empty_stringW[] = {0};
TRACE("<NULL>\n");
EDIT_EM_ReplaceSel(es, FALSE, empty_stringW, FALSE, FALSE);
}
@@ -4189,7 +4186,6 @@
if (es->composition_len == 0 && es->selection_start !=
es->selection_end)
{
- static const WCHAR empty_stringW[] = {0};
EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE);
es->composition_start = es->selection_end;
}
@@ -4929,7 +4925,6 @@
case WM_IME_ENDCOMPOSITION:
if (es->composition_len > 0)
{
- static const WCHAR empty_stringW[] = {0};
EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE);
es->selection_end = es->selection_start;
es->composition_len= 0;
Modified: vendor/wine/dlls/user32/current/tests/msg.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/tests/ms…
==============================================================================
--- vendor/wine/dlls/user32/current/tests/msg.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/tests/msg.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -297,7 +297,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_STATECHANGED },
/* in the 1st MDI child */
{ WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, /* in the 1st MDI child */
{ WM_CHILDACTIVATE, sent|defwinproc }, /* in the 1st MDI child */
- { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
}, /* in the 1st MDI child */
+ { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, /* in the 1st MDI child
*/
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in the 1st MDI child */
/* Lock redraw 2nd MDI child */
{ WM_SETREDRAW, sent|wparam|defwinproc, 0 }, /* in the 2nd MDI child */
@@ -306,7 +306,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc,
SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED },/* in the 2nd MDI child
*/
{ WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },/* in the 2nd MDI child */
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd MDI child */
- { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
}, /* in the 2nd MDI child */
+ { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
}, /* in the 2nd MDI child */
{ WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in the 2nd MDI child */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd MDI
child */
/* Redraw 2nd MDI child */
@@ -2475,7 +2475,7 @@
{ WM_GETMINMAXINFO, sent },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED
},
{ WM_NCCALCSIZE, sent|wparam, 1 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -2528,7 +2528,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED },
{ WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -2550,7 +2550,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED
},
{ WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -2615,7 +2615,7 @@
{ WM_GETMINMAXINFO, sent },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED
},
{ WM_NCCALCSIZE, sent|wparam, 1 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* in MDI frame */
@@ -2721,7 +2721,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED
},
{ WM_GETMINMAXINFO, sent|defwinproc },
{ WM_NCCALCSIZE, sent|wparam, 1 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_STATECHANGED },
{ WM_MOVE, sent|defwinproc },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* in MDI frame */
@@ -2763,7 +2763,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_STATECHANGED },
{ WM_NCCALCSIZE, sent|defwinproc|wparam, 1 },
{ WM_CHILDACTIVATE, sent|defwinproc|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* restore the 2nd MDI child */
@@ -2774,7 +2774,7 @@
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc,
SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
{ WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
@@ -3021,7 +3021,7 @@
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|optional|defwinproc },
{ WM_MDIACTIVATE, sent|optional|defwinproc },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -3136,7 +3136,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED },
{ WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -3152,7 +3152,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED },
{ WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -3169,7 +3169,7 @@
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED
},
{ WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_NOCLIENTSIZE|SWP_STATECHANGED },
+ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED
},
{ WM_MOVE, sent|defwinproc },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
@@ -3186,7 +3186,7 @@
{ HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE },
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED },
{ WM_NCCALCSIZE, sent|wparam, 1 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOCLIENTSIZE|SWP_STATECHANGED },
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED },
{ WM_MOVE, sent|defwinproc },
{ WM_SIZE, sent|defwinproc|wparam|lparam, SIZE_MINIMIZED, 0 },
{ WM_CHILDACTIVATE, sent|wparam|lparam|defwinproc, 0, 0 },
@@ -3203,7 +3203,7 @@
{ WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
- { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED
},
+ { WM_WINDOWPOSCHANGED, sent|wparam,
SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
{ WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED },
/* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam,
SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -3359,6 +3359,7 @@
CLIENTCREATESTRUCT client_cs;
HWND mdi_frame, mdi_child, mdi_child2, active_child;
BOOL zoomed;
+ RECT rc;
HMENU hMenu = CreateMenu();
assert(mdi_RegisterWindowClasses());
@@ -3379,12 +3380,13 @@
ok(GetFocus() == mdi_frame, "wrong focus window %p\n", GetFocus());
trace("creating MDI client window\n");
+ GetClientRect(mdi_frame, &rc);
client_cs.hWindowMenu = 0;
client_cs.idFirstChild = MDI_FIRST_CHILD_ID;
mdi_client = CreateWindowExA(0, "MDI_client_class",
NULL,
WS_CHILD | WS_VISIBLE | MDIS_ALLCHILDSTYLES,
- 0, 0, 0, 0,
+ rc.left, rc.top, rc.right - rc.left, rc.bottom -
rc.top,
mdi_frame, 0, GetModuleHandleA(0), &client_cs);
assert(mdi_client);
ok_sequence(WmCreateMDIclientSeq, "Create visible MDI client window",
FALSE);
@@ -3570,7 +3572,7 @@
flush_sequence();
ShowWindow(mdi_child2, SW_RESTORE);
- ok_sequence(WmRestoreMDIchildVisibleSeq_2, "ShowWindow(SW_RESTORE):minimized MDI
child", TRUE);
+ ok_sequence(WmRestoreMDIchildVisibleSeq_2, "ShowWindow(SW_RESTORE):minimized MDI
child", FALSE);
ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n",
GetActiveWindow());
ok(GetFocus() == mdi_child2, "wrong focus window %p\n", GetFocus());
Modified: vendor/wine/dlls/user32/current/tests/win.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/tests/wi…
==============================================================================
--- vendor/wine/dlls/user32/current/tests/win.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/tests/win.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -63,6 +63,8 @@
static HMENU hmenu;
static DWORD our_pid;
+static BOOL is_win9x = FALSE;
+
#define COUNTOF(arr) (sizeof(arr)/sizeof(arr[0]))
static void dump_minmax_info( const MINMAXINFO *minmax )
@@ -446,11 +448,16 @@
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop
);
check_parents( test, child, child, 0, 0, hwndMain, test );
- ShowWindow( test, SW_SHOW );
- ret = SetParent( test, test );
- ok( ret == NULL, "SetParent return value %p expected %p\n", ret, NULL );
- ok( GetWindowLongA( test, GWL_STYLE ) & WS_VISIBLE, "window is not visible
after SetParent\n" );
- check_parents( test, child, child, 0, 0, hwndMain, test );
+ if (!is_win9x)
+ {
+ ShowWindow( test, SW_SHOW );
+ ret = SetParent( test, test );
+ ok( ret == NULL, "SetParent return value %p expected %p\n", ret, NULL
);
+ ok( GetWindowLongA( test, GWL_STYLE ) & WS_VISIBLE, "window is not
visible after SetParent\n" );
+ check_parents( test, child, child, 0, 0, hwndMain, test );
+ }
+ else
+ win_skip( "Test crashes on Win9x/WinMe\n" );
DestroyWindow( test );
/* owned popup */
@@ -646,7 +653,6 @@
}
case WM_WINDOWPOSCHANGING:
{
- BOOL is_win9x = GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == 0;
WINDOWPOS *winpos = (WINDOWPOS *)lparam;
trace("main: WM_WINDOWPOSCHANGING %p after %p, x %d, y %d, cx %d, cy %d flags
%08x\n",
winpos->hwnd, winpos->hwndInsertAfter,
@@ -855,7 +861,6 @@
DWORD style, exstyle;
RECT rc_window, rc_client, rc;
BOOL menu;
- BOOL is_win9x = GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == 0;
LRESULT ret;
style = GetWindowLongA(hwnd, GWL_STYLE);
@@ -1039,9 +1044,9 @@
HWND hwnd1, hwnd2, hwnd3, hwnd4, hwnd5;
HWND shellWindow, nextWnd;
- if (!GetWindowLongW(GetDesktopWindow(), GWL_STYLE))
- {
- trace("Skipping shell window test on Win9x\n");
+ if (is_win9x)
+ {
+ win_skip("Skipping shell window test on Win9x\n");
return;
}
@@ -1906,7 +1911,6 @@
{
RECT orig_win_rc, rect;
LONG_PTR old_proc;
- BOOL is_win9x = GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == 0;
SetRect(&rect, 111, 222, 333, 444);
ok(!GetWindowRect(0, &rect), "GetWindowRect succeeded\n");
@@ -1969,7 +1973,6 @@
{
HWND child;
HMENU hMenu, ret;
- BOOL is_win9x = GetWindowLongPtrW(parent, GWLP_WNDPROC) == 0;
BOOL retok;
DWORD style;
@@ -2156,7 +2159,7 @@
/*trace("skipping next %p (%p)\n", test,
UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)));*/
test = GetWindow(test, GW_HWNDNEXT);
}
- ok_(file, line)(next == test, "expected next %p, got %p\n", next, test);
+ ok_(file, line)(next == test, "%p: expected next %p, got %p\n", hwnd, next,
test);
test = GetWindow(hwnd, GW_HWNDPREV);
/* skip foreign windows */
@@ -2168,13 +2171,14 @@
/*trace("skipping prev %p (%p)\n", test,
UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)));*/
test = GetWindow(test, GW_HWNDPREV);
}
- ok_(file, line)(prev == test, "expected prev %p, got %p\n", prev, test);
+ ok_(file, line)(prev == test, "%p: expected prev %p, got %p\n", hwnd, prev,
test);
test = GetWindow(hwnd, GW_OWNER);
- ok_(file, line)(owner == test, "expected owner %p, got %p\n", owner,
test);
+ ok_(file, line)(owner == test, "%p: expected owner %p, got %p\n", hwnd,
owner, test);
ex_style = GetWindowLong(hwnd, GWL_EXSTYLE);
- ok_(file, line)(!(ex_style & WS_EX_TOPMOST) == !topmost, "expected
%stopmost\n", topmost ? "" : "NOT ");
+ ok_(file, line)(!(ex_style & WS_EX_TOPMOST) == !topmost, "%p: expected
%stopmost\n",
+ hwnd, topmost ? "" : "NOT ");
}
static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E)
@@ -2255,6 +2259,20 @@
check_z_order(hwnd_A, hwnd_D, 0, 0, TRUE);
#endif
+ /* make hwnd_C owned by a topmost window */
+ DestroyWindow( hwnd_C );
+ hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL,
+ WS_POPUP,
+ 100, 100, 100, 100,
+ hwnd_A, 0, GetModuleHandle(0), NULL);
+ trace("hwnd_C %p\n", hwnd_C);
+ check_z_order(hwnd_E, 0, hwnd_D, 0, FALSE);
+ check_z_order(hwnd_D, hwnd_E, hwnd_F, 0, FALSE);
+ check_z_order(hwnd_F, hwnd_D, hwnd_B, 0, FALSE);
+ check_z_order(hwnd_B, hwnd_F, hwnd_A, hwnd_F, TRUE);
+ check_z_order(hwnd_A, hwnd_B, hwnd_C, 0, TRUE);
+ check_z_order(hwnd_C, hwnd_A, 0, hwnd_A, TRUE);
+
DestroyWindow(hwnd_A);
DestroyWindow(hwnd_B);
DestroyWindow(hwnd_C);
@@ -2272,7 +2290,7 @@
ok( GetRandomRgn( hdc, hrgn, SYSRGN ) != 0, "GetRandomRgn failed\n" );
GetWindowRect( hwnd, &win_rect );
GetRgnBox( hrgn, &rgn_rect );
- if (GetVersion() & 0x80000000)
+ if (is_win9x)
{
trace("win9x, mapping to screen coords\n");
MapWindowPoints( hwnd, 0, (POINT *)&rgn_rect, 2 );
@@ -2804,7 +2822,7 @@
/* set main window to have initial capture */
SetCapture(hwnd);
- if (!GetWindowLongW(GetDesktopWindow(), GWL_STYLE))
+ if (is_win9x)
{
win_skip("TrackPopupMenu test crashes on Win9x/WinMe\n");
}
@@ -3220,6 +3238,7 @@
BOOL ret;
HWND desktop = GetDesktopWindow();
HMENU hMenu;
+ /* FIXME: This detection is not correct as it also covers (all?) XP+ */
BOOL is_win9x = GetWindowLongPtrW(desktop, GWLP_WNDPROC) == 0;
HWND parent, child1, child2, child3, child4, sibling;
@@ -3280,6 +3299,8 @@
check_parents(child3, child2, child2, child2, 0, child2, parent);
check_parents(child4, desktop, child2, child2, child2, child4, parent);
}
+ else
+ skip("Win9x/WinMe crash\n");
hMenu = CreateMenu();
sibling = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW,
@@ -5918,6 +5939,10 @@
if (!RegisterWindowClasses()) assert(0);
+ SetLastError(0xdeafbeef);
+ GetWindowLongPtrW(GetDesktopWindow(), GWLP_WNDPROC);
+ is_win9x = (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED);
+
hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId());
if (!hhook) win_skip( "Cannot set CBT hook, skipping some tests\n" );
Modified: vendor/wine/dlls/user32/current/user_main.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/user_mai…
==============================================================================
--- vendor/wine/dlls/user32/current/user_main.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/user_main.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -278,8 +278,6 @@
/* Setup palette function pointers */
palette_init();
- LoadLibraryA( "user.exe16" );
-
/* Initialize built-in window classes */
CLASS_RegisterBuiltinClasses();
Modified: vendor/wine/dlls/user32/current/winpos.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/winpos.c…
==============================================================================
--- vendor/wine/dlls/user32/current/winpos.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/winpos.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -1627,22 +1627,24 @@
{
/* make sure this popup stays above the owner */
- if (hwndInsertAfter != HWND_TOP && hwndInsertAfter != HWND_TOPMOST)
+ if (hwndInsertAfter != HWND_TOPMOST)
{
if (!(list = WIN_ListChildren( GetDesktopWindow() ))) return
hwndInsertAfter;
for (i = 0; list[i]; i++)
{
+ BOOL topmost = (GetWindowLongW( list[i], GWL_EXSTYLE ) &
WS_EX_TOPMOST) != 0;
+
if (list[i] == owner)
{
if (i > 0) hwndInsertAfter = list[i-1];
- else hwndInsertAfter = HWND_TOP;
+ else hwndInsertAfter = topmost ? HWND_TOPMOST : HWND_TOP;
break;
}
- if (hwndInsertAfter == HWND_NOTOPMOST)
+ if (hwndInsertAfter == HWND_TOP || hwndInsertAfter == HWND_NOTOPMOST)
{
- if (!(GetWindowLongW( list[i], GWL_EXSTYLE ) & WS_EX_TOPMOST))
break;
+ if (!topmost) break;
}
else if (list[i] == hwndInsertAfter) break;
}
Modified: vendor/wine/dlls/user32/current/winproc.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/winproc.…
==============================================================================
--- vendor/wine/dlls/user32/current/winproc.c [iso-8859-1] (original)
+++ vendor/wine/dlls/user32/current/winproc.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -1128,37 +1128,6 @@
return ret;
}
-static HICON alloc_icon_handle( unsigned int size )
-{
- struct user_object *obj = HeapAlloc( GetProcessHeap(), 0, sizeof(*obj) + size );
- if (!obj) return 0;
- return alloc_user_handle( obj, USER_ICON );
-}
-
-static struct tagCURSORICONINFO *get_icon_ptr( HICON handle )
-{
- struct user_object *obj = get_user_handle_ptr( handle, USER_ICON );
- if (obj == OBJ_OTHER_PROCESS)
- {
- WARN( "cursor handle %p from other process\n", handle );
- obj = NULL;
- }
- return obj ? (struct tagCURSORICONINFO *)(obj + 1) : NULL;
-}
-
-static void release_icon_ptr( HICON handle, struct tagCURSORICONINFO *ptr )
-{
- release_user_handle_ptr( (struct user_object *)ptr - 1 );
-}
-
-static int free_icon_handle( HICON handle )
-{
- struct user_object *obj = free_user_handle( handle, USER_ICON );
- HeapFree( GetProcessHeap(), 0, obj );
- return !obj;
-}
-
-
/**********************************************************************
* UserRegisterWowHandlers (USER32.@)
*
@@ -1180,6 +1149,8 @@
orig->alloc_winproc = WINPROC_AllocProc;
orig->get_dialog_info = DIALOG_get_info;
orig->dialog_box_loop = DIALOG_DoDialogBox;
+ orig->get_icon_param = get_icon_param;
+ orig->set_icon_param = set_icon_param;
wow_handlers = *new;
}
@@ -1197,8 +1168,5 @@
WIN_CreateWindowEx,
NULL, /* call_window_proc */
NULL, /* call_dialog_proc */
- alloc_icon_handle,
- get_icon_ptr,
- release_icon_ptr,
- free_icon_handle
+ NULL, /* free_icon_param */
};
Modified: vendor/wine/dlls/winex11.drv/current/dib.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/dib…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/dib.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/dib.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -371,7 +371,7 @@
}
else
for (i = start; i < end; i++, rgb++)
- colorMapping[i] = X11DRV_PALETTE_LookupPixel(RGB(rgb->rgbRed,
+ colorMapping[i] =
X11DRV_PALETTE_LookupPixel(physDev->color_shifts, RGB(rgb->rgbRed,
rgb->rgbGreen,
rgb->rgbBlue));
}
@@ -395,7 +395,7 @@
}
else
for (i = start; i < end; i++, rgb++)
- colorMapping[i] = X11DRV_PALETTE_LookupPixel(RGB(rgb->rgbtRed,
+ colorMapping[i] =
X11DRV_PALETTE_LookupPixel(physDev->color_shifts, RGB(rgb->rgbtRed,
rgb->rgbtGreen,
rgb->rgbtBlue));
}
Modified: vendor/wine/dlls/winex11.drv/current/ime.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/ime…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/ime.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/ime.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -87,7 +87,6 @@
static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lParam);
-static void UpdateDataInDefaultIMEWindow(HIMC hHIMC, HWND hwnd, BOOL showable);
static HIMC RealIMC(HIMC hIMC)
{
@@ -933,8 +932,6 @@
}
}
- UpdateDataInDefaultIMEWindow(hIMC, myPrivate->hwndDefault,FALSE);
-
GenerateIMEMessage(hIMC, WM_IME_COMPOSITION, wParam, flags);
ImmUnlockIMCC(lpIMC->hPrivate);
UnlockRealIMC(hIMC);
@@ -1049,9 +1046,22 @@
lpRead, dwReadLen);
}
-BOOL IME_NotifyIME(DWORD dwAction, DWORD dwIndex, DWORD dwValue)
-{
- return NotifyIME(FROM_X11, dwAction, dwIndex, dwValue);
+void IME_SetResultString(LPWSTR lpResult, DWORD dwResultLen)
+{
+ LPINPUTCONTEXT lpIMC;
+ HIMCC newCompStr;
+
+ lpIMC = LockRealIMC(FROM_X11);
+ if (lpIMC == NULL)
+ return;
+
+ newCompStr = updateResultStr(lpIMC->hCompStr, lpResult, dwResultLen);
+ ImmDestroyIMCC(lpIMC->hCompStr);
+ lpIMC->hCompStr = newCompStr;
+
+ GenerateIMEMessage(FROM_X11, WM_IME_COMPOSITION, 0, GCS_RESULTSTR);
+
+ UnlockRealIMC(FROM_X11);
}
/*****
@@ -1186,7 +1196,7 @@
UnlockRealIMC(hIMC);
}
-static void UpdateDataInDefaultIMEWindow(HIMC hIMC, HWND hwnd, BOOL showable)
+static void UpdateDefaultIMEWindow(HIMC hIMC, HWND hwnd)
{
LPCOMPOSITIONSTRING compstr;
LPINPUTCONTEXT lpIMC;
@@ -1202,14 +1212,16 @@
if (compstr == NULL || compstr->dwCompStrLen == 0)
ShowWindow(hwnd,SW_HIDE);
- else if (showable)
+ else
+ {
ShowWindow(hwnd,SW_SHOWNOACTIVATE);
-
- RedrawWindow(hwnd,NULL,NULL,RDW_ERASENOW|RDW_INVALIDATE);
+ RedrawWindow(hwnd, NULL, NULL, RDW_ERASENOW | RDW_INVALIDATE);
+ }
if (compstr != NULL)
ImmUnlockIMCC(lpIMC->hCompStr);
+ lpIMC->hWnd = GetFocus();
UnlockRealIMC(hIMC);
}
@@ -1242,21 +1254,13 @@
UnlockRealIMC(hIMC);
}
else
- UpdateDataInDefaultIMEWindow(hIMC,hwnd,TRUE);
+ UpdateDefaultIMEWindow(hIMC, hwnd);
}
static void DefaultIMEStartComposition(HIMC hIMC, HWND hwnd )
{
- LPINPUTCONTEXT lpIMC;
-
- lpIMC = LockRealIMC(hIMC);
- if (lpIMC == NULL)
- return;
-
TRACE("IME message WM_IME_STARTCOMPOSITION\n");
- lpIMC->hWnd = GetFocus();
- ShowWindow(hwnd,SW_SHOWNOACTIVATE);
- UnlockRealIMC(hIMC);
+ UpdateDefaultIMEWindow(hIMC, hwnd);
}
static LRESULT ImeHandleNotify(HIMC hIMC, HWND hwnd, UINT msg, WPARAM wParam,
Modified: vendor/wine/dlls/winex11.drv/current/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/key…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/keyboard.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/keyboard.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -1023,8 +1023,8 @@
/* function keys */
VK_F1, VK_F2,
VK_F3, VK_F4, VK_F5, VK_F6, VK_F7, VK_F8, VK_F9, VK_F10, /* FFC0 */
- VK_F11, VK_F12, VK_F13, VK_F14, VK_F15, VK_F16, 0, 0, /* FFC8 */
- 0, 0, 0, 0, 0, 0, 0, 0, /* FFD0 */
+ VK_F11, VK_F12, VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, /* FFC8 */
+ VK_F19, VK_F20, VK_F21, VK_F22, VK_F23, VK_F24, 0, 0, /* FFD0 */
0, 0, 0, 0, 0, 0, 0, 0, /* FFD8 */
/* modifier keys */
0, VK_LSHIFT, VK_RSHIFT, VK_LCONTROL, /* FFE0 */
@@ -1069,7 +1069,7 @@
/* function keys */
0x3B, 0x3C,
0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, /* FFC0 */
- 0x57, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FFC8 */
+ 0x57, 0x58, 0x5B, 0x5C, 0x5D, 0x00, 0x00, 0x00, /* FFC8 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FFD0 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FFD8 */
/* modifier keys */
@@ -1754,6 +1754,7 @@
e2.display = display;
e2.state = 0;
+ e2.type = KeyPress;
memset(keyc2vkey, 0, sizeof(keyc2vkey));
for (keyc = min_keycode; keyc <= max_keycode; keyc++)
@@ -2268,6 +2269,7 @@
e.display = display;
e.state = 0;
e.keycode = 0;
+ e.type = KeyPress;
wine_tsx11_lock();
Modified: vendor/wine/dlls/winex11.drv/current/palette.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/pal…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/palette.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/palette.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -1026,7 +1026,7 @@
/***********************************************************************
* X11DRV_PALETTE_LookupPixel
*/
-int X11DRV_PALETTE_LookupPixel(COLORREF color )
+int X11DRV_PALETTE_LookupPixel(ColorShifts *shifts, COLORREF color )
{
unsigned char spec_type = color >> 24;
@@ -1048,7 +1048,9 @@
}
else
{
- ColorShifts *shifts = &X11DRV_PALETTE_default_shifts;
+ /* No shifts are set in case of 1-bit */
+ if(!shifts) shifts = &X11DRV_PALETTE_default_shifts;
+
/* scale each individually and construct the TrueColor pixel value */
if (shifts->physicalRed.scale < 8)
red = red >> (8-shifts->physicalRed.scale);
@@ -1265,7 +1267,7 @@
}
else if ( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL )
{
- index = X11DRV_PALETTE_LookupPixel( RGB( entries[i].peRed,
entries[i].peGreen, entries[i].peBlue ));
+ index = X11DRV_PALETTE_LookupPixel( physDev->color_shifts, RGB(
entries[i].peRed, entries[i].peGreen, entries[i].peBlue ));
}
/* we have to map to existing entry in the system palette */
Modified: vendor/wine/dlls/winex11.drv/current/window.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/win…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/window.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/window.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -1277,8 +1277,8 @@
* Synchronize the X window position with the Windows one
*/
static void sync_window_position( Display *display, struct x11drv_win_data *data,
- UINT swp_flags, const RECT *old_client_rect,
- const RECT *old_whole_rect )
+ UINT swp_flags, const RECT *old_window_rect,
+ const RECT *old_whole_rect, const RECT *old_client_rect
)
{
DWORD style = GetWindowLongW( data->hwnd, GWL_STYLE );
XWindowChanges changes;
@@ -1329,10 +1329,13 @@
#ifdef HAVE_LIBXSHAPE
if (data->shaped)
{
- int x_offset = old_whole_rect->left - data->whole_rect.left;
- int y_offset = old_whole_rect->top - data->whole_rect.top;
- if (x_offset || y_offset)
- XShapeOffsetShape( display, data->whole_window, ShapeBounding, x_offset,
y_offset );
+ int old_x_offset = old_window_rect->left - old_whole_rect->left;
+ int old_y_offset = old_window_rect->top - old_whole_rect->top;
+ int new_x_offset = data->window_rect.left - data->whole_rect.left;
+ int new_y_offset = data->window_rect.top - data->whole_rect.top;
+ if (old_x_offset != new_x_offset || old_y_offset != new_y_offset)
+ XShapeOffsetShape( display, data->whole_window, ShapeBounding,
+ new_x_offset - old_x_offset, new_y_offset - old_y_offset
);
}
#endif
wine_tsx11_unlock();
@@ -1953,6 +1956,7 @@
escape.drawable_rect = virtual_screen_rect;
SetRect( &escape.dc_rect, 0, 0, virtual_screen_rect.right -
virtual_screen_rect.left,
virtual_screen_rect.bottom - virtual_screen_rect.top );
+ OffsetRect( &escape.dc_rect, -escape.drawable_rect.left,
-escape.drawable_rect.top );
escape.fbconfig_id = 0;
escape.gl_drawable = 0;
escape.pixmap = 0;
@@ -2097,7 +2101,7 @@
Display *display;
struct x11drv_win_data *data = X11DRV_get_win_data( hwnd );
DWORD new_style = GetWindowLongW( hwnd, GWL_STYLE );
- RECT old_whole_rect, old_client_rect;
+ RECT old_window_rect, old_whole_rect, old_client_rect;
int event_type;
if (!data) return;
@@ -2105,6 +2109,7 @@
thread_data = x11drv_thread_data();
display = thread_data->display;
+ old_window_rect = data->window_rect;
old_whole_rect = data->whole_rect;
old_client_rect = data->client_rect;
data->window_rect = *rectWindow;
@@ -2163,7 +2168,8 @@
/* don't change position if we are about to minimize or maximize a managed window
*/
if (!event_type &&
!(data->managed && (swp_flags & SWP_STATECHANGED) &&
(new_style & (WS_MINIMIZE|WS_MAXIMIZE))))
- sync_window_position( display, data, swp_flags, &old_client_rect,
&old_whole_rect );
+ sync_window_position( display, data, swp_flags,
+ &old_window_rect, &old_whole_rect,
&old_client_rect );
if ((new_style & WS_VISIBLE) &&
((new_style & WS_MINIMIZE) || is_window_rect_mapped( rectWindow )))
Modified: vendor/wine/dlls/winex11.drv/current/x11drv.h
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/x11…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/x11drv.h [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/x11drv.h [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -307,7 +307,7 @@
extern BOOL IME_SetCompositionString(DWORD dwIndex, LPCVOID lpComp,
DWORD dwCompLen, LPCVOID lpRead,
DWORD dwReadLen);
-extern BOOL IME_NotifyIME(DWORD dwAction, DWORD dwIndex, DWORD dwValue);
+extern void IME_SetResultString(LPWSTR lpResult, DWORD dwResultlen);
extern void X11DRV_XDND_EnterEvent( HWND hWnd, XClientMessageEvent *event );
extern void X11DRV_XDND_PositionEvent( HWND hWnd, XClientMessageEvent *event );
@@ -491,7 +491,7 @@
extern COLORREF X11DRV_PALETTE_ToLogical(X11DRV_PDEVICE *physDev, int pixel);
extern int X11DRV_PALETTE_ToPhysical(X11DRV_PDEVICE *physDev, COLORREF color);
-extern int X11DRV_PALETTE_LookupPixel(COLORREF color);
+extern int X11DRV_PALETTE_LookupPixel(ColorShifts *shifts, COLORREF color);
extern void X11DRV_PALETTE_ComputeColorShifts(ColorShifts *shifts, unsigned long redMask,
unsigned long greenMask, unsigned long blueMask);
extern unsigned int depth_to_bpp( unsigned int depth );
Modified: vendor/wine/dlls/winex11.drv/current/xim.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/xim…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/xim.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/xim.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -45,8 +45,6 @@
static DWORD dwCompStringLength = 0;
static LPBYTE CompositionString = NULL;
static DWORD dwCompStringSize = 0;
-static LPBYTE ResultString = NULL;
-static DWORD dwResultStringSize = 0;
#define STYLE_OFFTHESPOT (XIMPreeditArea | XIMStatusArea)
#define STYLE_OVERTHESPOT (XIMPreeditPosition | XIMStatusNothing)
@@ -60,118 +58,45 @@
static XIMStyle ximStyleRoot = 0;
static XIMStyle ximStyleRequest = STYLE_CALLBACK;
-static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset,
+static void X11DRV_ImmSetInternalString(DWORD dwOffset,
DWORD selLength, LPWSTR lpComp, DWORD dwCompLen)
{
/* Composition strings are edited in chunks */
unsigned int byte_length = dwCompLen * sizeof(WCHAR);
unsigned int byte_offset = dwOffset * sizeof(WCHAR);
unsigned int byte_selection = selLength * sizeof(WCHAR);
- BOOL rc = FALSE;
-
- TRACE("( %i, %i, %d, %p, %d):\n", dwOffset, selLength, dwIndex, lpComp,
dwCompLen );
-
- if (dwIndex == GCS_COMPSTR)
- {
- unsigned int i,j;
- LPBYTE ptr_new;
- LPBYTE ptr_old;
-
- if ((dwCompLen == 0) && (selLength == 0))
+ int byte_expansion = byte_length - byte_selection;
+ LPBYTE ptr_new;
+
+ TRACE("( %i, %i, %p, %d):\n", dwOffset, selLength, lpComp, dwCompLen );
+
+ if (byte_expansion + dwCompStringLength >= dwCompStringSize)
+ {
+ if (CompositionString)
+ ptr_new = HeapReAlloc(GetProcessHeap(), 0, CompositionString,
+ dwCompStringSize + byte_expansion);
+ else
+ ptr_new = HeapAlloc(GetProcessHeap(), 0,
+ dwCompStringSize + byte_expansion);
+
+ if (ptr_new == NULL)
{
- /* DO Nothing */
+ ERR("Couldn't expand composition string buffer\n");
+ return;
}
- /* deletion occurred */
- else if ((dwCompLen== 0) && (selLength != 0))
- {
- if (dwCompStringLength)
- {
- for (i = 0; i < byte_selection; i++)
- {
- if (byte_offset+byte_selection+i <
- dwCompStringLength)
- {
- CompositionString[byte_offset + i] =
- CompositionString[byte_offset + byte_selection + i];
- }
- else
- CompositionString[byte_offset + i] = 0;
- }
- /* clean up the end */
- dwCompStringLength -= byte_selection;
-
- i = dwCompStringLength;
- while (i < dwCompStringSize)
- {
- CompositionString[i++] = 0;
- }
- }
- }
- else
- {
- int byte_expansion = byte_length - byte_selection;
-
- if (byte_expansion + dwCompStringLength >= dwCompStringSize)
- {
- if (CompositionString)
- CompositionString =
- HeapReAlloc(GetProcessHeap(), 0,
- CompositionString,
- dwCompStringSize +
- byte_expansion);
- else
- CompositionString =
- HeapAlloc(GetProcessHeap(), 0, dwCompStringSize +
- byte_expansion);
-
- memset(&(CompositionString[dwCompStringSize]), 0,
- byte_expansion);
-
- dwCompStringSize += byte_expansion;
- }
-
- ptr_new = ((LPBYTE)lpComp);
- ptr_old = CompositionString + byte_offset + byte_selection;
-
- dwCompStringLength += byte_expansion;
-
- for (j=0,i = byte_offset; i < dwCompStringSize; i++)
- {
- if (j < byte_length)
- {
- CompositionString[i] = ptr_new[j++];
- }
- else
- {
- if (ptr_old < CompositionString + dwCompStringSize)
- {
- CompositionString[i] = *ptr_old;
- ptr_old++;
- }
- else
- CompositionString[i] = 0;
- }
- }
- }
-
- rc = IME_SetCompositionString(SCS_SETSTR, CompositionString,
- dwCompStringLength, NULL, 0);
- }
- else if ((dwIndex == GCS_RESULTSTR) && (lpComp) && (dwCompLen))
- {
- if (dwResultStringSize)
- HeapFree(GetProcessHeap(),0,ResultString);
- dwResultStringSize= byte_length;
- ResultString= HeapAlloc(GetProcessHeap(),0,byte_length);
- memcpy(ResultString,lpComp,byte_length);
-
- rc = IME_SetCompositionString(SCS_SETSTR, ResultString,
- dwResultStringSize, NULL, 0);
-
- IME_NotifyIME( NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
- }
-
- return rc;
+
+ CompositionString = ptr_new;
+ dwCompStringSize += byte_expansion;
+ }
+
+ ptr_new = CompositionString + byte_offset;
+ memmove(ptr_new + byte_length, ptr_new + byte_selection,
+ dwCompStringLength - byte_offset - byte_selection);
+ memcpy(ptr_new, lpComp, byte_length);
+ dwCompStringLength += byte_expansion;
+
+ IME_SetCompositionString(SCS_SETSTR, CompositionString,
+ dwCompStringLength, NULL, 0);
}
void X11DRV_XIMLookupChars( const char *str, DWORD count )
@@ -179,6 +104,8 @@
DWORD dwOutput;
WCHAR *wcOutput;
HWND focus;
+
+ TRACE("%p %u\n", str, count);
dwOutput = MultiByteToWideChar(CP_UNIXCP, 0, str, count, NULL, 0);
wcOutput = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * dwOutput);
@@ -189,35 +116,14 @@
if ((focus = GetFocus()))
IME_UpdateAssociation(focus);
- X11DRV_ImmSetInternalString(GCS_RESULTSTR,0,0,wcOutput,dwOutput);
+ IME_SetResultString(wcOutput, dwOutput);
HeapFree(GetProcessHeap(), 0, wcOutput);
}
-static void X11DRV_ImmSetOpenStatus(BOOL fOpen)
-{
- if (fOpen == FALSE)
- {
- if (dwCompStringSize)
- HeapFree(GetProcessHeap(),0,CompositionString);
-
- dwCompStringSize = 0;
- dwCompStringLength = 0;
- CompositionString = NULL;
-
- if (dwResultStringSize)
- HeapFree(GetProcessHeap(),0,ResultString);
-
- dwResultStringSize = 0;
- ResultString = NULL;
- }
-
- IME_SetOpenStatus(fOpen);
-}
-
static int XIMPreEditStartCallback(XIC ic, XPointer client_data, XPointer call_data)
{
TRACE("PreEditStartCallback %p\n",ic);
- X11DRV_ImmSetOpenStatus(TRUE);
+ IME_SetOpenStatus(TRUE);
ximInComposeMode = TRUE;
return -1;
}
@@ -226,7 +132,12 @@
{
TRACE("PreeditDoneCallback %p\n",ic);
ximInComposeMode = FALSE;
- X11DRV_ImmSetOpenStatus(FALSE);
+ if (dwCompStringSize)
+ HeapFree(GetProcessHeap(), 0, CompositionString);
+ dwCompStringSize = 0;
+ dwCompStringLength = 0;
+ CompositionString = NULL;
+ IME_SetOpenStatus(FALSE);
}
static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
@@ -258,20 +169,20 @@
/* ignore null */
dwOutput --;
- X11DRV_ImmSetInternalString (GCS_COMPSTR, sel, len, wcOutput,
dwOutput);
+ X11DRV_ImmSetInternalString (sel, len, wcOutput, dwOutput);
HeapFree(GetProcessHeap(), 0, wcOutput);
}
}
else
{
FIXME("wchar PROBIBILY WRONG\n");
- X11DRV_ImmSetInternalString (GCS_COMPSTR, sel, len,
+ X11DRV_ImmSetInternalString (sel, len,
(LPWSTR)P_DR->text->string.wide_char,
P_DR->text->length);
}
}
else
- X11DRV_ImmSetInternalString (GCS_COMPSTR, sel, len, NULL, 0);
+ X11DRV_ImmSetInternalString (sel, len, NULL, 0);
IME_SetCursorPos(P_DR->caret);
}
TRACE("Finished\n");
Modified: vendor/wine/dlls/winex11.drv/current/xrender.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/xre…
==============================================================================
--- vendor/wine/dlls/winex11.drv/current/xrender.c [iso-8859-1] (original)
+++ vendor/wine/dlls/winex11.drv/current/xrender.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -1852,28 +1852,30 @@
int x_offset = (xscale<0) ? width : 0;
int y_offset = (yscale<0) ? height : 0;
+ /* When we are using a mask, 'src_pict' contains a 1x1 picture for tiling,
the actual source data is in mask_pict.
+ * The 'src_pict' data effectively acts as an alpha channel to the tile data.
We need PictOpOver for correct rendering. */
+ int op = mask_pict ? PictOpOver : PictOpSrc;
+
/* When we need to scale we perform scaling and source_x / source_y translation using
a transformation matrix.
* This is needed because XRender is inaccurate in combination with scaled source
coordinates passed to XRenderComposite.
* In all other cases we do use XRenderComposite for translation as it is faster than
using a transformation matrix. */
if(xscale != 1.0 || yscale != 1.0)
{
- /* When we are using a mask, 'src_pict' contains a 1x1 picture for
tiling, the actual source data is in mask_pict */
if(mask_pict)
set_xrender_transformation(mask_pict, xscale, yscale, x_offset, y_offset);
else
set_xrender_transformation(src_pict, xscale, yscale, x_src + x_offset, y_src
+ y_offset);
- pXRenderComposite(gdi_display, PictOpSrc, src_pict, mask_pict, dst_pict, 0, 0, 0,
0, 0, 0, width, height);
+ pXRenderComposite(gdi_display, op, src_pict, mask_pict, dst_pict, 0, 0, 0, 0, 0,
0, width, height);
}
else
{
- /* When we are using a mask, 'src_pict' contains a 1x1 picture for
tiling, the actual source data is in mask_pict */
if(mask_pict)
set_xrender_transformation(mask_pict, 1, 1, 0, 0);
else
set_xrender_transformation(src_pict, 1, 1, 0, 0);
- pXRenderComposite(gdi_display, PictOpSrc, src_pict, mask_pict, dst_pict, x_src,
y_src, 0, 0, 0, 0, width, height);
+ pXRenderComposite(gdi_display, op, src_pict, mask_pict, dst_pict, x_src, y_src,
0, 0, 0, 0, width, height);
}
}
@@ -2166,7 +2168,7 @@
}
/* mono -> color */
- if(physDevSrc->depth == 1)
+ if(physDevSrc->depth == 1 && physDevDst->depth > 1)
{
XRenderColor col;
get_xrender_color(dst_format, physDevDst->textPixel, &col);
@@ -2189,7 +2191,7 @@
wine_tsx11_unlock();
LeaveCriticalSection( &xrender_cs );
}
- else /* color -> color but with different depths */
+ else /* color -> color (can be at different depths) or mono -> mono */
{
src_pict = get_xrender_picture_source(physDevSrc);
Modified: vendor/wine/server/current/registry.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/registry.c?re…
==============================================================================
--- vendor/wine/server/current/registry.c [iso-8859-1] (original)
+++ vendor/wine/server/current/registry.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -83,6 +83,7 @@
#define KEY_VOLATILE 0x0001 /* key is volatile (not saved to disk) */
#define KEY_DELETED 0x0002 /* key has been deleted */
#define KEY_DIRTY 0x0004 /* key has been modified */
+#define KEY_SYMLINK 0x0008 /* key is a symbolic link */
/* a key value */
struct key_value
@@ -107,7 +108,12 @@
static const timeout_t save_period = 30 * -TICKS_PER_SEC; /* delay between periodic
saves */
static struct timeout_user *save_timeout_user; /* saving timer */
+static const WCHAR root_name[] = {
'\\','R','e','g','i','s','t','r','y','\\'
};
+static const WCHAR symlink_value[] =
{'S','y','m','b','o','l','i','c','L','i','n','k','V','a','l','u','e'};
+static const struct unicode_str symlink_str = { symlink_value, sizeof(symlink_value) };
+
static void set_periodic_save_timer(void);
+static struct key_value *find_value( const struct key *key, const struct unicode_str
*name, int *index );
/* information about where to save a registry branch */
struct save_branch_info
@@ -240,13 +246,20 @@
int i;
if (key->flags & KEY_VOLATILE) return;
- /* save key if it has either some values or no subkeys */
+ /* save key if it has either some values or no subkeys, or needs special options */
/* keys with no values but subkeys are saved implicitly by saving the subkeys */
- if ((key->last_value >= 0) || (key->last_subkey == -1))
+ if ((key->last_value >= 0) || (key->last_subkey == -1) || key->class ||
(key->flags & KEY_SYMLINK))
{
fprintf( f, "\n[" );
if (key != base) dump_path( key, base, f );
fprintf( f, "] %u\n", (unsigned int)((key->modif -
ticks_1601_to_1970) / TICKS_PER_SEC) );
+ if (key->class)
+ {
+ fprintf( f, "#class=\"" );
+ dump_strW( key->class, key->classlen / sizeof(WCHAR), f,
"\"\"" );
+ fprintf( f, "\"\n" );
+ }
+ if (key->flags & KEY_SYMLINK) fputs( "#link\n", f );
for (i = 0; i <= key->last_value; i++) dump_value( &key->values[i],
f );
}
for (i = 0; i <= key->last_subkey; i++) save_subkeys( key->subkeys[i], base,
f );
@@ -351,8 +364,6 @@
/* get the request vararg as registry path */
static inline void get_req_path( struct unicode_str *str, int skip_root )
{
- static const WCHAR root_name[] = {
'\\','R','e','g','i','s','t','r','y','\\'
};
-
str->str = get_req_data();
str->len = (get_req_data_size() / sizeof(WCHAR)) * sizeof(WCHAR);
@@ -576,8 +587,38 @@
return NULL;
}
+/* follow a symlink and return the resolved key */
+static struct key *follow_symlink( struct key *key, int iteration )
+{
+ struct unicode_str path, token;
+ struct key_value *value;
+ int index;
+
+ if (iteration > 16) return NULL;
+ if (!(key->flags & KEY_SYMLINK)) return key;
+ if (!(value = find_value( key, &symlink_str, &index ))) return NULL;
+
+ path.str = value->data;
+ path.len = (value->len / sizeof(WCHAR)) * sizeof(WCHAR);
+ if (path.len <= sizeof(root_name)) return NULL;
+ if (memicmpW( path.str, root_name, sizeof(root_name)/sizeof(WCHAR) )) return NULL;
+ path.str += sizeof(root_name) / sizeof(WCHAR);
+ path.len -= sizeof(root_name);
+
+ key = root_key;
+ token.str = NULL;
+ if (!get_path_token( &path, &token )) return NULL;
+ while (token.len)
+ {
+ if (!(key = find_subkey( key, &token, &index ))) break;
+ if (!(key = follow_symlink( key, iteration + 1 ))) break;
+ get_path_token( &path, &token );
+ }
+ return key;
+}
+
/* open a subkey */
-static struct key *open_key( struct key *key, const struct unicode_str *name )
+static struct key *open_key( struct key *key, const struct unicode_str *name, unsigned
int attributes )
{
int index;
struct unicode_str token;
@@ -589,19 +630,31 @@
if (!(key = find_subkey( key, &token, &index )))
{
set_error( STATUS_OBJECT_NAME_NOT_FOUND );
- break;
+ return NULL;
}
get_path_token( name, &token );
- }
-
+ if (!token.len) break;
+ if (!(key = follow_symlink( key, 0 )))
+ {
+ set_error( STATUS_OBJECT_NAME_NOT_FOUND );
+ return NULL;
+ }
+ }
+
+ if (!(attributes & OBJ_OPENLINK) && !(key = follow_symlink( key, 0 )))
+ {
+ set_error( STATUS_OBJECT_NAME_NOT_FOUND );
+ return NULL;
+ }
if (debug_level > 1) dump_operation( key, NULL, "Open" );
- if (key) grab_object( key );
+ grab_object( key );
return key;
}
/* create a subkey */
static struct key *create_key( struct key *key, const struct unicode_str *name,
- const struct unicode_str *class, int flags, timeout_t
modif, int *created )
+ const struct unicode_str *class, int flags, unsigned int
options,
+ unsigned int attributes, timeout_t modif, int *created )
{
struct key *base;
int index;
@@ -622,12 +675,35 @@
if (!(subkey = find_subkey( key, &token, &index ))) break;
key = subkey;
get_path_token( name, &token );
+ if (!token.len) break;
+ if (!(subkey = follow_symlink( subkey, 0 )))
+ {
+ set_error( STATUS_OBJECT_NAME_NOT_FOUND );
+ return NULL;
+ }
}
/* create the remaining part */
- if (!token.len) goto done;
- if (!(flags & KEY_VOLATILE) && (key->flags & KEY_VOLATILE))
+ if (!token.len)
+ {
+ if (options & REG_OPTION_CREATE_LINK)
+ {
+ set_error( STATUS_OBJECT_NAME_COLLISION );
+ return NULL;
+ }
+ if (!(attributes & OBJ_OPENLINK) && !(key = follow_symlink( key, 0
)))
+ {
+ set_error( STATUS_OBJECT_NAME_NOT_FOUND );
+ return NULL;
+ }
+ goto done;
+ }
+ if (options & REG_OPTION_VOLATILE)
+ {
+ flags = (flags & ~KEY_DIRTY) | KEY_VOLATILE;
+ }
+ else if (key->flags & KEY_VOLATILE)
{
set_error( STATUS_CHILD_MUST_BE_VOLATILE );
return NULL;
@@ -648,6 +724,7 @@
return NULL;
}
}
+ if (options & REG_OPTION_CREATE_LINK) key->flags |= KEY_SYMLINK;
done:
if (debug_level > 1) dump_operation( key, NULL, "Create" );
@@ -875,6 +952,16 @@
value->data && !memcmp( value->data, data, len ))
{
if (debug_level > 1) dump_operation( key, value, "Skip setting"
);
+ return;
+ }
+ }
+
+ if (key->flags & KEY_SYMLINK)
+ {
+ if (type != REG_LINK || name->len != symlink_str.len ||
+ memicmpW( name->str, symlink_str.str, name->len / sizeof(WCHAR) ))
+ {
+ set_error( STATUS_ACCESS_DENIED );
return;
}
}
@@ -1140,7 +1227,29 @@
}
name.str = p;
name.len = len - (p - info->tmp + 1) * sizeof(WCHAR);
- return create_key( base, &name, NULL, flags, modif, &res );
+ return create_key( base, &name, NULL, flags, 0, 0, modif, &res );
+}
+
+/* load a key option from the input file */
+static int load_key_option( struct key *key, const char *buffer, struct file_load_info
*info )
+{
+ const char *p;
+ data_size_t len;
+
+ if (!strncmp( buffer, "#class=", 7 ))
+ {
+ p = buffer + 7;
+ if (*p++ != '"') return 0;
+ if (!get_file_tmp_space( info, strlen(p) * sizeof(WCHAR) )) return 0;
+ len = info->tmplen;
+ if (parse_strW( info->tmp, &len, p, '\"' ) == -1) return 0;
+ free( key->class );
+ if (!(key->class = memdup( info->tmp, len ))) len = 0;
+ key->classlen = len;
+ }
+ if (!strncmp( buffer, "#link", 5 )) key->flags |= KEY_SYMLINK;
+ /* ignore unknown options */
+ return 1;
}
/* parse a comma-separated list of hex digits */
@@ -1339,7 +1448,9 @@
if (subkey) load_value( subkey, p, &info );
else file_read_error( "Value without key", &info );
break;
- case '#': /* comment */
+ case '#': /* option */
+ if (subkey) load_key_option( subkey, p, &info );
+ break;
case ';': /* comment */
case 0: /* empty line */
break;
@@ -1448,7 +1559,7 @@
/* load system.reg into Registry\Machine */
- if (!(key = create_key( root_key, &HKLM_name, NULL, 0, current_time, &dummy
)))
+ if (!(key = create_key( root_key, &HKLM_name, NULL, 0, 0, 0, current_time,
&dummy )))
fatal_error( "could not create Machine registry key\n" );
load_init_registry_from_file( "system.reg", key );
@@ -1456,7 +1567,7 @@
/* load userdef.reg into Registry\User\.Default */
- if (!(key = create_key( root_key, &HKU_name, NULL, 0, current_time, &dummy
)))
+ if (!(key = create_key( root_key, &HKU_name, NULL, 0, 0, 0, current_time,
&dummy )))
fatal_error( "could not create User\\.Default registry key\n" );
load_init_registry_from_file( "userdef.reg", key );
@@ -1467,7 +1578,7 @@
/* FIXME: match default user in token.c. should get from process token instead */
current_user_path = format_user_registry_path( security_interactive_sid,
¤t_user_str );
if (!current_user_path ||
- !(key = create_key( root_key, ¤t_user_str, NULL, 0, current_time,
&dummy )))
+ !(key = create_key( root_key, ¤t_user_str, NULL, 0, 0, 0, current_time,
&dummy )))
fatal_error( "could not create HKEY_CURRENT_USER registry key\n" );
free( current_user_path );
load_init_registry_from_file( "user.reg", key );
@@ -1660,9 +1771,8 @@
/* NOTE: no access rights are required from the parent handle to create a key */
if ((parent = get_parent_hkey_obj( req->parent )))
{
- int flags = (req->options & REG_OPTION_VOLATILE) ? KEY_VOLATILE :
KEY_DIRTY;
-
- if ((key = create_key( parent, &name, &class, flags, current_time,
&reply->created )))
+ if ((key = create_key( parent, &name, &class, KEY_DIRTY,
req->options,
+ req->attributes, current_time, &reply->created
)))
{
reply->hkey = alloc_handle( current->process, key, access,
req->attributes );
release_object( key );
@@ -1683,7 +1793,7 @@
if ((parent = get_parent_hkey_obj( req->parent )))
{
get_req_path( &name, !req->parent );
- if ((key = open_key( parent, &name )))
+ if ((key = open_key( parent, &name, req->attributes )))
{
reply->hkey = alloc_handle( current->process, key, access,
req->attributes );
release_object( key );
@@ -1817,7 +1927,7 @@
{
int dummy;
get_req_path( &name, !req->hkey );
- if ((key = create_key( parent, &name, NULL, KEY_DIRTY, current_time,
&dummy )))
+ if ((key = create_key( parent, &name, NULL, KEY_DIRTY, 0, 0, current_time,
&dummy )))
{
load_registry( key, req->file );
release_object( key );
Modified: vendor/wine/server/current/trace.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/trace.c?rev=4…
==============================================================================
--- vendor/wine/server/current/trace.c [iso-8859-1] (original)
+++ vendor/wine/server/current/trace.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -822,7 +822,7 @@
{
if (size < sizeof(ACL))
{
- fprintf( stderr, "<invalid acl>}\n" );
+ fprintf( stderr, "<invalid acl>}" );
return;
}
size -= sizeof(ACL);
@@ -832,10 +832,7 @@
const SID *sid = NULL;
data_size_t sid_size = 0;
- if (size < sizeof(ACE_HEADER))
- return;
- if (size < ace->AceSize)
- return;
+ if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
size -= ace->AceSize;
if (i != 0) fputc( ',', stderr );
fprintf( stderr, "{AceType=" );
Modified: vendor/wine/server/current/window.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/window.c?rev=…
==============================================================================
--- vendor/wine/server/current/window.c [iso-8859-1] (original)
+++ vendor/wine/server/current/window.c [iso-8859-1] Sun Feb 21 11:51:40 2010
@@ -187,9 +187,17 @@
struct list *entry = win->parent->children.next;
if (!(win->ex_style & WS_EX_TOPMOST)) /* put it above the first
non-topmost window */
{
- while (entry != &win->parent->children &&
- LIST_ENTRY( entry, struct window, entry )->ex_style &
WS_EX_TOPMOST)
+ while (entry != &win->parent->children)
+ {
+ struct window *next = LIST_ENTRY( entry, struct window, entry );
+ if (!(next->ex_style & WS_EX_TOPMOST)) break;
+ if (next->handle == win->owner) /* keep it above owner */
+ {
+ win->ex_style |= WS_EX_TOPMOST;
+ break;
+ }
entry = entry->next;
+ }
}
list_add_before( entry, &win->entry );
}