1
0
Fork 0

(svn r4083) -Feature: [OSX] Ported r4075 (Undraw the mouse when it leaves the window and Draw it again when it enters).

release/0.5
egladil 2006-03-24 10:17:39 +00:00
parent b8037ceb83
commit e38099dc29
1 changed files with 10 additions and 2 deletions

View File

@ -1692,10 +1692,10 @@ static void QZ_UnsetVideoMode(void)
free(_cocoa_video_data.pixels); free(_cocoa_video_data.pixels);
_cocoa_video_data.pixels = NULL; _cocoa_video_data.pixels = NULL;
QZ_ShowMouse();
/* Signal successful teardown */ /* Signal successful teardown */
_cocoa_video_data.isset = false; _cocoa_video_data.isset = false;
QZ_ShowMouse();
} }
@ -1819,6 +1819,11 @@ static void QZ_ShowMouse(void)
if (!_cocoa_video_data.cursor_visible) { if (!_cocoa_video_data.cursor_visible) {
[ NSCursor unhide ]; [ NSCursor unhide ];
_cocoa_video_data.cursor_visible = true; _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 ]; [ NSCursor hide ];
#endif #endif
_cocoa_video_data.cursor_visible = false; _cocoa_video_data.cursor_visible = false;
// Show the openttd cursor again
_cursor.in_window = true;
} }
} }