D18818: virtualkeyboard: resize the focused window to make room for the keyboard
Marco Martin <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
mart added a comment. In D18818#409248 <https://phabricator.kde.org/D18818#409248>, @graesslin wrote: > I'm not sure whether it's a good idea to resize windows for virtual keyboard. This can easily result in a feedback loop - the window resizes, the element with focus loses focus, keyboard closes, window resizes, element gets focus again and so on. > > I would prefer if we could just move the window away. This could be done just by the compositor. you mean the window just to be painted as translated upwards, with parts of the contents outside the top of the screen? Android has a possible virtual keyboard mode that does that, but is very rarely used in apps since it doesn't work that well and usability wise is kindof annoying. getting back on Android, just to see what others do, it has 3 possible modes which the app can set in its manifest.xml (and never change again at runtime afaik) - sliding up the window enough to show the input field, as i said doesn't really seem to be used buch - window resize, the window is resized to make space for the keyboard, all the content that fits is still shown - the app makes room for the keyboard in itself: this is pretty much the approach of the previous patch which sets theoverlap region. Unfortunately this was removed from the last wayland input protocol revision, which is unfortunate (i think there are still use cases for it, even tough the security reasons used as motivation kinda make sense, knowing the screen size, its own size and the default keyboard size on the platform, a surface can infer its screen position with a good approximation) in the end we will probably need some mechanism to select between the different approaches, some or all of the above... at first tough i would like an approach which works in most of the cases (except on things like the desktop window) which shrinks the window.. if you think that setting a maximized state on the window is safer than just resizing, i can look into that. REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D18818 To: mart, #plasma, #kwin, bshah, graesslin, romangg Cc: nicolasfella, mart, kwin, davidedmundson, graesslin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol