From 842609da6432c054c19c8d10f1660085653daa64 Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Wed, 30 Nov 2022 12:02:10 -0700 Subject: view: make request_activate take a seat This way we can move focus on the same seat an activation token originates from. --- sway/tree/view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/view.c b/sway/tree/view.c index ec0ad4af..ba3ef489 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -366,12 +366,14 @@ void view_set_activated(struct sway_view *view, bool activated) { } } -void view_request_activate(struct sway_view *view) { +void view_request_activate(struct sway_view *view, struct sway_seat *seat) { struct sway_workspace *ws = view->container->pending.workspace; if (!ws) { // hidden scratchpad container return; } - struct sway_seat *seat = input_manager_current_seat(); + if (!seat) { + seat = input_manager_current_seat(); + } switch (config->focus_on_window_activation) { case FOWA_SMART: -- cgit v1.2.3