aboutsummaryrefslogtreecommitdiff
path: root/rootston/desktop.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-08 18:19:05 +0200
committeremersion <contact@emersion.fr>2017-10-08 18:19:05 +0200
commit518ef46ef2c15bdfd2a1e0274fe2bf628639a310 (patch)
tree8db05bf590f1e459b7879a4d57a5da8ef631fb54 /rootston/desktop.c
parente66e18f4de6996a5c8d923668834096b61b60110 (diff)
Activate new views
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r--rootston/desktop.c10
1 files changed, 10 insertions, 0 deletions
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;