aboutsummaryrefslogtreecommitdiff
path: root/rootston/desktop.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-22 19:15:49 +0200
committerDrew DeVault <sir@cmpwn.com>2018-04-22 19:15:49 +0200
commitedbf4a2f60ad05fc46bbb0b83e212e8cc1df2876 (patch)
treeeeff3afce22eedf1e26e49ec6942858243f54b0c /rootston/desktop.c
parent177b548b156ce4b46ff331d7c10f1bf373bf9cf7 (diff)
Implement output auto-selection in rootston
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r--rootston/desktop.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 6ddf56b8..0949b5db 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -326,13 +326,7 @@ bool view_center(struct roots_view *view) {
struct roots_desktop *desktop = view->desktop;
struct roots_input *input = desktop->server->input;
- struct roots_seat *seat = NULL, *_seat;
- wl_list_for_each(_seat, &input->seats, link) {
- if (!seat || (seat->seat->last_event.tv_sec > _seat->seat->last_event.tv_sec &&
- seat->seat->last_event.tv_nsec > _seat->seat->last_event.tv_nsec)) {
- seat = _seat;
- }
- }
+ struct roots_seat *seat = input_last_active_seat(input);
if (!seat) {
return false;
}