mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 16:35:36 +00:00
app,app/internal/window: [macOS] add app.Window.Close for closing a window
Recently support was added for multiple top-level windows. Add support for closing those windows. macOS only; all others stubbed out. Signed-off-by: Larry Clapp <larry@theclapp.org>
This commit is contained in:
@@ -153,6 +153,11 @@ void gio_appTerminate(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void gio_close(CFTypeRef windowRef) {
|
||||
NSWindow* window = (__bridge NSWindow *)windowRef;
|
||||
[window performClose:nil];
|
||||
}
|
||||
|
||||
@implementation GioAppDelegate
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
|
||||
|
||||
Reference in New Issue
Block a user