forked from AuroraMiddleware/gtk
Fix last error reporting when calling GetClipboardOwner
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1402
This commit is contained in:
parent
f43d0365dd
commit
206e837dde
@ -1219,10 +1219,9 @@ inner_clipboard_window_procedure (HWND hwnd,
|
|||||||
return DefWindowProcW (hwnd, message, wparam, lparam);
|
return DefWindowProcW (hwnd, message, wparam, lparam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetLastError (0);
|
||||||
hwnd_owner = GetClipboardOwner ();
|
hwnd_owner = GetClipboardOwner ();
|
||||||
|
if (hwnd_owner == NULL && GetLastError () != 0)
|
||||||
if ((hwnd_owner == NULL) &&
|
|
||||||
(GetLastError () != ERROR_SUCCESS))
|
|
||||||
WIN32_API_FAILED ("GetClipboardOwner");
|
WIN32_API_FAILED ("GetClipboardOwner");
|
||||||
|
|
||||||
hwnd_opener = GetOpenClipboardWindow ();
|
hwnd_opener = GetOpenClipboardWindow ();
|
||||||
|
Loading…
Reference in New Issue
Block a user