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/cursor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rootston/cursor.c') diff --git a/rootston/cursor.c b/rootston/cursor.c index 8eb22459..605920cc 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -123,8 +123,8 @@ void cursor_update_position(struct roots_input *input, uint32_t time) { } } -static void set_view_focus(struct roots_input *input, - struct roots_desktop *desktop, struct roots_view *view) { +void set_view_focus(struct roots_input *input, struct roots_desktop *desktop, + struct roots_view *view) { if (input->active_view == view) { return; } @@ -140,8 +140,7 @@ static void set_view_focus(struct roots_input *input, struct roots_view *_view = desktop->views->items[i]; if (_view != view) { view_activate(_view, false); - } - if (view == _view) { + } else { index = i; } } -- cgit v1.2.3