]> git.saurik.com Git - cydia.git/commitdiff
Fix rotation support in keyboard resizing.
authorGrant Paul <chpwn@chpwn.com>
Thu, 10 Feb 2011 00:56:55 +0000 (16:56 -0800)
committerGrant Paul <chpwn@chpwn.com>
Thu, 10 Feb 2011 00:56:55 +0000 (16:56 -0800)
MobileCydia.mm

index 0df74e68975a4048ef322582a7618cfd0675d28f..17b17426c0137acf9f92576fad92c4f81553a23a 100644 (file)
@@ -5646,7 +5646,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&duration];
 
     CGRect kbframe = CGRectMake(round(center.x - bounds.size.width / 2.0), round(center.y - bounds.size.height / 2.0), bounds.size.width, bounds.size.height);
     [[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&duration];
 
     CGRect kbframe = CGRectMake(round(center.x - bounds.size.width / 2.0), round(center.y - bounds.size.height / 2.0), bounds.size.width, bounds.size.height);
-    CGRect viewframe = [[[self view] window] convertRect:[self view].frame fromView:[[self view] superview]];
+    UIViewController *base = self;
+    while ([base parentViewController] != nil)
+        base = [base parentViewController];
+    CGRect viewframe = [[base view] convertRect:[list_ frame] fromView:[list_ superview]];
     CGRect intersection = CGRectIntersection(viewframe, kbframe);
 
     [self resizeForKeyboardBounds:intersection duration:duration curve:curve];
     CGRect intersection = CGRectIntersection(viewframe, kbframe);
 
     [self resizeForKeyboardBounds:intersection duration:duration curve:curve];