summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/handlers.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 24784330..3b85679d 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -725,6 +725,15 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
725 } 725 }
726 726
727 list_free(candidates); 727 list_free(candidates);
728
729 swayc_t *focused = get_focused_container(&root_container);
730 if (focused->type == C_VIEW) {
731 pid_t pid = wlc_view_get_pid(focused->handle);
732 if (!(get_feature_policy(pid) & FEATURE_KEYBOARD)) {
733 sway_log(L_INFO, "Denying keypress to %d (%s)", pid, focused->name);
734 return EVENT_HANDLED;
735 }
736 }
728 return EVENT_PASSTHROUGH; 737 return EVENT_PASSTHROUGH;
729} 738}
730 739