diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-08 09:22:44 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-08 09:22:44 -0500 |
commit | 35188834db182db43b407b58db167950fab05477 (patch) | |
tree | 4ce63cc7f7f01f1e7cf7fb0f6994c4306ae4cad2 /xcursor | |
parent | e3542d879d50d6239ad4ca24b4d30520fef40a87 (diff) | |
parent | 381a646d2fbcb1b488e1551438444ac267f39138 (diff) |
Merge branch 'master' into feature/xwm-selection
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 +} |