diff options
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seatop_default.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index 2bce2f77..b8265441 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c | |||
@@ -338,10 +338,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, | |||
338 | if (button == btn_move && (mod_pressed || on_titlebar)) { | 338 | if (button == btn_move && (mod_pressed || on_titlebar)) { |
339 | seat_set_focus_container(seat, | 339 | seat_set_focus_container(seat, |
340 | seat_get_focus_inactive_view(seat, &cont->node)); | 340 | seat_get_focus_inactive_view(seat, &cont->node)); |
341 | while (cont->parent) { | 341 | seatop_begin_move_floating(seat, container_toplevel_ancestor(cont)); |
342 | cont = cont->parent; | ||
343 | } | ||
344 | seatop_begin_move_floating(seat, cont); | ||
345 | return; | 342 | return; |
346 | } | 343 | } |
347 | } | 344 | } |
@@ -359,10 +356,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, | |||
359 | uint32_t btn_resize = config->floating_mod_inverse ? | 356 | uint32_t btn_resize = config->floating_mod_inverse ? |
360 | BTN_LEFT : BTN_RIGHT; | 357 | BTN_LEFT : BTN_RIGHT; |
361 | if (mod_pressed && button == btn_resize) { | 358 | if (mod_pressed && button == btn_resize) { |
362 | struct sway_container *floater = cont; | 359 | struct sway_container *floater = container_toplevel_ancestor(cont); |
363 | while (floater->parent) { | ||
364 | floater = floater->parent; | ||
365 | } | ||
366 | edge = 0; | 360 | edge = 0; |
367 | edge |= cursor->cursor->x > floater->x + floater->width / 2 ? | 361 | edge |= cursor->cursor->x > floater->x + floater->width / 2 ? |
368 | WLR_EDGE_RIGHT : WLR_EDGE_LEFT; | 362 | WLR_EDGE_RIGHT : WLR_EDGE_LEFT; |