diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-20 11:37:23 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-20 11:37:23 +0300 |
commit | 2d81addf78d6a8b0fb2f2959b04a385c4adffdf2 (patch) | |
tree | 5e0f45b9c945499bc6a6669563de13c5203981a6 /src/ios.m | |
parent | 201021092d204680b353c82ce9e9beb76f3044e8 (diff) |
Experimenting with independent popup windows
Toe dipping into multiple window support by allowing popup menu widgets to be displayed in independent windows.
This is not a 100% replacement for native menus, but it gets pretty close.
Diffstat (limited to 'src/ios.m')
-rw-r--r-- | src/ios.m | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -247,14 +247,14 @@ didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls { | |||
247 | UIView *view = [viewController_(get_Window()) view]; | 247 | UIView *view = [viewController_(get_Window()) view]; |
248 | CGRect keyboardFrame = [view convertRect:rawFrame fromView:nil]; | 248 | CGRect keyboardFrame = [view convertRect:rawFrame fromView:nil]; |
249 | // NSLog(@"keyboardFrame: %@", NSStringFromCGRect(keyboardFrame)); | 249 | // NSLog(@"keyboardFrame: %@", NSStringFromCGRect(keyboardFrame)); |
250 | iWindow *window = get_Window(); | 250 | iMainWindow *window = get_MainWindow(); |
251 | const iInt2 rootSize = size_Root(window->roots[0]); | 251 | const iInt2 rootSize = size_Root(window->base.roots[0]); |
252 | const int keyTop = keyboardFrame.origin.y * window->pixelRatio; | 252 | const int keyTop = keyboardFrame.origin.y * window->base.pixelRatio; |
253 | setKeyboardHeight_Window(window, rootSize.y - keyTop); | 253 | setKeyboardHeight_MainWindow(window, rootSize.y - keyTop); |
254 | } | 254 | } |
255 | 255 | ||
256 | -(void)keyboardOffScreen:(NSNotification *)notification { | 256 | -(void)keyboardOffScreen:(NSNotification *)notification { |
257 | setKeyboardHeight_Window(get_Window(), 0); | 257 | setKeyboardHeight_MainWindow(get_MainWindow(), 0); |
258 | } | 258 | } |
259 | @end | 259 | @end |
260 | 260 | ||