summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authoregladil <egladil@openttd.org>2006-03-24 10:17:39 +0000
committeregladil <egladil@openttd.org>2006-03-24 10:17:39 +0000
commite38099dc29952d5170bb2fc43aa9168a80364ec2 (patch)
treea8ac7af9b0aee4a2aa62ec261fb6c5c7a3131026 /video
parentb8037ceb8363ed856800e30db4ce29594eff83e5 (diff)
downloadopenttd-e38099dc29952d5170bb2fc43aa9168a80364ec2.tar.xz
(svn r4083) -Feature: [OSX] Ported r4075 (Undraw the mouse when it leaves the window and Draw it again when it enters).
Diffstat (limited to 'video')
-rw-r--r--video/cocoa_v.m12
1 files changed, 10 insertions, 2 deletions
diff --git a/video/cocoa_v.m b/video/cocoa_v.m
index a3f3ed055..5d9d53dfb 100644
--- a/video/cocoa_v.m
+++ b/video/cocoa_v.m
@@ -1692,10 +1692,10 @@ static void QZ_UnsetVideoMode(void)
free(_cocoa_video_data.pixels);
_cocoa_video_data.pixels = NULL;
- QZ_ShowMouse();
-
/* Signal successful teardown */
_cocoa_video_data.isset = false;
+
+ QZ_ShowMouse();
}
@@ -1819,6 +1819,11 @@ static void QZ_ShowMouse(void)
if (!_cocoa_video_data.cursor_visible) {
[ NSCursor unhide ];
_cocoa_video_data.cursor_visible = true;
+
+ // Hide the openttd cursor when leaving the window
+ if (_cocoa_video_data.isset)
+ UndrawMouseCursor();
+ _cursor.in_window = false;
}
}
@@ -1829,6 +1834,9 @@ static void QZ_HideMouse(void)
[ NSCursor hide ];
#endif
_cocoa_video_data.cursor_visible = false;
+
+ // Show the openttd cursor again
+ _cursor.in_window = true;
}
}