Commit 455a2239 authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

Implemented rendering synthesized BITMAP and DIB formats.

parent 4d984fd9
...@@ -608,6 +608,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor, ...@@ -608,6 +608,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor,
UINT wFormat; UINT wFormat;
UINT alias; UINT alias;
ULONG cTargets; ULONG cTargets;
LPWINE_CLIPFORMAT lpFormat;
/* /*
* Count the number of items we wish to expose as selection targets. * Count the number of items we wish to expose as selection targets.
...@@ -617,9 +618,16 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor, ...@@ -617,9 +618,16 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor,
for (wFormat = 0; (wFormat = X11DRV_EnumClipboardFormats(wFormat));) for (wFormat = 0; (wFormat = X11DRV_EnumClipboardFormats(wFormat));)
{ {
LPWINE_CLIPFORMAT lpFormat = X11DRV_CLIPBOARD_LookupFormat(wFormat); lpFormat = X11DRV_CLIPBOARD_LookupFormat(wFormat);
if (lpFormat && X11DRV_CLIPBOARD_LookupPropertyAlias(lpFormat->drvData))
cTargets++; if (lpFormat)
{
if (!lpFormat->lpDrvExportFunc)
cTargets--;
if (X11DRV_CLIPBOARD_LookupPropertyAlias(lpFormat->drvData))
cTargets++;
}
} }
TRACE_(clipboard)(" found %ld formats\n", cTargets); TRACE_(clipboard)(" found %ld formats\n", cTargets);
...@@ -633,8 +641,9 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor, ...@@ -633,8 +641,9 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor,
for (targets[0] = x11drv_atom(TARGETS), cTargets = 1, wFormat = 0; for (targets[0] = x11drv_atom(TARGETS), cTargets = 1, wFormat = 0;
(wFormat = X11DRV_EnumClipboardFormats(wFormat));) (wFormat = X11DRV_EnumClipboardFormats(wFormat));)
{ {
LPWINE_CLIPFORMAT lpFormat = X11DRV_CLIPBOARD_LookupFormat(wFormat); lpFormat = X11DRV_CLIPBOARD_LookupFormat(wFormat);
if (lpFormat->lpDrvExportFunc)
EVENT_SelectionRequest_AddTARGETS(targets, &cTargets, lpFormat->drvData); EVENT_SelectionRequest_AddTARGETS(targets, &cTargets, lpFormat->drvData);
/* Check if any alias should be listed */ /* Check if any alias should be listed */
...@@ -835,7 +844,7 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BO ...@@ -835,7 +844,7 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BO
if (!lpFormat) if (!lpFormat)
lpFormat = X11DRV_CLIPBOARD_LookupAliasProperty(event->target); lpFormat = X11DRV_CLIPBOARD_LookupAliasProperty(event->target);
if (lpFormat) if (lpFormat && lpFormat->lpDrvExportFunc)
{ {
LPWINE_CLIPDATA lpData = X11DRV_CLIPBOARD_LookupData(lpFormat->wFormatID); LPWINE_CLIPDATA lpData = X11DRV_CLIPBOARD_LookupData(lpFormat->wFormatID);
...@@ -848,7 +857,6 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BO ...@@ -848,7 +857,6 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BO
if (hClipData && (lpClipData = GlobalLock(hClipData))) if (hClipData && (lpClipData = GlobalLock(hClipData)))
{ {
TRACE_(clipboard)("\tUpdating property %s, %ld bytes\n", TRACE_(clipboard)("\tUpdating property %s, %ld bytes\n",
lpFormat->Name, cBytes); lpFormat->Name, cBytes);
......
...@@ -98,6 +98,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = ...@@ -98,6 +98,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"XdndSelection", "XdndSelection",
"XdndTarget", "XdndTarget",
"XdndTypeList", "XdndTypeList",
"WCF_DIB",
"image/gif", "image/gif",
"text/html", "text/html",
"text/plain", "text/plain",
......
...@@ -435,6 +435,7 @@ enum x11drv_atoms ...@@ -435,6 +435,7 @@ enum x11drv_atoms
XATOM_XdndSelection, XATOM_XdndSelection,
XATOM_XdndTarget, XATOM_XdndTarget,
XATOM_XdndTypeList, XATOM_XdndTypeList,
XATOM_WCF_DIB,
XATOM_image_gif, XATOM_image_gif,
XATOM_text_html, XATOM_text_html,
XATOM_text_plain, XATOM_text_plain,
...@@ -453,6 +454,7 @@ typedef struct tagWINE_CLIPDATA { ...@@ -453,6 +454,7 @@ typedef struct tagWINE_CLIPDATA {
UINT wFormatID; UINT wFormatID;
HANDLE16 hData16; HANDLE16 hData16;
HANDLE hData32; HANDLE hData32;
UINT drvData;
UINT wFlags; UINT wFlags;
struct tagWINE_CLIPDATA *PrevData; struct tagWINE_CLIPDATA *PrevData;
struct tagWINE_CLIPDATA *NextData; struct tagWINE_CLIPDATA *NextData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment