Author: fireball
Date: Sun Feb 21 15:16:14 2010
New Revision: 45651
URL:
http://svn.reactos.org/svn/reactos?rev=45651&view=rev
Log:
- Sync up to Wine-1.1.39.
Modified:
branches/arwinss/reactos/dll/win32/gdi32/ (props changed)
branches/arwinss/reactos/dll/win32/gdi32/clipping.c
branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c
branches/arwinss/reactos/dll/win32/user32/ (props changed)
branches/arwinss/reactos/dll/win32/user32/controls.h
branches/arwinss/reactos/dll/win32/user32/cursoricon.c
branches/arwinss/reactos/dll/win32/user32/defdlg.c
branches/arwinss/reactos/dll/win32/user32/defwnd.c
branches/arwinss/reactos/dll/win32/user32/dialog.c
branches/arwinss/reactos/dll/win32/user32/edit.c
branches/arwinss/reactos/dll/win32/user32/user_main.c
branches/arwinss/reactos/dll/win32/user32/winpos.c
branches/arwinss/reactos/dll/win32/user32/winproc.c
branches/arwinss/reactos/dll/win32/winex11.drv/ (props changed)
branches/arwinss/reactos/dll/win32/winex11.drv/dib.c
branches/arwinss/reactos/dll/win32/winex11.drv/ime.c
branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c
branches/arwinss/reactos/dll/win32/winex11.drv/palette.c
branches/arwinss/reactos/dll/win32/winex11.drv/window.c
branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h
branches/arwinss/reactos/dll/win32/winex11.drv/xim.c
branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c
branches/arwinss/reactos/subsystems/win32/win32k/wine/ (props changed)
branches/arwinss/reactos/subsystems/win32/win32k/wine/window.c
Propchange: branches/arwinss/reactos/dll/win32/gdi32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 15:16:14 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/gdi32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/gdi32:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539
-/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455
+/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646
Modified: branches/arwinss/reactos/dll/win32/gdi32/clipping.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/clipping.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/clipping.c [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c [iso-8859-1] Sun Feb 21 15:16:14
2010
@@ -580,9 +580,6 @@
if (reason != DLL_PROCESS_ATTACH) return TRUE;
DisableThreadLibraryCalls( inst );
-#ifndef __REACTOS__
- LoadLibraryA( "gdi.exe16" );
-#endif
WineEngInit();
/* create stock objects */
Propchange: branches/arwinss/reactos/dll/win32/user32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 15:16:14 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/user32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/user32:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539
-/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455
+/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646
Modified: branches/arwinss/reactos/dll/win32/user32/controls.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/controls.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/controls.h [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/user32/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] Sun Feb 21
15:16:14 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: branches/arwinss/reactos/dll/win32/user32/defdlg.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/defdlg.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/defdlg.c [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/user32/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/defwnd.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/defwnd.c [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/user32/dialog.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/dialog.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/dialog.c [iso-8859-1] Sun Feb 21 15:16:14
2010
@@ -348,10 +348,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;
@@ -671,7 +671,6 @@
dlgInfo->hMenu = hMenu;
dlgInfo->xBaseUnit = xBaseUnit;
dlgInfo->yBaseUnit = yBaseUnit;
- dlgInfo->idResult = IDOK;
dlgInfo->flags = flags;
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
Modified: branches/arwinss/reactos/dll/win32/user32/edit.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] Sun Feb 21 15:16:14
2010
@@ -169,6 +169,7 @@
(LPARAM)(es->hwndSelf)); \
} while(0)
+static const WCHAR empty_stringW[] = {0};
/*********************************************************************
*
@@ -2876,8 +2877,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();
}
@@ -2919,8 +2919,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;
@@ -3672,7 +3670,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;
}
@@ -4932,7 +4928,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: branches/arwinss/reactos/dll/win32/user32/user_main.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/user_main.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/user_main.c [iso-8859-1] Sun Feb 21 15:16:14
2010
@@ -287,10 +287,6 @@
/* Setup palette function pointers */
palette_init();
-#ifndef __REACTOS__
- LoadLibraryA( "user.exe16" );
-#endif
-
/* Initialize built-in window classes */
CLASS_RegisterBuiltinClasses();
Modified: branches/arwinss/reactos/dll/win32/user32/winpos.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/winpos.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/winpos.c [iso-8859-1] Sun Feb 21 15:16:14
2010
@@ -1628,22 +1628,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: branches/arwinss/reactos/dll/win32/user32/winproc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/winproc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/winproc.c [iso-8859-1] Sun Feb 21 15:16:14
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 */
};
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 15:16:14 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/winex11.drv:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/winex11.drv:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539
-/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455
+/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/dib.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/dib.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/dib.c [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/winex11.drv/ime.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/ime.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/ime.c [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c [iso-8859-1] Sun Feb 21
15:16:14 2010
@@ -1024,8 +1024,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 */
@@ -1070,7 +1070,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 */
@@ -1755,6 +1755,7 @@
e2.display = display;
e2.state = 0;
+ e2.type = KeyPress;
memset(keyc2vkey, 0, sizeof(keyc2vkey));
for (keyc = min_keycode; keyc <= max_keycode; keyc++)
@@ -2269,6 +2270,7 @@
e.display = display;
e.state = 0;
e.keycode = 0;
+ e.type = KeyPress;
wine_tsx11_lock();
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/palette.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/palette.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/palette.c [iso-8859-1] Sun Feb 21
15:16:14 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: branches/arwinss/reactos/dll/win32/winex11.drv/window.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] Sun Feb 21
15:16:14 2010
@@ -1278,8 +1278,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;
@@ -1330,10 +1330,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();
@@ -1954,6 +1957,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;
@@ -2098,7 +2102,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;
@@ -2106,6 +2110,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;
@@ -2164,7 +2169,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: branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h [iso-8859-1] Sun Feb 21
15:16:14 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: branches/arwinss/reactos/dll/win32/winex11.drv/xim.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/xim.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/xim.c [iso-8859-1] Sun Feb 21 15:16:14
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: branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [iso-8859-1] Sun Feb 21
15:16:14 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);
Propchange: branches/arwinss/reactos/subsystems/win32/win32k/wine/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 15:16:14 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/wine:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/subsystems/win32/win32k/wine:42000-43126,43669-44999,45011,45097-45099,45319,45418-45419,45535-45539
-/vendor/wine/server/current:43708,44715,45044,45206
+/vendor/wine/server/current:43708,44715,45044,45206,45646
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/window.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/window.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/window.c [iso-8859-1] Sun Feb 21
15:16:14 2010
@@ -178,9 +178,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 );
}