mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
xwayland: send focus change event unconditionally
This fixes issues with (at least) dialogs in Jetbrains IDEs becoming unclickable if they ever lost focus (ref. swaywm/sway#5373). Prior to this change, since `xwm->focus_surface` would be set prior to `xwm_surface_activate` being called, the latter would short-circuit immediately and not notify the application of the focus change.
This commit is contained in:
parent
5c942bd597
commit
0758a4fc9d
1 changed files with 4 additions and 4 deletions
|
@ -1243,12 +1243,12 @@ static void xwm_handle_focus_in(struct wlr_xwm *xwm,
|
|||
// Because of that, we allow changing focus between surfaces belonging to the
|
||||
// same application.
|
||||
struct wlr_xwayland_surface *requested_focus = lookup_surface(xwm, ev->event);
|
||||
if (!xwm->focus_surface || !requested_focus ||
|
||||
requested_focus->pid != xwm->focus_surface->pid) {
|
||||
xwm_send_focus_window(xwm, xwm->focus_surface);
|
||||
} else {
|
||||
if (xwm->focus_surface && requested_focus &&
|
||||
requested_focus->pid == xwm->focus_surface->pid) {
|
||||
xwm->focus_surface = requested_focus;
|
||||
}
|
||||
|
||||
xwm_send_focus_window(xwm, xwm->focus_surface);
|
||||
}
|
||||
|
||||
static void xwm_handle_xcb_error(struct wlr_xwm *xwm, xcb_value_error_t *ev) {
|
||||
|
|
Loading…
Reference in a new issue