mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
Make focus part of transactions
Rather than maintain copies of the entire focus stack, this PR transactionises the focus by introducing two new properties to the container state and using those when rendering. * `bool focused` means this container has actual focus. Only one container should have this equalling true in its current state. * `struct sway_container *focus_inactive_child` points to the immediate child that was most recently focused (eg. for tabbed and stacked containers).
This commit is contained in:
parent
53e3f35ba3
commit
a120d4c79f
10 changed files with 55 additions and 73 deletions
|
|
@ -68,6 +68,9 @@ struct sway_container_state {
|
|||
struct sway_container *parent;
|
||||
list_t *children;
|
||||
|
||||
struct sway_container *focused_inactive_child;
|
||||
bool focused;
|
||||
|
||||
// View properties
|
||||
double view_x, view_y;
|
||||
double view_width, view_height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue