mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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'.
|
// dialog, since that often won't trigger an `EnterNotify'.
|
||||||
case XCB_ENTER_NOTIFY:
|
case XCB_ENTER_NOTIFY:
|
||||||
case XCB_FOCUS_IN: {
|
case XCB_FOCUS_IN: {
|
||||||
if (!use_xembed) {
|
|
||||||
fix_local_coordinates();
|
|
||||||
}
|
|
||||||
|
|
||||||
const xcb_window_t window =
|
const xcb_window_t window =
|
||||||
event_type == XCB_ENTER_NOTIFY
|
event_type == XCB_ENTER_NOTIFY
|
||||||
? reinterpret_cast<xcb_enter_notify_event_t*>(
|
? 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
|
// In case the WM somehow does not support
|
||||||
// `_NET_ACTIVE_WINDOW`, a more naive focus grabbing method
|
// `_NET_ACTIVE_WINDOW`, a more naive focus grabbing method
|
||||||
// implemented in the `WM_PARENTNOTIFY` handler will be
|
// implemented in the `WM_PARENTNOTIFY` handler will be
|
||||||
|
|||||||
Reference in New Issue
Block a user