diff options
author | B. Stack <bgstack15@gmail.com> | 2023-01-22 13:56:55 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-01-22 13:56:55 -0500 |
commit | 75e05bc441382db69c842a64c562738cb749214e (patch) | |
tree | 698b60b3b4b914bf7958cf1174d0373909bf1e8f /wx+/context_menu.h | |
parent | add upstream 11.29 (diff) | |
download | FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.gz FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.bz2 FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.zip |
add upstream 12.0
Diffstat (limited to 'wx+/context_menu.h')
-rw-r--r-- | wx+/context_menu.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wx+/context_menu.h b/wx+/context_menu.h index d1d2bd9f..92d8504c 100644 --- a/wx+/context_menu.h +++ b/wx+/context_menu.h @@ -126,6 +126,9 @@ void fixMenuIcons(wxMenu& menu) } +//better call wxClipboard::Get()->Flush() *once* during app exit instead of after each setClipboardText()? +// => OleFlushClipboard: "Carries out the clipboard shutdown sequence" +// => maybe this helps with clipboard randomly "forgetting" content after app exit? inline void setClipboardText(const wxString& txt) { @@ -133,9 +136,8 @@ void setClipboardText(const wxString& txt) if (clip.Open()) { ZEN_ON_SCOPE_EXIT(clip.Close()); - [[maybe_unused]] const bool rv1 = clip.SetData(new wxTextDataObject(txt)); //ownership passed - [[maybe_unused]] const bool rv2 = clip.Flush(); - assert(rv1 && rv2); + [[maybe_unused]] const bool rv = clip.SetData(new wxTextDataObject(txt)); //ownership passed + assert(rv); } else assert(false); } |