diff options
author | emersion <contact@emersion.fr> | 2017-12-11 16:14:03 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-12-11 16:14:03 +0100 |
commit | c67a5824b8831b50e9f3b09cc182f496fb973321 (patch) | |
tree | 0a4f6090819e680bcd611388c8cbe867fbb4983a /xcursor | |
parent | 6001235b0465ba1961f8abd66a860bcf1f14fc22 (diff) | |
parent | 808ab5aa1bd990776ae30d5f9bb171ca7b42d6ef (diff) | |
download | wlroots-c67a5824b8831b50e9f3b09cc182f496fb973321.tar.xz |
Merge branch 'master' into display-destroy
Diffstat (limited to 'xcursor')
-rw-r--r-- | xcursor/wlr_xcursor.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/xcursor/wlr_xcursor.c b/xcursor/wlr_xcursor.c index fdebe1af..b1678223 100644 --- a/xcursor/wlr_xcursor.c +++ b/xcursor/wlr_xcursor.c @@ -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 +} |