aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mac.m b/src/mac.m
index f93f80c..ab8ea68 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -1672,6 +1672,19 @@ puglGetClipboard(PuglView* const view,
}
static NSCursor*
+extendedCursor(const SEL cursorSelector)
+{
+ if (cursorSelector && [NSCursor respondsToSelector:cursorSelector]) {
+ const id object = [NSCursor performSelector:cursorSelector];
+ if ([object isKindOfClass:[NSCursor class]]) {
+ return (NSCursor*)object;
+ }
+ }
+
+ return NULL;
+}
+
+static NSCursor*
puglGetNsCursor(const PuglCursor cursor)
{
switch (cursor) {
@@ -1689,6 +1702,10 @@ puglGetNsCursor(const PuglCursor cursor)
return [NSCursor resizeLeftRightCursor];
case PUGL_CURSOR_UP_DOWN:
return [NSCursor resizeUpDownCursor];
+ case PUGL_CURSOR_UP_LEFT_DOWN_RIGHT:
+ return extendedCursor(@selector(_windowResizeNorthWestSouthEastCursor));
+ case PUGL_CURSOR_UP_RIGHT_DOWN_LEFT:
+ return extendedCursor(@selector(_windowResizeNorthEastSouthWestCursor));
}
return NULL;