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
+3
View File
@@ -42,6 +42,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
more specific. Before this change we might use our own XDND implementation
when dragging from a plugin to a standalone Wine application running within
the same Wine prefix.
- Fixed an edge case where clicking inside of a plugin GUI in **REAPER** while
the FX window already open in the background would not give keyboard focus to
the plugin.
## [3.5.0] - 2021-06-23
+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