aboutsummaryrefslogtreecommitdiff
path: root/rootston/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r--rootston/cursor.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index f0e3d70d..d38e40a1 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -8,6 +8,7 @@
#endif
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/util/log.h>
+#include <wlr/util/edges.h>
#include "rootston/xcursor.h"
#include "rootston/cursor.h"
@@ -75,22 +76,22 @@ static void roots_cursor_update_position(struct roots_cursor *cursor,
double y = view->y;
int width = cursor->view_width;
int height = cursor->view_height;
- if (cursor->resize_edges & ROOTS_CURSOR_RESIZE_EDGE_TOP) {
+ if (cursor->resize_edges & WLR_EDGE_TOP) {
y = cursor->view_y + dy;
height -= dy;
if (height < 1) {
y += height;
}
- } else if (cursor->resize_edges & ROOTS_CURSOR_RESIZE_EDGE_BOTTOM) {
+ } else if (cursor->resize_edges & WLR_EDGE_BOTTOM) {
height += dy;
}
- if (cursor->resize_edges & ROOTS_CURSOR_RESIZE_EDGE_LEFT) {
+ if (cursor->resize_edges & WLR_EDGE_LEFT) {
x = cursor->view_x + dx;
width -= dx;
if (width < 1) {
x += width;
}
- } else if (cursor->resize_edges & ROOTS_CURSOR_RESIZE_EDGE_RIGHT) {
+ } else if (cursor->resize_edges & WLR_EDGE_RIGHT) {
width += dx;
}
@@ -147,14 +148,14 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
case BTN_RIGHT:
edges = 0;
if (sx < view->wlr_surface->current->width/2) {
- edges |= ROOTS_CURSOR_RESIZE_EDGE_LEFT;
+ edges |= WLR_EDGE_LEFT;
} else {
- edges |= ROOTS_CURSOR_RESIZE_EDGE_RIGHT;
+ edges |= WLR_EDGE_RIGHT;
}
if (sy < view->wlr_surface->current->height/2) {
- edges |= ROOTS_CURSOR_RESIZE_EDGE_TOP;
+ edges |= WLR_EDGE_TOP;
} else {
- edges |= ROOTS_CURSOR_RESIZE_EDGE_BOTTOM;
+ edges |= WLR_EDGE_BOTTOM;
}
roots_seat_begin_resize(seat, view, edges);
break;