diff options
author | Luca Bacci <luca.bacci982@gmail.com> | 2022-02-25 16:50:59 +0000 |
---|---|---|
committer | Luca Bacci <luca.bacci982@gmail.com> | 2022-02-25 16:50:59 +0000 |
commit | cf6627e11f7fc2394a495d5f74921bd546d3c01b (patch) | |
tree | 5c161601890b77790984d993ecd7d0e2840aaf7f | |
parent | a238488966196b098fed6c7edc46fcd0b55cdacb (diff) | |
parent | f19897e71fd7dedbb6a7d97dc1e2e830cf9f93ca (diff) | |
download | gtk+-cf6627e11f7fc2394a495d5f74921bd546d3c01b.tar.gz |
Merge branch 'gdk-win32-fix-issue-1402' into 'gtk-3-24'
Fix last error reporting when calling GetClipboardOwner
See merge request GNOME/gtk!4520
-rw-r--r-- | gdk/win32/gdkdisplay-win32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 5671e2c254..3afc34ce20 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -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 (); |