Module: wine
Branch: master
Commit: d9df977006bceb883ccd68afb9b57a0da3ae4112
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9df977006bceb883ccd68afb…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Tue Aug 23 17:57:50 2016 +0900
user32: Don't disallow delayed rendering even when not the clipboard owner.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/user32/clipboard.c | 8 --------
dlls/user32/tests/clipboard.c | 2 +-
dlls/winex11.drv/clipboard.c | 6 ++----
3 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c
index c72a76b..251eadb 100644
--- a/dlls/user32/clipboard.c
+++ b/dlls/user32/clipboard.c
@@ -352,14 +352,6 @@ HANDLE WINAPI SetClipboardData(UINT wFormat, HANDLE hData)
return 0;
}
- /* If it's not owned, data can only be set if the format isn't
- available and its rendering is not delayed */
- if (!(flags & CB_OWNER) && !hData)
- {
- WARN("Clipboard not owned by calling task. Operation failed.\n");
- return 0;
- }
-
if (USER_Driver->pSetClipboardData(wFormat, hData, flags & CB_OWNER))
{
hResult = hData;
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index 33a9c69..ddd8d1a 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -65,7 +65,7 @@ static DWORD WINAPI set_clipboard_data_thread(LPVOID arg)
if (GetClipboardOwner() == hwnd)
{
SetClipboardData( CF_WAVE, 0 );
- todo_wine ok( IsClipboardFormatAvailable( CF_WAVE ), "%u: SetClipboardData failed\n", thread_from_line );
+ ok( IsClipboardFormatAvailable( CF_WAVE ), "%u: SetClipboardData failed\n", thread_from_line );
ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 ));
ok( ret != 0, "%u: SetClipboardData failed err %u\n", thread_from_line, GetLastError() );
}
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 9b8ff65..b7c89cb 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -3016,16 +3016,14 @@ BOOL CDECL X11DRV_SetClipboardData(UINT wFormat, HANDLE hData, BOOL owner)
DWORD flags = 0;
BOOL bResult = TRUE;
- /* If it's not owned, data can only be set if the format data is not already owned
- and its rendering is not delayed */
+ /* If it's not owned, data can only be set if the format data is not already owned */
if (!owner)
{
LPWINE_CLIPDATA lpRender;
X11DRV_CLIPBOARD_UpdateCache();
- if (!hData ||
- ((lpRender = X11DRV_CLIPBOARD_LookupData(wFormat)) &&
+ if (((lpRender = X11DRV_CLIPBOARD_LookupData(wFormat)) &&
!(lpRender->wFlags & CF_FLAG_UNOWNED)))
bResult = FALSE;
else
Module: wine
Branch: master
Commit: 4d816bdbcd31ea6799e199c15804110b70309570
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d816bdbcd31ea6799e199c15…
Author: Bruno Jesus <00cpxxx(a)gmail.com>
Date: Mon Aug 22 22:06:58 2016 -0300
dinput: Restore effect ID on error due to kernel < 3.14 bug.
Based on ideas by Elias Vanderstuyft
Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/dinput/effect_linuxinput.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c
index 642dfc0..bbcadf5 100644
--- a/dlls/dinput/effect_linuxinput.c
+++ b/dlls/dinput/effect_linuxinput.c
@@ -173,14 +173,19 @@ static HRESULT WINAPI LinuxInputEffectImpl_Download(
LPDIRECTINPUTEFFECT iface)
{
LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface);
- int ret;
+ int ret, old_effect_id;
TRACE("(this=%p)\n", This);
ff_dump_effect(&This->effect);
+ old_effect_id = This->effect.id;
if (ioctl(*(This->fd), EVIOCSFF, &This->effect) != -1)
return DI_OK;
+ /* Linux kernel < 3.14 has a bug that incorrectly assigns an effect ID even
+ * on error, restore it here if that is the case. */
+ This->effect.id = old_effect_id;
+
switch (errno)
{
case EINVAL: