aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c4
-rw-r--r--rootston/main.c2
-rw-r--r--rootston/seat.c1
3 files changed, 5 insertions, 2 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/main.c b/rootston/main.c
index e5fecbe5..cecdb23d 100644
--- a/rootston/main.c
+++ b/rootston/main.c
@@ -21,7 +21,7 @@ int main(int argc, char **argv) {
server.wl_event_loop = wl_display_get_event_loop(server.wl_display);
assert(server.config && server.wl_display && server.wl_event_loop);
- server.backend = wlr_backend_autocreate(server.wl_display);
+ server.backend = wlr_backend_autocreate(server.wl_display, NULL);
if (server.backend == NULL) {
wlr_log(L_ERROR, "could not start backend");
return 1;
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;
}