mousebindings: use available resize edges first in drag actions

This commit is contained in:
ARDiDo 2022-01-07 16:19:51 -05:00 committed by Johan Malm
parent a893607a0e
commit a6a923c506

View file

@ -234,7 +234,7 @@ process_cursor_motion(struct server *server, uint32_t time)
if (mousebind->mouse_event == MOUSE_ACTION_DRAG if (mousebind->mouse_event == MOUSE_ACTION_DRAG
&& mousebind->pressed_in_context) { && mousebind->pressed_in_context) {
/* Find closest resize edges in case action is Resize */ /* Find closest resize edges in case action is Resize */
if (view) { if (view && !resize_edges) {
resize_edges |= server->seat.cursor->x resize_edges |= server->seat.cursor->x
< view->x + view->w / 2 ? WLR_EDGE_LEFT < view->x + view->w / 2 ? WLR_EDGE_LEFT
: WLR_EDGE_RIGHT; : WLR_EDGE_RIGHT;