Module: wine Branch: master Commit: bd9eb3b527585389686d6573d4aa52bd9f37c0ec URL: http://source.winehq.org/git/wine.git/?a=commit;h=bd9eb3b527585389686d6573d4...
Author: Huw Davies huw@codeweavers.com Date: Thu Apr 16 12:09:19 2009 +0100
ole32: Don't pass a window if we're reading from the clipboard.
---
dlls/ole32/clipboard.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 0e2acf4..5990d90 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -902,7 +902,7 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_GetData( /* * Otherwise, get the data from the windows clipboard using GetClipboardData */ - if ( !OpenClipboard(theOleClipboard->window)) return CLIPBRD_E_CANT_OPEN; + if ( !OpenClipboard(NULL)) return CLIPBRD_E_CANT_OPEN;
h = GetClipboardData(pformatetcIn->cfFormat); hr = dup_global_mem(h, GMEM_MOVEABLE, &hData); @@ -1006,7 +1006,6 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_EnumFormatEtc( IEnumFORMATETC** enum_fmt) { HRESULT hr = S_OK; - ole_clipbrd *This = impl_from_IDataObject(iface); HGLOBAL handle; ole_priv_data *data = NULL;
@@ -1015,7 +1014,7 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_EnumFormatEtc( *enum_fmt = NULL;
if ( dwDirection != DATADIR_GET ) return E_NOTIMPL; - if ( !OpenClipboard(This->window) ) return CLIPBRD_E_CANT_OPEN; + if ( !OpenClipboard(NULL) ) return CLIPBRD_E_CANT_OPEN;
handle = GetClipboardData( ole_priv_data_clipboard_format ); if(handle)