mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Check the window in focus/enter events
This commit is contained in:
@@ -524,10 +524,6 @@ void Editor::handle_x11_events() noexcept {
|
||||
// dialog, since that often won't trigger an `EnterNotify'.
|
||||
case XCB_ENTER_NOTIFY:
|
||||
case XCB_FOCUS_IN: {
|
||||
if (!use_xembed) {
|
||||
fix_local_coordinates();
|
||||
}
|
||||
|
||||
const xcb_window_t window =
|
||||
event_type == XCB_ENTER_NOTIFY
|
||||
? reinterpret_cast<xcb_enter_notify_event_t*>(
|
||||
@@ -549,6 +545,10 @@ void Editor::handle_x11_events() noexcept {
|
||||
});
|
||||
}
|
||||
|
||||
if (window == parent_window && !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
|
||||
|
||||
Reference in New Issue
Block a user