diff options
author | crupest <crupest@outlook.com> | 2022-01-29 21:07:48 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-29 21:07:48 +0800 |
commit | 30060773b06d93ae08a8c6fa5836c81e595594ed (patch) | |
tree | f333e807eef86442eff0b489bb2460bfbf99e794 /src/osx | |
parent | 90261a333f251cc241f186f0ee6ed8e12787cc02 (diff) | |
download | cru-30060773b06d93ae08a8c6fa5836c81e595594ed.tar.gz cru-30060773b06d93ae08a8c6fa5836c81e595594ed.tar.bz2 cru-30060773b06d93ae08a8c6fa5836c81e595594ed.zip |
...
Diffstat (limited to 'src/osx')
-rw-r--r-- | src/osx/gui/Window.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osx/gui/Window.mm b/src/osx/gui/Window.mm index 3bea5543..6ed53701 100644 --- a/src/osx/gui/Window.mm +++ b/src/osx/gui/Window.mm @@ -375,6 +375,12 @@ void OsxWindow::SetCursor(std::shared_ptr<ICursor> cursor) { } } +void OsxWindow::SetToForeground() { + if (!p_->window_) return; + [p_->window_ makeMainWindow]; + [p_->window_ orderFrontRegardless]; +} + IEvent<std::nullptr_t>* OsxWindow::CreateEvent() { return &p_->create_event_; } IEvent<std::nullptr_t>* OsxWindow::DestroyEvent() { return &p_->destroy_event_; } IEvent<std::nullptr_t>* OsxWindow::PaintEvent() { return &p_->paint_event_; } |