diff options
author | Ronan Pigott <ronan@rjp.ie> | 2022-11-30 12:02:10 -0700 |
---|---|---|
committer | Ronan Pigott <ronan@rjp.ie> | 2023-02-05 00:53:47 -0700 |
commit | 842609da6432c054c19c8d10f1660085653daa64 (patch) | |
tree | 679a42fc407a1e11ef1f29daa755489202fcf54e /sway/tree/view.c | |
parent | ci: install hwdata-dev on Alpine (diff) | |
download | sway-842609da6432c054c19c8d10f1660085653daa64.tar.gz sway-842609da6432c054c19c8d10f1660085653daa64.tar.zst sway-842609da6432c054c19c8d10f1660085653daa64.zip |
view: make request_activate take a seat
This way we can move focus on the same seat an activation token
originates from.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) { | |||
366 | } | 366 | } |
367 | } | 367 | } |
368 | 368 | ||
369 | void view_request_activate(struct sway_view *view) { | 369 | void view_request_activate(struct sway_view *view, struct sway_seat *seat) { |
370 | struct sway_workspace *ws = view->container->pending.workspace; | 370 | struct sway_workspace *ws = view->container->pending.workspace; |
371 | if (!ws) { // hidden scratchpad container | 371 | if (!ws) { // hidden scratchpad container |
372 | return; | 372 | return; |
373 | } | 373 | } |
374 | struct sway_seat *seat = input_manager_current_seat(); | 374 | if (!seat) { |
375 | seat = input_manager_current_seat(); | ||
376 | } | ||
375 | 377 | ||
376 | switch (config->focus_on_window_activation) { | 378 | switch (config->focus_on_window_activation) { |
377 | case FOWA_SMART: | 379 | case FOWA_SMART: |