reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit b32d4bf7f016857416ccfe6f62d506c9b3dec517
parent 9e52271d428f27ca07716255897b5cf63b8e22fd
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Thu, 22 Dec 2016 23:34:00 -0500

about: fix for the Escape key not closing the window in some cases on macOS

Diffstat:
Msrc/about.cpp | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/about.cpp b/src/about.cpp @@ -107,11 +107,11 @@ bool About::onKeyDown(const int key, const int mods) void About::setDelegate(const DelegatePtr &delegate, const bool focus) { - if(focus) - setFocus(); // this also calls show(); - - if(m_delegate && delegate->data() == m_delegate->data()) + if(m_delegate && delegate->data() == m_delegate->data()) { + if(focus) + setFocus(); // also calls show() return; + } // prevent fast flickering on Windows InhibitControl block(handle()); @@ -149,6 +149,11 @@ void About::setDelegate(const DelegatePtr &delegate, const bool focus) m_menu->autoSizeHeader(); m_list->autoSizeHeader(); + + if(focus) { + show(); + m_tabs->setFocus(); + } } void About::setTitle(const string &what)