Skip to content

Commit

Permalink
keyboard: Send focus out only on way<->x11 change
Browse files Browse the repository at this point in the history
Do not send focus out event if we switch between x11 windows as
sometimes x11 windows act weirdly on this.
  • Loading branch information
Cloudef committed Aug 2, 2016
1 parent a5d6a31 commit 7b8a964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compositor/seat/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ defocus(struct wlc_keyboard *keyboard, struct wlc_view *new_focus)
if (!(surface = wl_resource_from_wlc_resource(view->surface, "surface")))
goto out;

if (is_x11_view(view))
if (is_x11_view(view) && (!new_focus || !is_x11_view(new_focus)))
wlc_x11_window_set_active(&view->x11, false);

wlc_resource *r;
Expand Down

0 comments on commit 7b8a964

Please sign in to comment.