diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 11:48:26 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 11:49:17 -0500 |
commit | 3a08ac5e1faede83db0f7b5db43bb982f00d5a1d (patch) | |
tree | 3170cfb65ad27a138eeb53067cc1219646388427 /libs/gtkmm2ext | |
parent | 100e156727b3c2e67fdd4c4ff882faf038baa631 (diff) |
os x: an initial attempt at fixing loss of keyboard focus after cmd-w to close dialog
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/keyboard.h | 1 | ||||
-rw-r--r-- | libs/gtkmm2ext/keyboard.cc | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/keyboard.h b/libs/gtkmm2ext/gtkmm2ext/keyboard.h index 4319c9a4f6..7bdfab3007 100644 --- a/libs/gtkmm2ext/gtkmm2ext/keyboard.h +++ b/libs/gtkmm2ext/gtkmm2ext/keyboard.h @@ -179,6 +179,7 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful }; sigc::signal0<void> ZoomVerticalModifierReleased; + sigc::signal0<void> GrabFocus; protected: static Keyboard* _the_keyboard; diff --git a/libs/gtkmm2ext/keyboard.cc b/libs/gtkmm2ext/keyboard.cc index d59fe014ce..c1a279cce6 100644 --- a/libs/gtkmm2ext/keyboard.cc +++ b/libs/gtkmm2ext/keyboard.cc @@ -432,6 +432,14 @@ Keyboard::close_current_dialog () if (current_window) { current_window->hide (); current_window = 0; +#ifdef __APPLE__ + /* Since Apple users has a basically unconfigurable window + manager, and since users there cannot use + focus-follows-mouse, we force focus back to some application + "main window" after closing a dialog via Primary-w. + */ + GrabFocus (); +#endif } } |