[ros-diffs] [fireball] 45456: - Sync up to Wine-1.1.38.

fireball at svn.reactos.org fireball at svn.reactos.org
Sat Feb 6 11:18:44 CET 2010


Author: fireball
Date: Sat Feb  6 11:18:44 2010
New Revision: 45456

URL: http://svn.reactos.org/svn/reactos?rev=45456&view=rev
Log:
- Sync up to Wine-1.1.38.

Modified:
    branches/arwinss/reactos/dll/win32/gdi32/   (props changed)
    branches/arwinss/reactos/dll/win32/gdi32/gdi32.spec
    branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c
    branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c
    branches/arwinss/reactos/dll/win32/user32/   (props changed)
    branches/arwinss/reactos/dll/win32/user32/class.c
    branches/arwinss/reactos/dll/win32/user32/combo.c
    branches/arwinss/reactos/dll/win32/user32/controls.h
    branches/arwinss/reactos/dll/win32/user32/cursoricon.c
    branches/arwinss/reactos/dll/win32/user32/defwnd.c
    branches/arwinss/reactos/dll/win32/user32/dialog.c
    branches/arwinss/reactos/dll/win32/user32/hook.c
    branches/arwinss/reactos/dll/win32/user32/message.c
    branches/arwinss/reactos/dll/win32/user32/misc.c
    branches/arwinss/reactos/dll/win32/user32/msgbox.c
    branches/arwinss/reactos/dll/win32/user32/property.c
    branches/arwinss/reactos/dll/win32/user32/resource.c
    branches/arwinss/reactos/dll/win32/user32/win.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/window.c

Propchange: branches/arwinss/reactos/dll/win32/gdi32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb  6 11:18:44 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,45097-45099,45319
-/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206
+/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455

