here is a subclassable RootView which aims to fix two bugs in the ui module, and add another missing feature.
convert_pointthat works in all presentation types and orientations. Existing ui module breaks infullscreen, so this version fixes that.get_keyboard_framethat works properly in all orientations. Existing ui modules version doesn't.- adds a
get_orientation, to get screen orientation.
Running as a script shows an example, which displays convert point results for screen touches, and draws a box around the keyboard frame to show that keyboard frame is reportd correctly.
Undocking/splitting the keyboard (bottom right button on ios keyboard) shows that this works properly even for keyboards which have been undocked.
Note that, because this has to be implemented as a view in order for the orientation and keyboard frame to work, you need to call RootView.__init__(self) if subclassing. Also, there is one ui bug that I can't fix, which is that the keyboard frame sometimes reports incorrect values the first time it is shown. To fix that, see the example, which shows how to display, then hide the keyboard. After that, everything works swell.