src/osx/native_window.mm in reflexion-0.1.42 vs src/osx/native_window.mm in reflexion-0.1.43
- old
+ new
@@ -240,10 +240,13 @@
return NO;
}
- (void) windowWillClose: (NSNotification*) notification
{
+ if (self.isKeyWindow)
+ Window_call_deactivate_event(self.window);
+
[self stopTimer];
[self unbind];
[self setDelegate: nil];
}
@@ -302,9 +305,19 @@
View_set_frame(win->root(), b);
win->on_resize(&e);
}
}
+ }
+
+ - (void) windowDidBecomeKey: (NSNotification*) notification
+ {
+ Window_call_activate_event(self.window);
+ }
+
+ - (void) windowDidResignKey: (NSNotification*) notification
+ {
+ Window_call_deactivate_event(self.window);
}
- (void) keyDown: (NSEvent*) event
{
Reflex::Window* win = self.window;