Modified: branches/arwinss/reactos/dll/win32/gdi32/gdi32.spec
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32/gdi32.spec?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/gdi32.spec [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/gdi32.spec [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -319,7 +319,7 @@
 @ stdcall GdiGetSpoolMessage(ptr long ptr long)
 @ stdcall GdiGradientFill(long ptr long ptr long long) 
 @ stdcall GdiInitSpool()
-@ stub GdiInitializeLanguagePack
+@ stdcall GdiInitializeLanguagePack(long)
 @ stdcall GdiIsMetaFileDC(long)
 @ stdcall GdiIsMetaPrintDC(long)
 @ stdcall GdiIsPlayMetafileDC(long)

Modified: branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/gdiobj.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -1167,6 +1167,14 @@
     /* Nothing to do */
 }
 
+/***********************************************************************
+ *           GdiInitializeLanguagePack    (GDI32.@)
+ */
+DWORD WINAPI GdiInitializeLanguagePack( DWORD arg )
+{
+    FIXME("stub\n");
+    return 0;
+}
 
 /***********************************************************************
  *           GdiFlush    (GDI32.@)
@@ -1202,7 +1210,7 @@
  */
 BOOL WINAPI GetColorAdjustment(HDC hdc, LPCOLORADJUSTMENT lpca)
 {
-        FIXME("GetColorAdjustment, stub\n");
+        FIXME("stub\n");
         return 0;
 }
 
@@ -1231,6 +1239,6 @@
  */
 BOOL WINAPI SetColorAdjustment(HDC hdc, const COLORADJUSTMENT* lpca)
 {
-        FIXME("SetColorAdjustment, stub\n");
+        FIXME("stub\n");
         return 0;
 }

Modified: branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -365,6 +365,7 @@
     char buffer[sizeof(METARECORD) - 2 + sizeof(LOGFONT16)];
     METARECORD *mr = (METARECORD *)&buffer;
     LOGFONT16 *font16;
+    INT written;
 
     mr->rdSize = (sizeof(METARECORD) + sizeof(LOGFONT16) - 2) / 2;
     mr->rdFunction = META_CREATEFONTINDIRECT;
@@ -383,8 +384,9 @@
     font16->lfClipPrecision  = logfont->lfClipPrecision;
     font16->lfQuality        = logfont->lfQuality;
     font16->lfPitchAndFamily = logfont->lfPitchAndFamily;
-    WideCharToMultiByte( CP_ACP, 0, logfont->lfFaceName, -1, font16->lfFaceName, LF_FACESIZE, NULL, NULL );
-    font16->lfFaceName[LF_FACESIZE-1] = 0;
+    written = WideCharToMultiByte( CP_ACP, 0, logfont->lfFaceName, -1, font16->lfFaceName, LF_FACESIZE - 1, NULL, NULL );
+    /* Zero pad the facename buffer, so that we don't write uninitialized data to disk */
+    memset(font16->lfFaceName + written, 0, LF_FACESIZE - written);
 
     if (!(MFDRV_WriteRecord( dev, mr, mr->rdSize * 2)))
         return 0;

Propchange: branches/arwinss/reactos/dll/win32/user32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb  6 11:18:44 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,45097-45099,45319
-/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206
+/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455

Modified: branches/arwinss/reactos/dll/win32/user32/class.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/class.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/class.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/class.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -176,7 +176,7 @@
  */
 static inline LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
 {
-    if (!HIWORD(classPtr->menuName)) return (LPSTR)classPtr->menuName;
+    if (IS_INTRESOURCE(classPtr->menuName)) return (LPSTR)classPtr->menuName;
     return (LPSTR)(classPtr->menuName + strlenW(classPtr->menuName) + 1);
 }
 
@@ -199,8 +199,8 @@
  */
 static void CLASS_SetMenuNameA( CLASS *classPtr, LPCSTR name )
 {
-    if (HIWORD(classPtr->menuName)) HeapFree( GetProcessHeap(), 0, classPtr->menuName );
-    if (HIWORD(name))
+    if (!IS_INTRESOURCE(classPtr->menuName)) HeapFree( GetProcessHeap(), 0, classPtr->menuName );
+    if (!IS_INTRESOURCE(name))
     {
         DWORD lenA = strlen(name) + 1;
         DWORD lenW = MultiByteToWideChar( CP_ACP, 0, name, lenA, NULL, 0 );
@@ -219,8 +219,8 @@
  */
 static void CLASS_SetMenuNameW( CLASS *classPtr, LPCWSTR name )
 {
-    if (HIWORD(classPtr->menuName)) HeapFree( GetProcessHeap(), 0, classPtr->menuName );
-    if (HIWORD(name))
+    if (!IS_INTRESOURCE(classPtr->menuName)) HeapFree( GetProcessHeap(), 0, classPtr->menuName );
+    if (!IS_INTRESOURCE(name))
     {
         DWORD lenW = strlenW(name) + 1;
         DWORD lenA = WideCharToMultiByte( CP_ACP, 0, name, lenW, NULL, 0, NULL, NULL );

Modified: branches/arwinss/reactos/dll/win32/user32/combo.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/combo.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/combo.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/combo.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -1910,8 +1910,14 @@
 	case WM_GETFONT:
 		return  (LRESULT)lphc->hFont;
 	case WM_SETFOCUS:
-		if( lphc->wState & CBF_EDIT )
-		    SetFocus( lphc->hWndEdit );
+               if( lphc->wState & CBF_EDIT ) {
+                   SetFocus( lphc->hWndEdit );
+                   /* The first time focus is received, select all the text */
+                   if( !(lphc->wState & CBF_BEENFOCUSED) ) {
+                       SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, -1);
+                       lphc->wState |= CBF_BEENFOCUSED;
+                   }
+               }
 		else
 		    COMBO_SetFocus( lphc );
 		return  TRUE;

Modified: branches/arwinss/reactos/dll/win32/user32/controls.h
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/controls.h?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/controls.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/controls.h [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -199,6 +199,7 @@
 #define CBF_SELCHANGE           0x0400
 #define CBF_NOEDITNOTIFY        0x1000
 #define CBF_NOLBSELECT          0x2000  /* do not change current selection */
+#define CBF_BEENFOCUSED         0x4000  /* has it ever had focus           */
 #define CBF_EUI                 0x8000
 
 /* combo state struct */

Modified: branches/arwinss/reactos/dll/win32/user32/cursoricon.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/cursoricon.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -2467,7 +2467,7 @@
     HANDLE res;
     LPWSTR u_name;
 
-    if (!HIWORD(name))
+    if (IS_INTRESOURCE(name))
         return LoadImageW(hinst, (LPCWSTR)name, type, desiredx, desiredy, loadflags);
 
     __TRY {

Modified: branches/arwinss/reactos/dll/win32/user32/defwnd.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/defwnd.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/defwnd.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/defwnd.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -563,7 +563,7 @@
         else if( wParam == VK_F10 )
         {
             if (GetKeyState(VK_SHIFT) & 0x8000)
-                SendMessageW( hwnd, WM_CONTEXTMENU, (WPARAM)hwnd, MAKELPARAM(-1, -1) );
+                SendMessageW( hwnd, WM_CONTEXTMENU, (WPARAM)hwnd, -1 );
             iF10Key = 1;
         }
         else if( wParam == VK_ESCAPE && (GetKeyState(VK_SHIFT) & 0x8000))
@@ -835,7 +835,7 @@
             CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam;
             /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
              * may have child window IDs instead of window name */
-            if (HIWORD(cs->lpszName))
+            if (!IS_INTRESOURCE(cs->lpszName))
                 DEFWND_SetTextA( hwnd, cs->lpszName );
             result = 1;
         }
@@ -982,7 +982,7 @@
             CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam;
             /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
              * may have child window IDs instead of window name */
-            if (HIWORD(cs->lpszName))
+            if (!IS_INTRESOURCE(cs->lpszName))
                 DEFWND_SetTextW( hwnd, cs->lpszName );
             result = 1;
         }

Modified: branches/arwinss/reactos/dll/win32/user32/dialog.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/dialog.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/dialog.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/dialog.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -287,14 +287,14 @@
             LPSTR class_tmp = NULL;
             LPSTR caption_tmp = NULL;
 
-            if (HIWORD(class))
+            if (!IS_INTRESOURCE(class))
             {
                 DWORD len = WideCharToMultiByte( CP_ACP, 0, info.className, -1, NULL, 0, NULL, NULL );
                 class_tmp = HeapAlloc( GetProcessHeap(), 0, len );
                 WideCharToMultiByte( CP_ACP, 0, info.className, -1, class_tmp, len, NULL, NULL );
                 class = class_tmp;
             }
-            if (HIWORD(caption))
+            if (!IS_INTRESOURCE(caption))
             {
                 DWORD len = WideCharToMultiByte( CP_ACP, 0, info.windowName, -1, NULL, 0, NULL, NULL );
                 caption_tmp = HeapAlloc( GetProcessHeap(), 0, len );
@@ -633,14 +633,14 @@
         LPSTR class_tmp = NULL;
         LPSTR caption_tmp = NULL;
 
-        if (HIWORD(class))
+        if (!IS_INTRESOURCE(class))
         {
             DWORD len = WideCharToMultiByte( CP_ACP, 0, template.className, -1, NULL, 0, NULL, NULL );
             class_tmp = HeapAlloc( GetProcessHeap(), 0, len );
             WideCharToMultiByte( CP_ACP, 0, template.className, -1, class_tmp, len, NULL, NULL );
             class = class_tmp;
         }
-        if (HIWORD(caption))
+        if (!IS_INTRESOURCE(caption))
         {
             DWORD len = WideCharToMultiByte( CP_ACP, 0, template.caption, -1, NULL, 0, NULL, NULL );
             caption_tmp = HeapAlloc( GetProcessHeap(), 0, len );

Modified: branches/arwinss/reactos/dll/win32/user32/hook.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/hook.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/hook.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/hook.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -222,12 +222,12 @@
         cbtcwW.hwndInsertAfter = cbtcwA->hwndInsertAfter;
         csW = *(CREATESTRUCTW *)cbtcwA->lpcs;
 
-        if (HIWORD(cbtcwA->lpcs->lpszName))
+        if (!IS_INTRESOURCE(cbtcwA->lpcs->lpszName))
         {
             RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszName);
             csW.lpszName = nameW = usBuffer.Buffer;
         }
-        if (HIWORD(cbtcwA->lpcs->lpszClass))
+        if (!IS_INTRESOURCE(cbtcwA->lpcs->lpszClass))
         {
             RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszClass);
             csW.lpszClass = classW = usBuffer.Buffer;
@@ -262,14 +262,14 @@
         cbtcwA.hwndInsertAfter = cbtcwW->hwndInsertAfter;
         csA = *(CREATESTRUCTA *)cbtcwW->lpcs;
 
-        if (HIWORD(cbtcwW->lpcs->lpszName)) {
+        if (!IS_INTRESOURCE(cbtcwW->lpcs->lpszName)) {
             len = WideCharToMultiByte( CP_ACP, 0, cbtcwW->lpcs->lpszName, -1, NULL, 0, NULL, NULL );
             nameA = HeapAlloc( GetProcessHeap(), 0, len*sizeof(CHAR) );
             WideCharToMultiByte( CP_ACP, 0, cbtcwW->lpcs->lpszName, -1, nameA, len, NULL, NULL );
             csA.lpszName = nameA;
         }
 
-        if (HIWORD(cbtcwW->lpcs->lpszClass)) {
+        if (!IS_INTRESOURCE(cbtcwW->lpcs->lpszClass)) {
             len = WideCharToMultiByte( CP_ACP, 0, cbtcwW->lpcs->lpszClass, -1, NULL, 0, NULL, NULL );
             classA = HeapAlloc( GetProcessHeap(), 0, len*sizeof(CHAR) );
             WideCharToMultiByte( CP_ACP, 0, cbtcwW->lpcs->lpszClass, -1, classA, len, NULL, NULL );

Modified: branches/arwinss/reactos/dll/win32/user32/message.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/message.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -546,8 +546,8 @@
     {
         CREATESTRUCTW *cs = (CREATESTRUCTW *)lparam;
         push_data( data, cs, sizeof(*cs) );
-        if (HIWORD(cs->lpszName)) push_string( data, cs->lpszName );
-        if (HIWORD(cs->lpszClass)) push_string( data, cs->lpszClass );
+        if (!IS_INTRESOURCE(cs->lpszName)) push_string( data, cs->lpszName );
+        if (!IS_INTRESOURCE(cs->lpszClass)) push_string( data, cs->lpszClass );
         return sizeof(*cs);
     }
     case WM_GETTEXT:
@@ -690,8 +690,8 @@
     {
         MDICREATESTRUCTW *cs = (MDICREATESTRUCTW *)lparam;
         push_data( data, cs, sizeof(*cs) );
-        if (HIWORD(cs->szTitle)) push_string( data, cs->szTitle );
-        if (HIWORD(cs->szClass)) push_string( data, cs->szClass );
+        if (!IS_INTRESOURCE(cs->szTitle)) push_string( data, cs->szTitle );
+        if (!IS_INTRESOURCE(cs->szClass)) push_string( data, cs->szClass );
         return sizeof(*cs);
     }
     case WM_MDIGETACTIVE:
@@ -785,14 +785,14 @@
         WCHAR *str = (WCHAR *)(cs + 1);
         if (size < sizeof(*cs)) return FALSE;
         size -= sizeof(*cs);
-        if (HIWORD(cs->lpszName))
+        if (!IS_INTRESOURCE(cs->lpszName))
         {
             if (!check_string( str, size )) return FALSE;
             cs->lpszName = str;
             size -= (strlenW(str) + 1) * sizeof(WCHAR);
             str += strlenW(str) + 1;
         }
-        if (HIWORD(cs->lpszClass))
+        if (!IS_INTRESOURCE(cs->lpszClass))
         {
             if (!check_string( str, size )) return FALSE;
             cs->lpszClass = str;
@@ -957,14 +957,14 @@
         WCHAR *str = (WCHAR *)(cs + 1);
         if (size < sizeof(*cs)) return FALSE;
         size -= sizeof(*cs);
-        if (HIWORD(cs->szTitle))
+        if (!IS_INTRESOURCE(cs->szTitle))
         {
             if (!check_string( str, size )) return FALSE;
             cs->szTitle = str;
             size -= (strlenW(str) + 1) * sizeof(WCHAR);
             str += strlenW(str) + 1;
         }
-        if (HIWORD(cs->szClass))
+        if (!IS_INTRESOURCE(cs->szClass))
         {
             if (!check_string( str, size )) return FALSE;
             cs->szClass = str;

Modified: branches/arwinss/reactos/dll/win32/user32/misc.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/misc.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/misc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/misc.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -259,6 +259,8 @@
 static const WCHAR primary_device_name[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
 static const WCHAR primary_device_string[] = {'X','1','1',' ','W','i','n','d','o','w','i','n','g',' ',
                                               'S','y','s','t','e','m',0};
+static const WCHAR primary_device_deviceid[] = {'P','C','I','\\','V','E','N','_','0','0','0','0','&',
+                                                'D','E','V','_','0','0','0','0',0};
 
 /***********************************************************************
  *		EnumDisplayDevicesA (USER32.@)
@@ -313,7 +315,7 @@
         DISPLAY_DEVICE_VGA_COMPATIBLE;
 
     if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceID) + sizeof(lpDisplayDevice->DeviceID))
-        lpDisplayDevice->DeviceID[0] = 0;
+        memcpy(lpDisplayDevice->DeviceID, primary_device_deviceid, sizeof(primary_device_deviceid));
     if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceKey) + sizeof(lpDisplayDevice->DeviceKey))
         lpDisplayDevice->DeviceKey[0] = 0;
 

Modified: branches/arwinss/reactos/dll/win32/user32/msgbox.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/msgbox.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/msgbox.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/msgbox.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -92,7 +92,7 @@
     /* set text font */
     SendDlgItemMessageW (hwnd, MSGBOX_IDTEXT, WM_SETFONT, (WPARAM)hFont, 0);
 
-    if (HIWORD(lpmb->lpszCaption)) {
+    if (!IS_INTRESOURCE(lpmb->lpszCaption)) {
        SetWindowTextW(hwnd, lpmb->lpszCaption);
     } else {
         UINT len = LoadStringW( lpmb->hInstance, LOWORD(lpmb->lpszCaption), (LPWSTR)&ptr, 0 );
@@ -107,9 +107,7 @@
             buffer = NULL;
         }
     }
-    if (HIWORD(lpmb->lpszText)) {
-       lpszText = lpmb->lpszText;
-    } else {
+    if (IS_INTRESOURCE(lpmb->lpszText)) {
         UINT len = LoadStringW( lpmb->hInstance, LOWORD(lpmb->lpszText), (LPWSTR)&ptr, 0 );
         lpszText = buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) );
         if (buffer)
@@ -117,6 +115,8 @@
             memcpy( buffer, ptr, len * sizeof(WCHAR) );
             buffer[len] = 0;
         }
+    } else {
+       lpszText = lpmb->lpszText;
     }
 
     TRACE_(msgbox)("%s\n", debugstr_w(lpszText));
@@ -460,21 +460,21 @@
     UNICODE_STRING textW, captionW, iconW;
     int ret;
 
-    if (HIWORD(msgbox->lpszText))
+    if (IS_INTRESOURCE(msgbox->lpszText))
+        textW.Buffer = (LPWSTR)msgbox->lpszText;
+    else
         RtlCreateUnicodeStringFromAsciiz(&textW, msgbox->lpszText);
+    if (IS_INTRESOURCE(msgbox->lpszCaption))
+        captionW.Buffer = (LPWSTR)msgbox->lpszCaption;
     else
-        textW.Buffer = (LPWSTR)msgbox->lpszText;
-    if (HIWORD(msgbox->lpszCaption))
         RtlCreateUnicodeStringFromAsciiz(&captionW, msgbox->lpszCaption);
-    else
-        captionW.Buffer = (LPWSTR)msgbox->lpszCaption;
 
     if (msgbox->dwStyle & MB_USERICON)
     {
-        if (HIWORD(msgbox->lpszIcon))
+        if (IS_INTRESOURCE(msgbox->lpszIcon))
+            iconW.Buffer = (LPWSTR)msgbox->lpszIcon;
+        else
             RtlCreateUnicodeStringFromAsciiz(&iconW, msgbox->lpszIcon);
-        else
-            iconW.Buffer = (LPWSTR)msgbox->lpszIcon;
     }
     else
         iconW.Buffer = NULL;
@@ -492,9 +492,9 @@
 
     ret = MessageBoxIndirectW(&msgboxW);
 
-    if (HIWORD(textW.Buffer)) RtlFreeUnicodeString(&textW);
-    if (HIWORD(captionW.Buffer)) RtlFreeUnicodeString(&captionW);
-    if (HIWORD(iconW.Buffer)) RtlFreeUnicodeString(&iconW);
+    if (!IS_INTRESOURCE(textW.Buffer)) RtlFreeUnicodeString(&textW);
+    if (!IS_INTRESOURCE(captionW.Buffer)) RtlFreeUnicodeString(&captionW);
+    if (!IS_INTRESOURCE(iconW.Buffer)) RtlFreeUnicodeString(&iconW);
     return ret;
 }
 

Modified: branches/arwinss/reactos/dll/win32/user32/property.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/property.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/property.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/property.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -119,7 +119,7 @@
 {
     WCHAR buffer[ATOM_BUFFER_SIZE];
 
-    if (!HIWORD(str)) return GetPropW( hwnd, (LPCWSTR)str );
+    if (IS_INTRESOURCE(str)) return GetPropW( hwnd, (LPCWSTR)str );
     if (!MultiByteToWideChar( CP_ACP, 0, str, -1, buffer, ATOM_BUFFER_SIZE )) return 0;
     return GetPropW( hwnd, buffer );
 }
@@ -135,7 +135,7 @@
     SERVER_START_REQ( get_window_property )
     {
         req->window = wine_server_user_handle( hwnd );
-        if (!HIWORD(str)) req->atom = LOWORD(str);
+        if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
         else wine_server_add_data( req, str, strlenW(str) * sizeof(WCHAR) );
         if (!wine_server_call_err( req )) ret = reply->data;
     }
@@ -151,7 +151,7 @@
 {
     WCHAR buffer[ATOM_BUFFER_SIZE];
 
-    if (!HIWORD(str)) return SetPropW( hwnd, (LPCWSTR)str, handle );
+    if (IS_INTRESOURCE(str)) return SetPropW( hwnd, (LPCWSTR)str, handle );
     if (!MultiByteToWideChar( CP_ACP, 0, str, -1, buffer, ATOM_BUFFER_SIZE )) return FALSE;
     return SetPropW( hwnd, buffer, handle );
 }
@@ -168,7 +168,7 @@
     {
         req->window = wine_server_user_handle( hwnd );
         req->data   = (ULONG_PTR)handle;
-        if (!HIWORD(str)) req->atom = LOWORD(str);
+        if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
         else wine_server_add_data( req, str, strlenW(str) * sizeof(WCHAR) );
         ret = !wine_server_call_err( req );
     }
@@ -184,7 +184,7 @@
 {
     WCHAR buffer[ATOM_BUFFER_SIZE];
 
-    if (!HIWORD(str)) return RemovePropW( hwnd, (LPCWSTR)str );
+    if (IS_INTRESOURCE(str)) return RemovePropW( hwnd, (LPCWSTR)str );
     if (!MultiByteToWideChar( CP_ACP, 0, str, -1, buffer, ATOM_BUFFER_SIZE )) return 0;
     return RemovePropW( hwnd, buffer );
 }
@@ -200,7 +200,7 @@
     SERVER_START_REQ( remove_window_property )
     {
         req->window = wine_server_user_handle( hwnd );
-        if (!HIWORD(str)) req->atom = LOWORD(str);
+        if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
         else wine_server_add_data( req, str, strlenW(str) * sizeof(WCHAR) );
         if (!wine_server_call_err( req )) ret = reply->data;
     }

Modified: branches/arwinss/reactos/dll/win32/user32/resource.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/resource.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/resource.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/resource.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -83,7 +83,7 @@
     LPWSTR uni;
     HACCEL result = 0;
 
-    if (!HIWORD(lpTableName)) return LoadAcceleratorsW( instance, (LPCWSTR)lpTableName );
+    if (IS_INTRESOURCE(lpTableName)) return LoadAcceleratorsW( instance, (LPCWSTR)lpTableName );
 
     len = MultiByteToWideChar( CP_ACP, 0, lpTableName, -1, NULL, 0 );
     if ((uni = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))

Modified: branches/arwinss/reactos/dll/win32/user32/win.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/win.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -144,6 +144,7 @@
  */
 void release_user_handle_ptr( void *ptr )
 {
+    assert( ptr && ptr != OBJ_OTHER_PROCESS );
     USER_Unlock();
 }
 
@@ -2701,6 +2702,12 @@
     if (!(full_handle = WIN_IsCurrentThread( hwnd )))
         return (HWND)SendMessageW( hwnd, WM_WINE_SETPARENT, (WPARAM)parent, 0 );
 
+    if (full_handle == parent)
+    {
+        SetLastError( ERROR_INVALID_PARAMETER );
+        return 0;
+    }
+
     /* Windows hides the window first, then shows it again
      * including the WM_SHOWWINDOW messages and all */
     was_visible = ShowWindow( hwnd, SW_HIDE );
@@ -3310,25 +3317,7 @@
  */
 BOOL WINAPI SwitchDesktop( HDESK hDesktop)
 {
-    HWND hWnd;
-
-    hWnd = GetDesktopWindow(/*hDesktop*/);
-
-    FIXME("SwitchDesktop(hDesktop %p, desk window %x) stub!\n", hDesktop, hWnd);
-#if 0
-    /* Set foreground window */
-    SetForegroundWindow(hWnd);
-
-    /* Bring it to top */
-    SetWindowPos(hWnd,
-                 NULL, 0, 0,
-                 0,
-                 0,
-                 SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
-    UpdateWindow(hWnd);
-
-    RedrawWindow(NULL, NULL, 0, RDW_INVALIDATE | RDW_FRAME | RDW_ERASENOW | RDW_ALLCHILDREN);
-#endif
+    FIXME("(hwnd %p) stub!\n", hDesktop);
     return TRUE;
 }
 

Modified: branches/arwinss/reactos/dll/win32/user32/winproc.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32/winproc.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/winproc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/winproc.c [iso-8859-1] Sat Feb  6 11:18:44 2010
@@ -172,7 +172,6 @@
 }
 
 #ifdef __i386__
-#define __ASM_CFI(str) ""
 /* Some window procedures modify register they shouldn't, or are not
  * properly declared stdcall; so we need a small assembly wrapper to
  * call them. */

Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb  6 11:18:44 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,45097-45099,45319
-/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206
+/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455

Modified: branches/arwinss/reactos/dll/win32/winex11.drv/window.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex11.drv/window.c?rev=45456&r1=45455&r2=45456&view=diff
==============================================================================
--- 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] Sat Feb  6 11:18:44 2010
@@ -1327,6 +1327,15 @@
     data->configure_serial = NextRequest( display );
     XReconfigureWMWindow( display, data->whole_window,
                           DefaultScreen(display), mask, &changes );
+#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 );
+    }
+#endif
     wine_tsx11_unlock();
 
     TRACE( "win %p/%lx pos %d,%d,%dx%d after %lx changes=%x serial=%lu\n",
@@ -1445,6 +1454,7 @@
     COLORREF key;
     BYTE alpha;
     DWORD layered_flags;
+    HRGN win_rgn;
 
     if (!data->managed && is_window_managed( data->hwnd, SWP_NOACTIVATE, &data->window_rect ))
     {
@@ -1452,6 +1462,14 @@
         data->managed = TRUE;
         SetPropA( data->hwnd, managed_prop, (HANDLE)1 );
     }
+
+    if ((win_rgn = CreateRectRgn( 0, 0, 0, 0 )) &&
+        GetWindowRgn( data->hwnd, win_rgn ) == ERROR)
+    {
+        DeleteObject( win_rgn );
+        win_rgn = 0;
+    }
+    data->shaped = (win_rgn != 0);
 
     mask = get_window_attributes( display, data, &attr );
 
@@ -1472,7 +1490,7 @@
     if (data->whole_window) XSaveContext( display, data->whole_window, winContext, (char *)data->hwnd );
     wine_tsx11_unlock();
 
-    if (!data->whole_window) return 0;
+    if (!data->whole_window) goto done;
 
     if (!create_client_window( display, data, NULL ))
     {
@@ -1481,7 +1499,7 @@
         XDestroyWindow( display, data->whole_window );
         data->whole_window = 0;
         wine_tsx11_unlock();
-        return 0;
+        goto done;
     }
 
     set_initial_wm_hints( display, data );
@@ -1494,7 +1512,7 @@
     sync_window_text( display, data->whole_window, text );
 
     /* set the window region */
-    sync_window_region( display, data, (HRGN)1 );
+    if (win_rgn) sync_window_region( display, data, win_rgn );
 
     /* set the window opacity */
     if (!GetLayeredWindowAttributes( data->hwnd, &key, &alpha, &layered_flags )) layered_flags = 0;
@@ -1503,6 +1521,8 @@
     wine_tsx11_lock();
     XFlush( display );  /* make sure the window exists before we start painting to it */
     wine_tsx11_unlock();
+done:
+    if (win_rgn) DeleteObject( win_rgn );
     return data->whole_window;
 }
 




More information about the Ros-diffs mailing list