mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
move get_resize_name to xcursor
This commit is contained in:
parent
31bafc2461
commit
4c60072be5
5 changed files with 30 additions and 31 deletions
|
|
@ -326,3 +326,26 @@ static int wlr_xcursor_frame_and_duration(struct wlr_xcursor *cursor,
|
|||
int wlr_xcursor_frame(struct wlr_xcursor *_cursor, uint32_t time) {
|
||||
return wlr_xcursor_frame_and_duration(_cursor, time, NULL);
|
||||
}
|
||||
|
||||
const char *wlr_xcursor_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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue