|
|
@ -11,6 +11,7 @@
|
|
|
|
#include "sway/criteria.h"
|
|
|
|
#include "sway/criteria.h"
|
|
|
|
#include "sway/security.h"
|
|
|
|
#include "sway/security.h"
|
|
|
|
#include "sway/input/input-manager.h"
|
|
|
|
#include "sway/input/input-manager.h"
|
|
|
|
|
|
|
|
#include "sway/input/seat.h"
|
|
|
|
#include "stringop.h"
|
|
|
|
#include "stringop.h"
|
|
|
|
#include "log.h"
|
|
|
|
#include "log.h"
|
|
|
|
|
|
|
|
|
|
|
@ -271,7 +272,14 @@ struct cmd_results *handle_command(char *_exec) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!has_criteria) {
|
|
|
|
if (!has_criteria) {
|
|
|
|
config->handler_context.current_container = NULL;
|
|
|
|
// without criteria, the command acts upon the focused
|
|
|
|
|
|
|
|
// container
|
|
|
|
|
|
|
|
struct sway_seat *seat = config->handler_context.seat;
|
|
|
|
|
|
|
|
if (!seat) {
|
|
|
|
|
|
|
|
seat = sway_input_manager_get_default_seat(input_manager);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (seat) {
|
|
|
|
|
|
|
|
config->handler_context.current_container = seat->focus;
|
|
|
|
struct cmd_results *res = handler->handle(argc-1, argv+1);
|
|
|
|
struct cmd_results *res = handler->handle(argc-1, argv+1);
|
|
|
|
if (res->status != CMD_SUCCESS) {
|
|
|
|
if (res->status != CMD_SUCCESS) {
|
|
|
|
free_argv(argc, argv);
|
|
|
|
free_argv(argc, argv);
|
|
|
@ -282,8 +290,8 @@ struct cmd_results *handle_command(char *_exec) {
|
|
|
|
goto cleanup;
|
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free_cmd_results(res);
|
|
|
|
free_cmd_results(res);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
wlr_log(L_DEBUG, "@@ running command on containers");
|
|
|
|
|
|
|
|
for (int i = 0; i < containers->length; ++i) {
|
|
|
|
for (int i = 0; i < containers->length; ++i) {
|
|
|
|
config->handler_context.current_container = containers->items[i];
|
|
|
|
config->handler_context.current_container = containers->items[i];
|
|
|
|
struct cmd_results *res = handler->handle(argc-1, argv+1);
|
|
|
|
struct cmd_results *res = handler->handle(argc-1, argv+1);
|
|
|
|