tulipcc icon indicating copy to clipboard operation
tulipcc copied to clipboard

Desktop / iOS - keyboard animations, rotation, screen size

Open bwhitman opened this issue 2 years ago • 1 comments

By default on iPhone portrait and iPad landscape with "soft" keyboards (the default iOS keyboard), Tulip Desktop works well. But if you rotate the display or connect hardware keyboards, things have a good chance of getting messed up. Usually the button bar we try to draw above the KB gets hidden as it thinks the keyboard is not there when it's supposed to be, or vice versa.

My understanding of this is SDL is meant to send a WINDOW_EVENT during screen size changes, which should include the height of the keyboard. Tulip has to re-create the SDL window every resize, so I think something is getting lost in the restart logic in unix_display.c.

Also, I believe there's a bug in SDL_uikitviewcontroller.m where there's no KeyboardDidChange notification handler, just WillShow and WillHide. Often, a rotation will not trigger a resize because of this.

Lastly, there's a bug where the keyboard is not appearing, perhaps only in the simulator, when 'connect hardware keyboard' is off. I believe we fix that with https://github.com/libsdl-org/SDL/issues/7979 .

bwhitman avatar Aug 01 '23 15:08 bwhitman

@pbowden plz

bwhitman avatar Sep 19 '23 22:09 bwhitman