# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1657779739 0 # Node ID 24977a1ec6fc1491b2d3d00dc24a067efe6b7444 # Parent 9c6fdafd10be14c4f19b494fd741c11f378ffaf8 iOS: Rewrite dw_window_redraw() so it actually works. The existing code essentially did nothing, it just set the redraw and shown state without actually doing anything. This new code works and Interface Builder now displays correctly without needing to rotate the tablet. diff -r 9c6fdafd10be -r 24977a1ec6fc ios/dw.m --- a/ios/dw.m Thu Jul 14 06:02:01 2022 +0000 +++ b/ios/dw.m Thu Jul 14 06:22:19 2022 +0000 @@ -801,14 +801,11 @@ @interface DWWindow : UIWindow { DWMenu *windowmenu, *popupmenu; - int redraw; int shown; void *userdata; } -(void)sendEvent:(UIEvent *)theEvent; -(void)keyDown:(UIKey *)key API_AVAILABLE(ios(13.4)); --(int)redraw; --(void)setRedraw:(int)val; -(int)shown; -(void)setShown:(int)val; -(void)layoutSubviews; @@ -832,8 +829,6 @@ [super sendEvent:theEvent]; } -(void)keyDown:(UIKey *)key { } --(int)redraw { return redraw; } --(void)setRedraw:(int)val { redraw = val; } -(int)shown { return shown; } -(void)setShown:(int)val { shown = val; } -(void)layoutSubviews { } @@ -9851,9 +9846,18 @@ void API dw_window_redraw(HWND handle) { DWWindow *window = handle; - [window setRedraw:YES]; + NSArray *array = [[[window rootViewController] view] subviews]; + + for(id obj in array) + { + if([obj isMemberOfClass:[DWView class]]) + { + DWView *view = obj; + [view showWindow]; + } + } + [window setShown:YES]; - [window setRedraw:NO]; } /*