mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
cursor: fix setting of resize_edges
Only calculate nearest `resize_edges` if not clear from the server-side deco under the cursor.
This commit is contained in:
parent
6a190797b6
commit
8d070ab2f4
1 changed files with 6 additions and 2 deletions
|
|
@ -592,8 +592,12 @@ cursor_button(struct wl_listener *listener, void *data)
|
|||
|
||||
/* Determine closest resize edges in case action is Resize */
|
||||
resize_edges = ssd_resize_edges(view_area);
|
||||
resize_edges |= server->seat.cursor->x < view->x + view->w / 2 ? WLR_EDGE_LEFT : WLR_EDGE_RIGHT;
|
||||
resize_edges |= server->seat.cursor->y < view->y + view->h / 2 ? WLR_EDGE_TOP : WLR_EDGE_BOTTOM;
|
||||
if (!resize_edges) {
|
||||
resize_edges |= server->seat.cursor->x < view->x + view->w / 2
|
||||
? WLR_EDGE_LEFT : WLR_EDGE_RIGHT;
|
||||
resize_edges |= server->seat.cursor->y < view->y + view->h / 2
|
||||
? WLR_EDGE_TOP : WLR_EDGE_BOTTOM;
|
||||
}
|
||||
|
||||
mousebindings:
|
||||
if (event->state == WLR_BUTTON_RELEASED) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue