Fix last error reporting when calling GetClipboardOwner
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1402
This commit is contained in:
@ -550,10 +550,10 @@ inner_clipboard_window_procedure (HWND hwnd,
|
|||||||
GdkWindow *stored_owner;
|
GdkWindow *stored_owner;
|
||||||
GdkWin32Selection *win32_sel = _gdk_win32_selection_get ();
|
GdkWin32Selection *win32_sel = _gdk_win32_selection_get ();
|
||||||
|
|
||||||
|
SetLastError (0);
|
||||||
hwnd_owner = GetClipboardOwner ();
|
hwnd_owner = GetClipboardOwner ();
|
||||||
|
|
||||||
if ((hwnd_owner == NULL) &&
|
if (hwnd_owner == NULL && GetLastError () != 0)
|
||||||
(GetLastError () != ERROR_SUCCESS))
|
|
||||||
WIN32_API_FAILED ("GetClipboardOwner");
|
WIN32_API_FAILED ("GetClipboardOwner");
|
||||||
|
|
||||||
hwnd_opener = GetOpenClipboardWindow ();
|
hwnd_opener = GetOpenClipboardWindow ();
|
||||||
|
|||||||
Reference in New Issue
Block a user