diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-08 12:51:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 12:51:42 -0400 |
commit | 8dcf3bfdf786ceb2614d4cf572ef6747cd4bb94c (patch) | |
tree | 762bde8fa6fca8e1faa342b7965ba7e44b61ab99 /rootston/cursor.c | |
parent | 9e1ff2dce9eded87673c8cd7eeb7e31a421f7a22 (diff) | |
parent | b72da6cc44cf19688686383065557425d55ae9ed (diff) |
Merge pull request #239 from emersion/center-views
Center views in rootston
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r-- | rootston/cursor.c | 7 |
1 files changed, 3 insertions, 4 deletions
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; } } |