Also grab keyboard focus on parent window focus

This allows you to directly focus plugin GUIs that are open in the
background in REAPER.
This commit is contained in:
Robbert van der Helm
2021-07-31 16:13:32 +02:00
parent be6fc786ca
commit bf59e5e8ce
2 changed files with 11 additions and 9 deletions
+8 -9
View File
@@ -576,16 +576,15 @@ void Editor::handle_x11_events() noexcept {
if (!use_xembed) {
fix_local_coordinates();
}
}
// In case the WM somehow does not support
// `_NET_ACTIVE_WINDOW`, a more naive focus grabbing method
// implemented in the `WM_PARENTNOTIFY` handler will be
// used.
if (window == wrapper_window.window &&
supports_ewmh_active_window() &&
is_wine_window_active()) {
set_input_focus(true);
// In case the WM somehow does not support
// `_NET_ACTIVE_WINDOW`, a more naive focus grabbing
// method implemented in the `WM_PARENTNOTIFY` handler
// will be used.
if (supports_ewmh_active_window() &&
is_wine_window_active()) {
set_input_focus(true);
}
}
} break;
// When the user moves their mouse away from the Wine window