Merge branch 'gdk-win32-fix-issue-1402' into 'gtk-3-24'

Fix last error reporting when calling GetClipboardOwner

See merge request GNOME/gtk!4520
This commit is contained in:
Luca Bacci
2022-02-25 16:50:59 +00:00

View File

@@ -550,11 +550,11 @@ inner_clipboard_window_procedure (HWND hwnd,
GdkWindow *stored_owner;
GdkWin32Selection *win32_sel = _gdk_win32_selection_get ();
SetLastError (0);
hwnd_owner = GetClipboardOwner ();
if ((hwnd_owner == NULL) &&
(GetLastError () != ERROR_SUCCESS))
WIN32_API_FAILED ("GetClipboardOwner");
if (hwnd_owner == NULL && GetLastError () != 0)
WIN32_API_FAILED ("GetClipboardOwner");
hwnd_opener = GetOpenClipboardWindow ();