aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c12
-rw-r--r--sway/input/keyboard.c20
-rw-r--r--sway/input/seat.c5
3 files changed, 24 insertions, 13 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 331c6c7e..6d57c45f 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -98,6 +98,18 @@ static struct sway_node *node_at_coords(
return NULL;
}
if (ws->fullscreen) {
+ // Try transient containers
+ for (int i = 0; i < ws->floating->length; ++i) {
+ struct sway_container *floater = ws->floating->items[i];
+ if (container_is_transient_for(floater, ws->fullscreen)) {
+ struct sway_container *con = tiling_container_at(
+ &floater->node, lx, ly, surface, sx, sy);
+ if (con) {
+ return &con->node;
+ }
+ }
+ }
+ // Try fullscreen container
struct sway_container *con =
tiling_container_at(&ws->fullscreen->node, lx, ly, surface, sx, sy);
if (con) {
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 5fc8a806..fb1fe7b5 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -264,31 +264,27 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
}
// Identify and execute active pressed binding
- struct sway_binding *next_repeat_binding = NULL;
+ struct sway_binding *binding = NULL;
if (event->state == WLR_KEY_PRESSED) {
- struct sway_binding *binding_pressed = NULL;
get_active_binding(&keyboard->state_keycodes,
- config->current_mode->keycode_bindings, &binding_pressed,
+ config->current_mode->keycode_bindings, &binding,
code_modifiers, false, input_inhibited);
get_active_binding(&keyboard->state_keysyms_translated,
- config->current_mode->keysym_bindings, &binding_pressed,
+ config->current_mode->keysym_bindings, &binding,
translated_modifiers, false, input_inhibited);
get_active_binding(&keyboard->state_keysyms_raw,
- config->current_mode->keysym_bindings, &binding_pressed,
+ config->current_mode->keysym_bindings, &binding,
raw_modifiers, false, input_inhibited);
- if (binding_pressed) {
- if ((binding_pressed->flags & BINDING_RELOAD) == 0) {
- next_repeat_binding = binding_pressed;
- }
- seat_execute_command(seat, binding_pressed);
+ if (binding) {
+ seat_execute_command(seat, binding);
handled = true;
}
}
// Set up (or clear) keyboard repeat for a pressed binding
- if (next_repeat_binding && wlr_device->keyboard->repeat_info.delay > 0) {
- keyboard->repeat_binding = next_repeat_binding;
+ if (binding && wlr_device->keyboard->repeat_info.delay > 0) {
+ keyboard->repeat_binding = binding;
if (wl_event_source_timer_update(keyboard->key_repeat_source,
wlr_device->keyboard->repeat_info.delay) < 0) {
wlr_log(WLR_DEBUG, "failed to set key repeat timer");
diff --git a/sway/input/seat.c b/sway/input/seat.c
index f5cb2f9e..f418785d 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -655,7 +655,10 @@ void seat_set_focus_warp(struct sway_seat *seat, struct sway_node *node,
// Deny setting focus to a view which is hidden by a fullscreen container
if (new_workspace && new_workspace->fullscreen && container &&
!container_is_fullscreen_or_child(container)) {
- return;
+ // Unless it's a transient container
+ if (!container_is_transient_for(container, new_workspace->fullscreen)) {
+ return;
+ }
}
struct sway_output *last_output = last_workspace ?