diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-15 06:49:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-15 06:49:29 -0700 |
commit | 8e05fb782658f0bc13cfba6c069ba39122417317 (patch) | |
tree | 87a568ff97fc94ca82b9ceb4abacb02ea86a9f71 /sway/input/seat.c | |
parent | 53e3f35ba348d6285478ceb4a93b020e138c95c7 (diff) | |
parent | a120d4c79f9406a2f7cc38c60069d3183c98ea87 (diff) |
Merge pull request #2275 from RyanDwyer/transactionise-focus
Make focus part of transactions
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 5e65ca70..74f1375e 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -661,9 +661,13 @@ void seat_set_focus_warp(struct sway_seat *seat, if (last_focus) { seat_send_unfocus(last_focus, seat); } - seat_send_focus(container, seat); - container_damage_whole(container->parent); + + container_set_dirty(container); + container_set_dirty(container->parent); // for focused_inactive_child + if (last_focus) { + container_set_dirty(last_focus); + } } // If we've focused a floating container, bring it to the front. @@ -717,10 +721,6 @@ void seat_set_focus_warp(struct sway_seat *seat, } } - if (last_focus) { - container_damage_whole(last_focus); - } - if (last_workspace && last_workspace != new_workspace) { cursor_send_pointer_motion(seat->cursor, 0, true); } @@ -840,18 +840,6 @@ struct sway_container *seat_get_active_child(struct sway_seat *seat, return NULL; } -struct sway_container *seat_get_active_current_child(struct sway_seat *seat, - struct sway_container *container) { - struct sway_seat_container *current = NULL; - wl_list_for_each(current, &seat->focus_stack, link) { - if (current->container->current.parent == container && - current->container->current.layout != L_FLOATING) { - return current->container; - } - } - return NULL; -} - struct sway_container *seat_get_focus(struct sway_seat *seat) { if (!seat->has_focus) { return NULL; |