Author: fireball
Date: Wed Feb 9 13:28:02 2011
New Revision: 50632
URL:
http://svn.reactos.org/svn/reactos?rev=50632&view=rev
Log:
- Sync up to Wine-1.3.13.
Modified:
branches/arwinss/reactos/dll/win32/gdi32/ (props changed)
branches/arwinss/reactos/dll/win32/gdi32/font.c
branches/arwinss/reactos/dll/win32/user32/ (props changed)
branches/arwinss/reactos/dll/win32/user32/clipboard.c
branches/arwinss/reactos/dll/win32/user32/cursoricon.c
branches/arwinss/reactos/dll/win32/user32/mdi.c
branches/arwinss/reactos/dll/win32/winent.drv/font.c
branches/arwinss/reactos/dll/win32/winex11.drv/ (props changed)
branches/arwinss/reactos/dll/win32/winex11.drv/clipboard.c
branches/arwinss/reactos/dll/win32/winex11.drv/dib.c
branches/arwinss/reactos/dll/win32/winex11.drv/window.c
branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c
branches/arwinss/reactos/include/psdk/wingdi.h
Propchange: branches/arwinss/reactos/dll/win32/gdi32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 9 13:28:02 2011
@@ -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,45687-45688,47605,48678
-/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48418,48677,49173,49721,50160,50516
+/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48418,48677,49173,49721,50160,50516,50631
Modified: branches/arwinss/reactos/dll/win32/gdi32/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/font.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/font.c [iso-8859-1] Wed Feb 9 13:28:02 2011
@@ -1553,7 +1553,7 @@
return ret;
}
-static LPSTR FONT_GetCharsByRangeA(UINT firstChar, UINT lastChar, PINT pByteLen)
+static LPSTR FONT_GetCharsByRangeA(HDC hdc, UINT firstChar, UINT lastChar, PINT
pByteLen)
{
INT i, count = lastChar - firstChar + 1;
UINT c;
@@ -1561,6 +1561,24 @@
if (count <= 0)
return NULL;
+
+ switch (GdiGetCodePage(hdc))
+ {
+ case 932:
+ case 936:
+ case 949:
+ case 950:
+ case 1361:
+ if (lastChar > 0xffff)
+ return NULL;
+ if ((firstChar ^ lastChar) > 0xff)
+ return NULL;
+ break;
+ default:
+ if (lastChar > 0xff)
+ return NULL;
+ break;
+ }
str = HeapAlloc(GetProcessHeap(), 0, count * 2 + 1);
if (str == NULL)
@@ -1620,7 +1638,7 @@
LPWSTR wstr;
BOOL ret = TRUE;
- str = FONT_GetCharsByRangeA(firstChar, lastChar, &i);
+ str = FONT_GetCharsByRangeA(hdc, firstChar, lastChar, &i);
if(str == NULL)
return FALSE;
@@ -2014,7 +2032,16 @@
rc.right = x + width.x;
rc.top = y - tm.tmAscent;
rc.bottom = y + tm.tmDescent;
- dc->funcs->pExtTextOut(dc->physDev, 0, 0, ETO_OPAQUE, &rc,
NULL, 0, NULL);
+
+ if(flags & ETO_CLIPPED)
+ {
+ rc.left = max(lprect->left, rc.left);
+ rc.right = min(lprect->right, rc.right);
+ rc.top = max(lprect->top, rc.top);
+ rc.bottom = min(lprect->bottom, rc.bottom);
+ }
+ if(rc.left < rc.right && rc.top < rc.bottom)
+ dc->funcs->pExtTextOut(dc->physDev, 0, 0, ETO_OPAQUE,
&rc, NULL, 0, NULL);
}
}
}
@@ -2324,7 +2351,7 @@
LPWSTR wstr;
BOOL ret = TRUE;
- str = FONT_GetCharsByRangeA(firstChar, lastChar, &i);
+ str = FONT_GetCharsByRangeA(hdc, firstChar, lastChar, &i);
if (str == NULL)
return FALSE;
@@ -2468,16 +2495,15 @@
LPGLYPHMETRICS lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 )
{
- LPWSTR p = NULL;
- DWORD ret;
- UINT c;
-
if (!lpmat2) return GDI_ERROR;
if(!(fuFormat & GGO_GLYPH_INDEX)) {
+ UINT cp;
int len;
char mbchs[2];
- if(uChar > 0xff) { /* but, 2 bytes character only */
+
+ cp = GdiGetCodePage(hdc);
+ if (IsDBCSLeadByteEx(cp, uChar >> 8)) {
len = 2;
mbchs[0] = (uChar & 0xff00) >> 8;
mbchs[1] = (uChar & 0xff);
@@ -2485,14 +2511,11 @@
len = 1;
mbchs[0] = (uChar & 0xff);
}
- p = FONT_mbtowc(hdc, mbchs, len, NULL, NULL);
- c = p[0];
- } else
- c = uChar;
- ret = GetGlyphOutlineW(hdc, c, fuFormat, lpgm, cbBuffer, lpBuffer,
- lpmat2);
- HeapFree(GetProcessHeap(), 0, p);
- return ret;
+ MultiByteToWideChar(cp, 0, mbchs, len, (LPWSTR)&uChar, 1);
+ }
+
+ return GetGlyphOutlineW(hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer,
+ lpmat2);
}
/***********************************************************************
@@ -3010,7 +3033,7 @@
LPWSTR wstr;
BOOL ret = TRUE;
- str = FONT_GetCharsByRangeA(first, last, &i);
+ str = FONT_GetCharsByRangeA(hdc, first, last, &i);
if (str == NULL)
return FALSE;
Propchange: branches/arwinss/reactos/dll/win32/user32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 9 13:28:02 2011
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/user32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/user32:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678
-/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48147,48418,48677,49173,49721,49800,50160,50516
+/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48147,48418,48677,49173,49721,49800,50160,50516,50631
Modified: branches/arwinss/reactos/dll/win32/user32/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/clipboard.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/clipboard.c [iso-8859-1] Wed Feb 9 13:28:02
2011
@@ -291,7 +291,7 @@
{
BOOL bRet = FALSE;
- TRACE("(%d)\n", bCBHasChanged);
+ TRACE("() Changed=%d\n", bCBHasChanged);
if (CLIPBOARD_CloseClipboard())
{
@@ -301,10 +301,10 @@
USER_Driver->pEndClipboardUpdate();
+ bCBHasChanged = FALSE;
+
if (hWndViewer)
SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, (WPARAM) GetClipboardOwner(),
0);
-
- bCBHasChanged = FALSE;
}
bRet = TRUE;
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] Wed Feb 9
13:28:02 2011
@@ -446,7 +446,7 @@
* Find the icon closest to the requested size and bit depth.
*/
static int CURSORICON_FindBestIcon( LPCVOID dir, fnGetCIEntry get_entry,
- int width, int height, int depth )
+ int width, int height, int depth, UINT loadflags )
{
int i, cx, cy, bits, bestEntry = -1;
UINT iTotalDiff, iXDiff=0, iYDiff=0, iColorDiff;
@@ -455,7 +455,20 @@
/* Find Best Fit */
iTotalDiff = 0xFFFFFFFF;
iColorDiff = 0xFFFFFFFF;
- for ( i = 0; get_entry( dir, i, &cx, &cy, &bits ); i++ )
+
+ if (loadflags & LR_DEFAULTSIZE)
+ {
+ if (!width) width = GetSystemMetrics( SM_CXICON );
+ if (!height) height = GetSystemMetrics( SM_CYICON );
+ }
+ else if (!width && !height)
+ {
+ /* use the size of the first entry */
+ if (!get_entry( dir, 0, &width, &height, &bits )) return -1;
+ iTotalDiff = 0;
+ }
+
+ for ( i = 0; iTotalDiff && get_entry( dir, i, &cx, &cy, &bits );
i++ )
{
iTempXDiff = abs(width - cx);
iTempYDiff = abs(height - cy);
@@ -508,9 +521,21 @@
* FIXME: parameter 'color' ignored.
*/
static int CURSORICON_FindBestCursor( LPCVOID dir, fnGetCIEntry get_entry,
- int width, int height, int depth )
+ int width, int height, int depth, UINT loadflags )
{
int i, maxwidth, maxheight, cx, cy, bits, bestEntry = -1;
+
+ if (loadflags & LR_DEFAULTSIZE)
+ {
+ if (!width) width = GetSystemMetrics( SM_CXCURSOR );
+ if (!height) height = GetSystemMetrics( SM_CYCURSOR );
+ }
+ else if (!width && !height)
+ {
+ /* use the first entry */
+ if (!get_entry( dir, 0, &width, &height, &bits )) return -1;
+ return 0;
+ }
/* Double height to account for AND and XOR masks */
@@ -563,22 +588,24 @@
}
static const CURSORICONDIRENTRY *CURSORICON_FindBestIconRes( const CURSORICONDIR * dir,
- int width, int height, int depth )
+ int width, int height, int
depth,
+ UINT loadflags )
{
int n;
n = CURSORICON_FindBestIcon( dir, CURSORICON_GetResIconEntry,
- width, height, depth );
+ width, height, depth, loadflags );
if ( n < 0 )
return NULL;
return &dir->idEntries[n];
}
static const CURSORICONDIRENTRY *CURSORICON_FindBestCursorRes( const CURSORICONDIR *dir,
- int width, int height, int depth )
+ int width, int height, int
depth,
+ UINT loadflags )
{
int n = CURSORICON_FindBestCursor( dir, CURSORICON_GetResCursorEntry,
- width, height, depth );
+ width, height, depth, loadflags );
if ( n < 0 )
return NULL;
return &dir->idEntries[n];
@@ -603,20 +630,22 @@
}
static const CURSORICONFILEDIRENTRY *CURSORICON_FindBestCursorFile( const
CURSORICONFILEDIR *dir,
- int width, int height, int depth )
-{
- int n = CURSORICON_FindBestCursor( (LPCVOID) dir, CURSORICON_GetFileEntry,
- width, height, depth );
+ int width, int
height, int depth,
+ UINT loadflags )
+{
+ int n = CURSORICON_FindBestCursor( dir, CURSORICON_GetFileEntry,
+ width, height, depth, loadflags );
if ( n < 0 )
return NULL;
return &dir->idEntries[n];
}
static const CURSORICONFILEDIRENTRY *CURSORICON_FindBestIconFile( const CURSORICONFILEDIR
*dir,
- int width, int height, int depth )
-{
- int n = CURSORICON_FindBestIcon((LPCVOID) dir, CURSORICON_GetFileEntry,
- width, height, depth );
+ int width, int height,
int depth,
+ UINT loadflags )
+{
+ int n = CURSORICON_FindBestIcon( dir, CURSORICON_GetFileEntry,
+ width, height, depth, loadflags );
if ( n < 0 )
return NULL;
return &dir->idEntries[n];
@@ -811,8 +840,16 @@
return 0;
}
- if (!width) width = bmi->bmiHeader.biWidth;
- if (!height) height = bmi->bmiHeader.biHeight/2;
+ if (cFlag & LR_DEFAULTSIZE)
+ {
+ if (!width) width = GetSystemMetrics( bIcon ? SM_CXICON : SM_CXCURSOR );
+ if (!height) height = GetSystemMetrics( bIcon ? SM_CYICON : SM_CYCURSOR );
+ }
+ else
+ {
+ if (!width) width = bmi->bmiHeader.biWidth;
+ if (!height) height = bmi->bmiHeader.biHeight/2;
+ }
do_stretch = (bmi->bmiHeader.biHeight/2 != height) ||
(bmi->bmiHeader.biWidth != width);
@@ -978,7 +1015,7 @@
* \- CHUNK:icon
*/
static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size,
- INT width, INT height, INT depth )
+ INT width, INT height, INT depth, UINT
loadflags )
{
struct cursoricon_object *info;
ani_header header = {0};
@@ -1036,7 +1073,7 @@
const BITMAPINFO *bmi;
entry = CURSORICON_FindBestIconFile((const CURSORICONFILEDIR *) icon_data,
- width, height, depth );
+ width, height, depth, loadflags );
bmi = (const BITMAPINFO *) (icon_data + entry->dwDIBOffset);
info->hotspot.x = entry->xHotspot;
@@ -1164,8 +1201,7 @@
/* Check for .ani. */
if (memcmp( bits, "RIFF", 4 ) == 0)
{
- hIcon = CURSORICON_CreateIconFromANI( bits, filesize, width, height,
- depth );
+ hIcon = CURSORICON_CreateIconFromANI( bits, filesize, width, height, depth,
loadflags );
goto end;
}
@@ -1177,9 +1213,9 @@
goto end;
if ( fCursor )
- entry = CURSORICON_FindBestCursorFile( dir, width, height, depth );
+ entry = CURSORICON_FindBestCursorFile( dir, width, height, depth, loadflags );
else
- entry = CURSORICON_FindBestIconFile( dir, width, height, depth );
+ entry = CURSORICON_FindBestIconFile( dir, width, height, depth, loadflags );
if ( !entry )
goto end;
@@ -1240,9 +1276,9 @@
if (!(handle = LoadResource( hInstance, hRsrc ))) return 0;
if (!(dir = LockResource( handle ))) return 0;
if (fCursor)
- dirEntry = CURSORICON_FindBestCursorRes( dir, width, height, depth );
+ dirEntry = CURSORICON_FindBestCursorRes( dir, width, height, depth, loadflags );
else
- dirEntry = CURSORICON_FindBestIconRes( dir, width, height, depth );
+ dirEntry = CURSORICON_FindBestIconRes( dir, width, height, depth, loadflags );
if (!dirEntry) return 0;
wResId = dirEntry->wResId;
FreeResource( handle );
@@ -1581,9 +1617,9 @@
ReleaseDC(0, hdc);
if( bIcon )
- entry = CURSORICON_FindBestIconRes( dir, width, height, depth );
+ entry = CURSORICON_FindBestIconRes( dir, width, height, depth, LR_DEFAULTSIZE
);
else
- entry = CURSORICON_FindBestCursorRes( dir, width, height, depth );
+ entry = CURSORICON_FindBestCursorRes( dir, width, height, depth,
LR_DEFAULTSIZE );
if( entry ) retVal = entry->wResId;
}
@@ -1596,9 +1632,7 @@
*/
INT WINAPI LookupIconIdFromDirectory( LPBYTE dir, BOOL bIcon )
{
- return LookupIconIdFromDirectoryEx( dir, bIcon,
- bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
- bIcon ? GetSystemMetrics(SM_CYICON) : GetSystemMetrics(SM_CYCURSOR), bIcon ? 0
: LR_MONOCHROME );
+ return LookupIconIdFromDirectoryEx( dir, bIcon, 0, 0, bIcon ? 0 : LR_MONOCHROME );
}
/***********************************************************************
@@ -2306,15 +2340,6 @@
TRACE_(resource)("(%p,%s,%d,%d,%d,0x%08x)\n",
hinst,debugstr_w(name),type,desiredx,desiredy,loadflags);
- if (loadflags & LR_DEFAULTSIZE) {
- if (type == IMAGE_ICON) {
- if (!desiredx) desiredx = GetSystemMetrics(SM_CXICON);
- if (!desiredy) desiredy = GetSystemMetrics(SM_CYICON);
- } else if (type == IMAGE_CURSOR) {
- if (!desiredx) desiredx = GetSystemMetrics(SM_CXCURSOR);
- if (!desiredy) desiredy = GetSystemMetrics(SM_CYCURSOR);
- }
- }
if (loadflags & LR_LOADFROMFILE) loadflags &= ~LR_SHARED;
switch (type) {
case IMAGE_BITMAP:
Modified: branches/arwinss/reactos/dll/win32/user32/mdi.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/mdi.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/mdi.c [iso-8859-1] Wed Feb 9 13:28:02 2011
@@ -866,7 +866,7 @@
if (!hIcon)
hIcon = (HICON)SendMessageW(hChild, WM_GETICON, ICON_BIG, 0);
if (!hIcon)
- hIcon = LoadImageW(0, MAKEINTRESOURCEW(IDI_WINLOGO), IMAGE_ICON, 0, 0,
LR_DEFAULTCOLOR);
+ hIcon = LoadImageW(0, MAKEINTRESOURCEW(IDI_WINLOGO), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
if (hIcon)
{
HDC hMemDC;
Modified: branches/arwinss/reactos/dll/win32/winent.drv/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] Wed Feb 9 13:28:02
2011
@@ -536,7 +536,11 @@
lfsz.lf.lfWidth = abs( lfsz.lf.lfWidth );
lfsz.devsize.cx = RosDrv_XWStoDS( pdcattr, lfsz.lf.lfWidth );
lfsz.devsize.cy = RosDrv_YWStoDS( pdcattr, lfsz.lf.lfHeight );
- GetWorldTransform( pdcattr->hdc, &lfsz.xform );
+
+ GetTransform( pdcattr->hdc, 0x204, &lfsz.xform );
+ TRACE("font transform %f %f %f %f\n", lfsz.xform.eM11, lfsz.xform.eM12,
+ lfsz.xform.eM21, lfsz.xform.eM22);
+
/* Not used fields, would break hashing */
lfsz.xform.eDx = lfsz.xform.eDy = 0;
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 9 13:28:02 2011
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/winex11.drv:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/winex11.drv:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678
-/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46915,47274,47321,47798,47861,48147,48418,48677,49173,49721,49800,50160,50516
+/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46915,47274,47321,47798,47861,48147,48418,48677,49173,49721,49800,50160,50516,50631
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/clipboard.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/clipboard.c [iso-8859-1] Wed Feb 9
13:28:02 2011
@@ -87,10 +87,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
/* Maximum wait time for selection notify */
-#define SELECTION_RETRIES 500 /* wait for .1 seconds */
+#define SELECTION_RETRIES 500 /* wait for .5 seconds */
#define SELECTION_WAIT 1000 /* us */
-/* Minimum seconds that must lapse between owner queries */
-#define OWNERQUERYLAPSETIME 1
/* Selection masks */
#define S_NOSELECTION 0
@@ -180,6 +178,7 @@
static BOOL X11DRV_CLIPBOARD_RenderSynthesizedFormat(Display *display, LPWINE_CLIPDATA
lpData);
static BOOL X11DRV_CLIPBOARD_RenderSynthesizedDIB(Display *display);
static BOOL X11DRV_CLIPBOARD_RenderSynthesizedBitmap(Display *display);
+static BOOL X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile(Display *display);
static void X11DRV_HandleSelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BOOL
bIsMultiple );
/* Clipboard formats
@@ -888,12 +887,15 @@
break;
case CF_ENHMETAFILE:
+ bret = X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile( display );
+ break;
+
case CF_METAFILEPICT:
- FIXME("Synthesizing wFormatID(0x%08x) not implemented\n", wFormatID);
+ FIXME("Synthesizing CF_METAFILEPICT not implemented\n");
break;
default:
- FIXME("Called to synthesize unknown format\n");
+ FIXME("Called to synthesize unknown format 0x%08x\n",
wFormatID);
break;
}
}
@@ -1059,21 +1061,23 @@
if (lpSource->hData || X11DRV_CLIPBOARD_RenderFormat(display, lpSource))
{
HDC hdc;
- HBITMAP hData;
+ HBITMAP hData = NULL;
unsigned int offset;
LPBITMAPINFOHEADER lpbmih;
hdc = GetDC(NULL);
lpbmih = GlobalLock(lpSource->hData);
-
- offset = sizeof(BITMAPINFOHEADER)
- + ((lpbmih->biBitCount <= 8) ? (sizeof(RGBQUAD) *
- (1 << lpbmih->biBitCount)) : 0);
-
- hData = CreateDIBitmap(hdc, lpbmih, CBM_INIT, (LPBYTE)lpbmih +
- offset, (LPBITMAPINFO) lpbmih, DIB_RGB_COLORS);
-
- GlobalUnlock(lpSource->hData);
+ if (lpbmih)
+ {
+ offset = sizeof(BITMAPINFOHEADER)
+ + ((lpbmih->biBitCount <= 8) ? (sizeof(RGBQUAD) *
+ (1 << lpbmih->biBitCount)) : 0);
+
+ hData = CreateDIBitmap(hdc, lpbmih, CBM_INIT, (LPBYTE)lpbmih +
+ offset, (LPBITMAPINFO) lpbmih, DIB_RGB_COLORS);
+
+ GlobalUnlock(lpSource->hData);
+ }
ReleaseDC(NULL, hdc);
if (hData)
@@ -1085,6 +1089,53 @@
}
return bret;
+}
+
+
+/**************************************************************************
+ * X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile
+ */
+static BOOL X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile(Display *display)
+{
+ LPWINE_CLIPDATA lpSource = NULL;
+
+ TRACE("\n");
+
+ if ((lpSource = X11DRV_CLIPBOARD_LookupData(CF_ENHMETAFILE)) &&
lpSource->hData)
+ return TRUE;
+ /* If we have a MF pict and it's not synthesized or it has been rendered */
+ else if ((lpSource = X11DRV_CLIPBOARD_LookupData(CF_METAFILEPICT)) &&
+ (!(lpSource->wFlags & CF_FLAG_SYNTHESIZED) || lpSource->hData))
+ {
+ /* Render source if required */
+ if (lpSource->hData || X11DRV_CLIPBOARD_RenderFormat(display, lpSource))
+ {
+ METAFILEPICT *pmfp;
+ HENHMETAFILE hData = NULL;
+
+ pmfp = GlobalLock(lpSource->hData);
+ if (pmfp)
+ {
+ UINT size_mf_bits = GetMetaFileBitsEx(pmfp->hMF, 0, NULL);
+ void *mf_bits = HeapAlloc(GetProcessHeap(), 0, size_mf_bits);
+ if (mf_bits)
+ {
+ GetMetaFileBitsEx(pmfp->hMF, size_mf_bits, mf_bits);
+ hData = SetWinMetaFileBits(size_mf_bits, mf_bits, NULL, pmfp);
+ HeapFree(GetProcessHeap(), 0, mf_bits);
+ }
+ GlobalUnlock(lpSource->hData);
+ }
+
+ if (hData)
+ {
+ X11DRV_CLIPBOARD_InsertClipboardData(CF_ENHMETAFILE, hData, 0, NULL,
TRUE);
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
}
@@ -1496,7 +1547,6 @@
*lpBytes = j; /* Number of bytes in string */
done:
- HeapFree(GetProcessHeap(), 0, text);
GlobalUnlock(lpData->hData);
return lpstr;
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] Wed Feb 9 13:28:02
2011
@@ -4728,6 +4728,24 @@
}
#endif /* HAVE_LIBXXSHM */
+static Bool X11DRV_DIB_QueryXShm( Bool *pixmaps )
+{
+ static Bool have_xshm, have_xshm_pixmaps;
+ static BOOL initialized;
+
+ if (!initialized)
+ {
+#ifdef HAVE_LIBXXSHM
+ int major, minor;
+
+ have_xshm = XShmQueryVersion( gdi_display, &major, &minor,
&have_xshm_pixmaps );
+#endif
+ initialized = TRUE;
+ }
+
+ *pixmaps = have_xshm_pixmaps;
+ return have_xshm;
+}
/***********************************************************************
* X11DRV_CreateDIBSection (X11DRV.@)
@@ -4740,7 +4758,6 @@
WORD bpp, compr;
LONG w, h;
#ifdef HAVE_LIBXXSHM
- int major, minor;
Bool pixmaps;
#endif
@@ -4780,7 +4797,7 @@
#ifdef HAVE_LIBXXSHM
physBitmap->shminfo.shmid = -1;
- if (XShmQueryVersion( gdi_display, &major, &minor, &pixmaps )
+ if (X11DRV_DIB_QueryXShm( &pixmaps )
&& (physBitmap->image = X11DRV_XShmCreateImage( dib.dsBm.bmWidth,
dib.dsBm.bmHeight,
physBitmap->pixmap_depth,
&physBitmap->shminfo )))
{
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] Wed Feb 9
13:28:02 2011
@@ -1606,7 +1606,7 @@
RECT dst_rect = *new_rect;
HDC hdc_src, hdc_dst;
INT code;
- HRGN rgn = 0;
+ HRGN rgn;
HWND parent = 0;
if (!data->whole_window)
@@ -1625,6 +1625,9 @@
hdc_src = hdc_dst = GetDCEx( data->hwnd, 0, DCX_CACHE );
}
+ rgn = CreateRectRgnIndirect( &dst_rect );
+ SelectClipRgn( hdc_dst, rgn );
+ DeleteObject( rgn );
ExcludeUpdateRgn( hdc_dst, data->hwnd );
code = X11DRV_START_EXPOSURES;
@@ -1637,6 +1640,7 @@
dst_rect.right - dst_rect.left, dst_rect.bottom - dst_rect.top,
hdc_src, src_rect.left, src_rect.top, SRCCOPY );
+ rgn = 0;
code = X11DRV_END_EXPOSURES;
ExtEscape( hdc_dst, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, sizeof(rgn),
(LPSTR)&rgn );
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] Wed Feb 9
13:28:02 2011
@@ -1066,7 +1066,11 @@
lfsz.lf.lfWidth = abs( lfsz.lf.lfWidth );
lfsz.devsize.cx = X11DRV_XWStoDS( physDev, lfsz.lf.lfWidth );
lfsz.devsize.cy = X11DRV_YWStoDS( physDev, lfsz.lf.lfHeight );
- GetWorldTransform( physDev->hdc, &lfsz.xform );
+
+ GetTransform( physDev->hdc, 0x204, &lfsz.xform );
+ TRACE("font transform %f %f %f %f\n", lfsz.xform.eM11, lfsz.xform.eM12,
+ lfsz.xform.eM21, lfsz.xform.eM22);
+
/* Not used fields, would break hashing */
lfsz.xform.eDx = lfsz.xform.eDy = 0;
Modified: branches/arwinss/reactos/include/psdk/wingdi.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/wi…
==============================================================================
--- branches/arwinss/reactos/include/psdk/wingdi.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/include/psdk/wingdi.h [iso-8859-1] Wed Feb 9 13:28:02 2011
@@ -3107,6 +3107,7 @@
int WINAPI GetTextFaceW(HDC,int,LPWSTR);
BOOL WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA);
BOOL WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW);
+BOOL WINAPI GetTransform(HDC,DWORD,XFORM*);
BOOL WINAPI GetViewportExtEx(HDC,LPSIZE);
BOOL WINAPI GetViewportOrgEx(HDC,LPPOINT);
BOOL WINAPI GetWindowExtEx(HDC,LPSIZE);