From 518ef46ef2c15bdfd2a1e0274fe2bf628639a310 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 8 Oct 2017 18:19:05 +0200 Subject: Activate new views --- rootston/desktop.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rootston/desktop.c') diff --git a/rootston/desktop.c b/rootston/desktop.c index ee813130..75030ad2 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -103,6 +103,16 @@ bool view_center(struct roots_view *view) { return true; } +bool view_initialize(struct roots_view *view) { + bool centered = view_center(view); + if (centered) { + struct roots_input *input = view->desktop->server->input; + set_view_focus(input, view->desktop, view); + wlr_seat_keyboard_notify_enter(input->wl_seat, view->wlr_surface); + } + return centered; +} + static struct wlr_subsurface *subsurface_at(struct wlr_surface *surface, double sx, double sy, double *sub_x, double *sub_y) { struct wlr_subsurface *subsurface; -- cgit v1.2.3