diff --git a/AppKit/NSCursor.m b/AppKit/NSCursor.m index 20eae804..dbfe249c 100755 --- a/AppKit/NSCursor.m +++ b/AppKit/NSCursor.m @@ -14,9 +14,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI @implementation NSCursor +static NSMutableArray *_cursorStack=nil; + ++(void)initialize { + if(self==[NSCursor class]){ + _cursorStack=[[NSMutableArray alloc] init]; + } +} + +(NSCursor *)currentCursor { - NSUnimplementedMethod(); - return 0; + return [_cursorStack lastObject]; } -initWithCoder:(NSCoder *)coder { @@ -214,19 +221,30 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } -(void)pop { - NSUnimplementedMethod(); + [isa pop]; } -(void)set { + if([_cursorStack count]) + [_cursorStack removeLastObject]; + + [_cursorStack addObject:self]; [[NSDisplay currentDisplay] setCursor:_cursor]; } -(void)push { - NSUnimplementedMethod(); + [_cursorStack addObject:self]; + [[NSDisplay currentDisplay] setCursor:_cursor]; } +(void)pop { - NSUnimplementedMethod(); + if([_cursorStack count]<2) + return; + + [_cursorStack removeLastObject]; + + NSCursor *cursor=[_cursorStack lastObject]; + [[NSDisplay currentDisplay] setCursor:cursor->_cursor]; } @end diff --git a/AppKit/Win32.subproj/Win32Cursor.m b/AppKit/Win32.subproj/Win32Cursor.m index 2c5e7fdd..74b425b2 100755 --- a/AppKit/Win32.subproj/Win32Cursor.m +++ b/AppKit/Win32.subproj/Win32Cursor.m @@ -25,19 +25,19 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI else if([name isEqualToString:@"IBeamCursor"]) idc=IDC_IBEAM; else if([name isEqualToString:@"openHandCursor"]) - idc=IDC_ARROW; + idc=IDC_HAND; else if([name isEqualToString:@"pointingHandCursor"]) idc=IDC_HAND; else if([name isEqualToString:@"resizeDownCursor"]) - idc=IDC_ARROW; + idc=IDC_SIZENS; else if([name isEqualToString:@"resizeLeftCursor"]) - idc=IDC_ARROW; + idc=IDC_SIZEWE; else if([name isEqualToString:@"resizeLeftRightCursor"]) idc=IDC_SIZEWE; else if([name isEqualToString:@"resizeRightCursor"]) - idc=IDC_ARROW; + idc=IDC_SIZEWE; else if([name isEqualToString:@"resizeUpCursor"]) - idc=IDC_ARROW; + idc=IDC_SIZENS; else if([name isEqualToString:@"resizeUpDownCursor"]) idc=IDC_SIZENS; diff --git a/Cocotron/Cocotron.xcodeproj/project.pbxproj b/Cocotron/Cocotron.xcodeproj/project.pbxproj index f1314b6d..565ab759 100644 --- a/Cocotron/Cocotron.xcodeproj/project.pbxproj +++ b/Cocotron/Cocotron.xcodeproj/project.pbxproj @@ -27,14 +27,14 @@ isa = PBXContainerItemProxy; containerPortal = FE0513E4121E06D90097BA92 /* Security.xcodeproj */; proxyType = 2; - remoteGlobalIDString = 8DC2EF5B0486A6940098B216 /* Security.framework */; + remoteGlobalIDString = 8DC2EF5B0486A6940098B216; remoteInfo = "Security-Windows-i386"; }; FE0513EE121E06DF0097BA92 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = FE0513E4121E06D90097BA92 /* Security.xcodeproj */; proxyType = 1; - remoteGlobalIDString = 8DC2EF4F0486A6940098B216 /* Security-Windows-i386 */; + remoteGlobalIDString = 8DC2EF4F0486A6940098B216; remoteInfo = "Security-Windows-i386"; }; FE1FC00911E7806100A9A87A /* PBXContainerItemProxy */ = {