mirror of
https://github.com/swaywm/sway.git
synced 2025-11-21 06:59:48 -05:00
Don't track damage for views on inactive tabs
This commit is contained in:
parent
bd79584f65
commit
efc07fb3d4
6 changed files with 52 additions and 11 deletions
|
|
@ -718,6 +718,18 @@ struct sway_container *seat_get_focus_inactive(struct sway_seat *seat,
|
|||
return seat_get_focus_by_type(seat, container, C_TYPES);
|
||||
}
|
||||
|
||||
struct sway_container *seat_get_active_child(struct sway_seat *seat,
|
||||
struct sway_container *container) {
|
||||
struct sway_container *focus = seat_get_focus_inactive(seat, container);
|
||||
if (!focus) {
|
||||
return NULL;
|
||||
}
|
||||
while (focus->parent != container) {
|
||||
focus = focus->parent;
|
||||
}
|
||||
return focus;
|
||||
}
|
||||
|
||||
struct sway_container *sway_seat_get_focus(struct sway_seat *seat) {
|
||||
if (!seat->has_focus) {
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue