Merge pull request #3531 from rjcorrig/macdialogfix
client/Mac: Runs Mac password dialog on main UI thread
This commit is contained in:
commit
4085d45773
@ -977,7 +977,9 @@ BOOL mac_authenticate(freerdp* instance, char** username, char** password,
|
||||
dialog.password = [NSString stringWithCString:*password encoding:
|
||||
NSUTF8StringEncoding];
|
||||
|
||||
BOOL ok = [dialog runModal];
|
||||
[dialog performSelectorOnMainThread:@selector(runModal) withObject:nil waitUntilDone:TRUE];
|
||||
|
||||
BOOL ok = dialog.modalCode;
|
||||
|
||||
if (ok)
|
||||
{
|
||||
|
@ -28,6 +28,7 @@
|
||||
NSString* serverHostname;
|
||||
NSString* username;
|
||||
NSString* password;
|
||||
BOOL modalCode;
|
||||
}
|
||||
@property (retain) IBOutlet NSTextField* usernameText;
|
||||
@property (retain) IBOutlet NSTextField* passwordText;
|
||||
@ -39,6 +40,7 @@
|
||||
@property (retain) NSString* serverHostname;
|
||||
@property (retain) NSString* username;
|
||||
@property (retain) NSString* password;
|
||||
@property BOOL modalCode;
|
||||
|
||||
- (BOOL) runModal;
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
@synthesize serverHostname;
|
||||
@synthesize username;
|
||||
@synthesize password;
|
||||
@synthesize modalCode;
|
||||
|
||||
- (id)init
|
||||
{
|
||||
@ -66,7 +67,7 @@
|
||||
|
||||
- (BOOL)runModal
|
||||
{
|
||||
return [NSApp runModalForWindow:self.window];
|
||||
return (self.modalCode = [NSApp runModalForWindow:self.window]);
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
Loading…
Reference in New Issue
Block a user