Commit f6beb73a authored by hybrid's avatar hybrid

Added some window status fixes for OSX.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1602 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 04d22188
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@interface AppDelegate : NSObject @interface AppDelegate : NSObject
{ {
BOOL _quit; BOOL _quit;
irr::CIrrDeviceMacOSX *_device; irr::CIrrDeviceMacOSX *_device;
} }
......
...@@ -20,22 +20,22 @@ ...@@ -20,22 +20,22 @@
- (void)orderFrontStandardAboutPanel:(id)sender - (void)orderFrontStandardAboutPanel:(id)sender
{ {
[NSApp orderFrontStandardAboutPanel:sender]; [NSApp orderFrontStandardAboutPanel:sender];
} }
- (void)unhideAllApplications:(id)sender - (void)unhideAllApplications:(id)sender
{ {
[NSApp unhideAllApplications:sender]; [NSApp unhideAllApplications:sender];
} }
- (void)hide:(id)sender - (void)hide:(id)sender
{ {
[NSApp hide:sender]; [NSApp hide:sender];
} }
- (void)hideOtherApplications:(id)sender - (void)hideOtherApplications:(id)sender
{ {
[NSApp hideOtherApplications:sender]; [NSApp hideOtherApplications:sender];
} }
- (void)terminate:(id)sender - (void)terminate:(id)sender
...@@ -43,11 +43,16 @@ ...@@ -43,11 +43,16 @@
_quit = TRUE; _quit = TRUE;
} }
- (void)windowWillClose:(id)sender
{
_quit = TRUE;
}
- (void)windowDidResize:(NSNotification *)aNotification - (void)windowDidResize:(NSNotification *)aNotification
{ {
NSWindow *window; NSWindow *window;
NSRect frame; NSRect frame;
window = [aNotification object]; window = [aNotification object];
frame = [window frame]; frame = [window frame];
_device->setResize((int)frame.size.width,(int)frame.size.height); _device->setResize((int)frame.size.width,(int)frame.size.height);
......
...@@ -485,14 +485,16 @@ bool CIrrDeviceMacOSX::isWindowActive() const ...@@ -485,14 +485,16 @@ bool CIrrDeviceMacOSX::isWindowActive() const
bool CIrrDeviceMacOSX::isWindowFocused() const bool CIrrDeviceMacOSX::isWindowFocused() const
{ {
// TODO: return proper value if (_window != NULL)
return true; return [(NSWindow *)_window isKeyWindow];
return false;
} }
bool CIrrDeviceMacOSX::isWindowMinimized() const bool CIrrDeviceMacOSX::isWindowMinimized() const
{ {
// TODO: return proper value if (_window != NULL)
return [(NSWindow *)_window isMiniaturized];
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment