Mercurial > dwindows
changeset 2793:24977a1ec6fc
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.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 14 Jul 2022 06:22:19 +0000 |
parents | 9c6fdafd10be |
children | 7ce51a7e8009 |
files | ios/dw.m |
diffstat | 1 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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]; } /*