mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
Fixed mac app termination and warnings
This commit is contained in:
parent
0e0eb5f41f
commit
a2e9f5efcb
@ -864,8 +864,7 @@ BOOL mac_pre_connect(freerdp *instance)
|
|||||||
if (!settings->ServerHostname)
|
if (!settings->ServerHostname)
|
||||||
{
|
{
|
||||||
WLog_ERR(TAG, "error: server hostname was not specified with /v:<server>[:port]");
|
WLog_ERR(TAG, "error: server hostname was not specified with /v:<server>[:port]");
|
||||||
[NSApp terminate:nil];
|
return FALSE;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settings->OsMajorType = OSMAJORTYPE_MACINTOSH;
|
settings->OsMajorType = OSMAJORTYPE_MACINTOSH;
|
||||||
|
@ -73,6 +73,10 @@ void mac_set_view_size(rdpContext *context, MRDPView *view);
|
|||||||
|
|
||||||
[window setTitle:winTitle];
|
[window setTitle:winTitle];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[NSApp terminate:self];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationWillBecomeActive:(NSNotification *)notification
|
- (void)applicationWillBecomeActive:(NSNotification *)notification
|
||||||
@ -92,6 +96,7 @@ void mac_set_view_size(rdpContext *context, MRDPView *view);
|
|||||||
[mrdpView releaseResources];
|
[mrdpView releaseResources];
|
||||||
_singleDelegate = nil;
|
_singleDelegate = nil;
|
||||||
NSLog(@"Stopped.\n");
|
NSLog(@"Stopped.\n");
|
||||||
|
[NSApp terminate:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
return NSApplicationMain(argc, argv);
|
return NSApplicationMain(argc, argv);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
return NSApplicationMain(argc, (const char **)argv);
|
return NSApplicationMain(argc, argv);
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@ static int mfreerdp_client_stop(rdpContext *context)
|
|||||||
{
|
{
|
||||||
mfContext *mfc = (mfContext *)context;
|
mfContext *mfc = (mfContext *)context;
|
||||||
|
|
||||||
|
freerdp_abort_connect(context->instance);
|
||||||
if (mfc->thread)
|
if (mfc->thread)
|
||||||
{
|
{
|
||||||
SetEvent(mfc->stopEvent);
|
SetEvent(mfc->stopEvent);
|
||||||
@ -97,7 +98,6 @@ static BOOL mfreerdp_client_new(freerdp *instance, rdpContext *context)
|
|||||||
context->instance->LogonErrorInfo = mac_logon_error_info;
|
context->instance->LogonErrorInfo = mac_logon_error_info;
|
||||||
context->instance->settings = instance->settings;
|
context->instance->settings = instance->settings;
|
||||||
settings = context->settings;
|
settings = context->settings;
|
||||||
settings->AsyncUpdate = TRUE;
|
|
||||||
settings->AsyncInput = TRUE;
|
settings->AsyncInput = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user