aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/unmark.c
diff options
context:
space:
mode:
authorftilde <ftilde@tamepointer.de>2020-12-12 00:11:58 +0100
committerTudor Brindus <me@tbrindus.ca>2021-02-25 09:48:39 -0500
commit1afedcb94c0517b5434e2220e63b997cf01427bd (patch)
tree3fae6d855a165e7364540a1474508caa8ae1b708 /sway/commands/unmark.c
parentc6e7cf1ae554f36e5120962ace779737827ad088 (diff)
Fix for_window criteria and mouse button bindings
Previously, the special case handling of scratchpad and unmark commands was (probably accidentally) limited to criteria directly handled in the execute_command function. This would exclude: 1. for_window criteria, as these are handled externally for views and 2. and mouse bindings which select target the node currently under the mouse cursor. As a concrete example `for_window [app_id="foobar"] move scratchpad, scratchpad show` would show (or hide due to the toggling functionality) another window from the scratchpad, instead of showing the window with app_id "foobar". This commit replaces the "using_criteria" flag with "node_overridden" with the more general notion of signifying that the node (and container/workspace) in the current command handler context of the sway config is not defined by the currently focused node, but instead overridden by other means, i.e., criteria or mouse position.
Diffstat (limited to 'sway/commands/unmark.c')
-rw-r--r--sway/commands/unmark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/unmark.c b/sway/commands/unmark.c
index cedfcfb2..19274dfb 100644
--- a/sway/commands/unmark.c
+++ b/sway/commands/unmark.c
@@ -21,7 +21,7 @@ static void remove_all_marks_iterator(struct sway_container *con, void *data) {
struct cmd_results *cmd_unmark(int argc, char **argv) {
// Determine the container
struct sway_container *con = NULL;
- if (config->handler_context.using_criteria) {
+ if (config->handler_context.node_overridden) {
con = config->handler_context.container;
}