|
|
|
@ -116,10 +116,15 @@ public: |
|
|
|
{ |
|
|
|
SetPosition(lastPositionSet); |
|
|
|
UpdateStyle(); |
|
|
|
|
|
|
|
[Window makeKeyAndOrderFront:Window]; |
|
|
|
[NSApp activateIgnoringOtherApps:YES]; |
|
|
|
|
|
|
|
if(ShouldTakeFocusOnShow()) |
|
|
|
{ |
|
|
|
[Window makeKeyAndOrderFront:Window]; |
|
|
|
[NSApp activateIgnoringOtherApps:YES]; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
[Window orderFront: Window]; |
|
|
|
} |
|
|
|
[Window setTitle:_lastTitle]; |
|
|
|
|
|
|
|
_shown = true; |
|
|
|
@ -128,6 +133,11 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
virtual bool ShouldTakeFocusOnShow() |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
virtual HRESULT Hide () override |
|
|
|
{ |
|
|
|
@autoreleasepool |
|
|
|
@ -774,6 +784,15 @@ private: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
virtual HRESULT TakeFocusFromChildren () override |
|
|
|
{ |
|
|
|
if(Window == nil) |
|
|
|
return S_OK; |
|
|
|
if([Window isKeyWindow]) |
|
|
|
[Window makeFirstResponder: View]; |
|
|
|
return S_OK; |
|
|
|
} |
|
|
|
|
|
|
|
void EnterFullScreenMode () |
|
|
|
{ |
|
|
|
_fullScreenActive = true; |
|
|
|
@ -1858,7 +1877,6 @@ private: |
|
|
|
WindowEvents = events; |
|
|
|
[Window setLevel:NSPopUpMenuWindowLevel]; |
|
|
|
} |
|
|
|
|
|
|
|
protected: |
|
|
|
virtual NSWindowStyleMask GetStyle() override |
|
|
|
{ |
|
|
|
@ -1876,6 +1894,11 @@ protected: |
|
|
|
return S_OK; |
|
|
|
} |
|
|
|
} |
|
|
|
public: |
|
|
|
virtual bool ShouldTakeFocusOnShow() override |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
extern IAvnPopup* CreateAvnPopup(IAvnWindowEvents*events, IAvnGlContext* gl) |
|
|
|
|