@@ -97,18 +97,14 @@ - (BOOL)acceptsFirstResponder
9797// Called whent the parent finishes its live resizing
9898- (void )windowFinishedLiveResize : (NSNotification *)notification
9999{
100- NSSize size = [[self window ] frame ].size ;
101-
102- [[osxPlatState sharedPlatState ] setWindowSize: (S32)size.width height: (S32)size.height];
103-
104- NSRect frame = NSMakeRect (0 , 0 , size.width , size.height );
105-
106- S32 barHeight = frame.size .height ;
107- frame = [NSWindow frameRectForContentRect: frame styleMask: NSTitledWindowMask ];
108- barHeight -= frame.size .height ;
109-
110- NSRect viewFrame = NSMakeRect (0 , barHeight, frame.size .width , frame.size .height );
111-
100+ NSSize actualWindowSize = [[self window ] frame ].size ;
101+ NSRect frame = NSMakeRect (0 , 0 , actualWindowSize.width , actualWindowSize.height );
102+ frame = [NSWindow frameRectForContentRect: frame styleMask: NSWindowStyleMaskTitled];
103+ S32 barHeight = frame.size .height - actualWindowSize.height ;
104+ S32 heightWithoutTitle = actualWindowSize.height - barHeight;
105+ [[osxPlatState sharedPlatState ] setWindowSize: (S32)actualWindowSize.width height: heightWithoutTitle];
106+
107+ NSRect viewFrame = NSMakeRect (0 , 0 , frame.size .width , heightWithoutTitle);
112108 [self setFrame: viewFrame];
113109 [self updateContext ];
114110}
@@ -210,16 +206,16 @@ - (void)getModifierKey:(U32&)modifiers event:(NSEvent *)event;
210206
211207 U32 keyMods = (U32)[event modifierFlags ];
212208
213- if (keyMods & NSShiftKeyMask )
209+ if (keyMods & NSEventModifierFlagShift )
214210 modifiers |= SI_SHIFT;
215211
216- if (keyMods & NSCommandKeyMask )
212+ if (keyMods & NSEventModifierFlagCommand )
217213 modifiers |= SI_ALT;
218214
219- if (keyMods & NSAlternateKeyMask )
215+ if (keyMods & NSEventModifierFlagOption )
220216 modifiers |= SI_MAC_OPT;
221217
222- if (keyMods & NSControlKeyMask )
218+ if (keyMods & NSEventModifierFlagControl )
223219 modifiers |= SI_CTRL;
224220}
225221
@@ -374,13 +370,13 @@ - (void)mouseEntered:(NSEvent *)event
374370{
375371 if (!Canvas->getUseNativeCursor ())
376372 {
377- [ NSCursor hide ] ;
373+ Input::setCursorState ( false ) ;
378374 }
379375}
380376
381377-(void )mouseExited : (NSEvent *)event
382378{
383- [ NSCursor unhide ] ;
379+ Input::setCursorState ( true ) ;
384380}
385381// Default otherMouseDown override
386382- (void )mouseMoved : (NSEvent *)event
0 commit comments