commit 9a5f09c867894dacf25f54929cfd808b301712b1
parent 136765a530f9cd2242c152292aaaeec46443c968
Author: Furkan Sahin <furkan-dev@proton.me>
Date: Fri, 17 Apr 2026 18:10:35 -0400
input/seat: fix drag-and-drop regression and improve popup dismissal
Diffstat:
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/sway/input/seat.c b/sway/input/seat.c
@@ -1071,6 +1071,7 @@ bool seat_is_input_allowed(struct sway_seat *seat,
static void send_unfocus(struct sway_container *con, void *data) {
if (con->view) {
+ view_close_popups(con->view);
view_set_activated(con->view, false);
}
}
@@ -1079,7 +1080,6 @@ static void send_unfocus(struct sway_container *con, void *data) {
static void seat_send_unfocus(struct sway_node *node, struct sway_seat *seat) {
sway_cursor_constrain(seat->cursor, NULL);
wlr_seat_keyboard_notify_clear_focus(seat->wlr_seat);
- wlr_seat_keyboard_end_grab(seat->wlr_seat);
if (node->type == N_WORKSPACE) {
workspace_for_each_container(node->sway_workspace, send_unfocus, seat);
} else {
@@ -1136,10 +1136,6 @@ static void seat_set_workspace_focus(struct sway_seat *seat, struct sway_node *n
struct sway_workspace *last_workspace = seat_get_focused_workspace(seat);
if (node == NULL) {
- // Close any popups on the old focus
- if (node_is_view(last_focus)) {
- view_close_popups(last_focus->sway_container->view);
- }
seat_send_unfocus(last_focus, seat);
sway_input_method_relay_set_focus(&seat->im_relay, NULL);
seat->has_focus = false;
@@ -1228,11 +1224,6 @@ static void seat_set_workspace_focus(struct sway_seat *seat, struct sway_node *n
}
}
- // Close any popups on the old focus
- if (last_focus && node_is_view(last_focus)) {
- view_close_popups(last_focus->sway_container->view);
- }
-
// If urgent, either unset the urgency or start a timer to unset it
if (container && container->view && view_is_urgent(container->view) &&
!container->view->urgent_timer) {