diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-04 13:39:10 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-04 14:08:54 -0500 |
commit | 515150229847c9ebdfd0cabb6f0026fca9d57a23 (patch) | |
tree | 8a50ce0ac8ce4dc2ec973c63c68dc45378c50737 /sway/commands.c | |
parent | b28602aa7425cf435150e6008624429737e037d3 (diff) |
basic focus overhaul
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c index 0d4aa104..6bb4db0b 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -281,7 +281,10 @@ struct cmd_results *handle_command(char *_exec) { seat = sway_input_manager_get_default_seat(input_manager); } if (seat) { - config->handler_context.current_container = seat->focus; + config->handler_context.current_container = + (seat->has_focus ? + sway_seat_get_focus(seat, &root_container) : + NULL); struct cmd_results *res = handler->handle(argc-1, argv+1); if (res->status != CMD_SUCCESS) { free_argv(argc, argv); |