basic focus overhaul

This commit is contained in:
Tony Crisci 2018-02-04 13:39:10 -05:00
parent b28602aa74
commit 5151502298
12 changed files with 224 additions and 39 deletions

View file

@ -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);