parent
f469784bbc
commit
d74ac69f7b
@ -0,0 +1,12 @@
|
||||
#ifndef WLR_UTIL_EDGES_H
|
||||
#define WLR_UTIL_EDGES_H
|
||||
|
||||
enum wlr_edges {
|
||||
WLR_EDGE_NONE = 0,
|
||||
WLR_EDGE_TOP = 1,
|
||||
WLR_EDGE_BOTTOM = 2,
|
||||
WLR_EDGE_LEFT = 4,
|
||||
WLR_EDGE_RIGHT = 8,
|
||||
};
|
||||
|
||||
#endif
|
@ -1,28 +0,0 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "rootston/xcursor.h"
|
||||
#include "rootston/input.h"
|
||||
|
||||
const char *roots_xcursor_get_resize_name(uint32_t edges) {
|
||||
if (edges & ROOTS_CURSOR_RESIZE_EDGE_TOP) {
|
||||
if (edges & ROOTS_CURSOR_RESIZE_EDGE_RIGHT) {
|
||||
return "ne-resize";
|
||||
} else if (edges & ROOTS_CURSOR_RESIZE_EDGE_LEFT) {
|
||||
return "nw-resize";
|
||||
}
|
||||
return "n-resize";
|
||||
} else if (edges & ROOTS_CURSOR_RESIZE_EDGE_BOTTOM) {
|
||||
if (edges & ROOTS_CURSOR_RESIZE_EDGE_RIGHT) {
|
||||
return "se-resize";
|
||||
} else if (edges & ROOTS_CURSOR_RESIZE_EDGE_LEFT) {
|
||||
return "sw-resize";
|
||||
}
|
||||
return "s-resize";
|
||||
} else if (edges & ROOTS_CURSOR_RESIZE_EDGE_RIGHT) {
|
||||
return "e-resize";
|
||||
} else if (edges & ROOTS_CURSOR_RESIZE_EDGE_LEFT) {
|
||||
return "w-resize";
|
||||
}
|
||||
return "se-resize"; // fallback
|
||||
}
|
Loading…
Reference in new issue