diff options
| author | emersion <contact@emersion.fr> | 2017-12-14 20:31:18 +0100 | 
|---|---|---|
| committer | emersion <contact@emersion.fr> | 2017-12-14 20:31:18 +0100 | 
| commit | 466e86b7b2cbefa55ad5b85a97ee8257c24cb81b (patch) | |
| tree | cc1691ec5abefdffcb8ac6312574ffa03bc4049a /xcursor/wlr_xcursor.c | |
| parent | eb763439f75d3c9174280d0c75ef44941dd99340 (diff) | |
| parent | a9fb071d49b244b72846b384a9e2ef2d9b03a05f (diff) | |
| download | wlroots-466e86b7b2cbefa55ad5b85a97ee8257c24cb81b.tar.xz | |
Merge branch 'master' into surface-transform
Diffstat (limited to 'xcursor/wlr_xcursor.c')
| -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 +}  | 
