diff options
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 76175e5d..6846c76f 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -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) { |