From: Martin Fleisz Date: Mon, 18 Mar 2013 15:31:14 +0000 (+0100) Subject: iOS: Fixed iPhone session scrolling bug X-Git-Tag: 1.1.0-beta1+ios1~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d75b9e24e3bc6e893642fbe20725b929c2c7927;p=platform%2Fupstream%2Ffreerdp.git iOS: Fixed iPhone session scrolling bug --- diff --git a/client/iOS/Controllers/RDPSessionViewController.m b/client/iOS/Controllers/RDPSessionViewController.m index 1aa94b5..8713754 100644 --- a/client/iOS/Controllers/RDPSessionViewController.m +++ b/client/iOS/Controllers/RDPSessionViewController.m @@ -71,12 +71,8 @@ // load default view and set background color and resizing mask [super loadView]; - // init keyboard handling vars and register required notification handlers + // init keyboard handling vars _keyboard_visible = NO; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name: UIKeyboardWillShowNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name: UIKeyboardDidShowNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name: UIKeyboardWillHideNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name: UIKeyboardDidHideNotification object:nil]; // init keyboard toolbar _keyboard_toolbar = [[self keyboardToolbar] retain]; @@ -325,6 +321,12 @@ - (void)sessionDidConnect:(RDPSession*)session { + // register keyboard notification handlers + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name: UIKeyboardWillShowNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name: UIKeyboardDidShowNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name: UIKeyboardWillHideNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name: UIKeyboardDidHideNotification object:nil]; + // remove and release connecting view [_connecting_indicator_view stopAnimating]; [_connecting_view removeFromSuperview]; @@ -383,7 +385,7 @@ - (void)session:(RDPSession*)session needsRedrawInRect:(CGRect)rect { - [_session_view setNeedsDisplayInRect:rect]; + [_session_view setNeedsDisplayInRect:rect]; } - (void)session:(RDPSession *)session requestsAuthenticationWithParams:(NSMutableDictionary *)params