bring edges into wlr

This commit is contained in:
Tony Crisci 2017-12-07 11:19:43 -05:00
parent f469784bbc
commit d74ac69f7b
9 changed files with 53 additions and 47 deletions

View file

@ -82,3 +82,26 @@ void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager,
theme->scale);
}
}
const char *wlr_xcursor_manager_get_resize_name(enum wlr_edges edges) {
if (edges & WLR_EDGE_TOP) {
if (edges & WLR_EDGE_RIGHT) {
return "ne-resize";
} else if (edges & WLR_EDGE_LEFT) {
return "nw-resize";
}
return "n-resize";
} else if (edges & WLR_EDGE_BOTTOM) {
if (edges & WLR_EDGE_RIGHT) {
return "se-resize";
} else if (edges & WLR_EDGE_LEFT) {
return "sw-resize";
}
return "s-resize";
} else if (edges & WLR_EDGE_RIGHT) {
return "e-resize";
} else if (edges & WLR_EDGE_LEFT) {
return "w-resize";
}
return "se-resize"; // fallback
}