From e18b7cdfa920d536e4911a7ccbc2d6da5ae759f4 Mon Sep 17 00:00:00 2001 From: Zandr Martin Date: Sat, 17 Sep 2016 15:54:45 -0500 Subject: add global `current_focus` pointer --- sway/focus.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sway/focus.c') diff --git a/sway/focus.c b/sway/focus.c index 02e61ac2..b94dcbc7 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -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; -- cgit v1.2.3