add global current_focus pointer

This commit is contained in:
Zandr Martin 2016-09-17 15:54:45 -05:00
parent 75f82808e2
commit e18b7cdfa9
No known key found for this signature in database
GPG key ID: AA2BB8EF77F7BBDC
3 changed files with 17 additions and 10 deletions

View file

@ -120,6 +120,10 @@ bool set_focused_container(swayc_t *c) {
// dispatch a window event
ipc_event_window(c, "focus");
}
// update the global pointer
current_focus = c;
// update container focus from here to root, making necessary changes along
// the way
swayc_t *p = c;