Android: Add basic Window Manager for widgets
The way this works is for window types: (Qt::Dialog || Qt::Tool (without
Qt::FramelessWindowHint)) which on other platforms are typically
expected to have a frame around them; Before we add them to window stack
we add another window which we call Window Manager, this window is
offsetted by specific value and is white which makes it look like a
window manager. We also handle events on this window, using which we can
currently move the window around.
Test Plan
- Creating Modal windows on Android/ChromeOS should create a window manager frame behind. If there is a window which on desktop does not have a frame but does on Android or vice-versa, then it's a bug.
- Moving around widgets should not create artifacts.
- Moving multiple widgets over each other with/without window managers should not drop events during the drag event.
Known Issues
-
Tablet events don't work on window frames. I've blocked them explicitly because if we move a window with it, after a certain delta between tablet pointer and window is reached it drops the events. Leaving us in an intermediate state.This should work now. - There isn't a resizing capability but it's not hard to add, if need be.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Sharaf Zaman