diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-05-24 10:30:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 10:30:15 -0400 |
commit | a0eb37e2ea4ad96b4f6e98fddbc5c31d0bd0f293 (patch) | |
tree | defe8ed75ef496af64b4c342212532947d190a18 | |
parent | 0ab37db54359959d9a9f05ed78a51ead5ba98348 (diff) | |
parent | a94c56a828933d72b0529f81916292222ef152f0 (diff) |
Merge pull request #997 from dcz-purism/master
Ignore clicks on un-focuseable things.
-rw-r--r-- | rootston/cursor.c | 4 | ||||
-rw-r--r-- | rootston/seat.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index 55b145e2..1cf81704 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -273,7 +273,9 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, } break; case WLR_BUTTON_PRESSED: - roots_seat_set_focus(seat, view); + if (view) { + roots_seat_set_focus(seat, view); + } if (surface && wlr_surface_is_layer_surface(surface)) { struct wlr_layer_surface *layer = wlr_layer_surface_from_wlr_surface(surface); diff --git a/rootston/seat.c b/rootston/seat.c index cbc7c961..b137ff11 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -798,6 +798,7 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { if (view == NULL) { seat->cursor->mode = ROOTS_CURSOR_PASSTHROUGH; + wlr_seat_keyboard_clear_focus(seat->seat); return; } |