summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Relieve platform plugins of having to persist geometry on WM callbacksTor Arne Vestbø2017-07-071-1/+0
| | | | | | | | | We can offload this to QGuiApplication, just like the geometry of the QWindow is set. This ensures that all platforms behave the same, and that the documentation of QPlatformWindow::setGeometry is adhered. Change-Id: I19dbc32cb4fb146d716ec289c28030a547d3afaa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-5/+0
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Android: Fix application state trackingChristian Strømme2017-04-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make sure we don't process state changes before the platform plugin is completely created and registered. - Protect shared data with mutexes. - Don't update the application state from different threads. This was causing issues when testing run-time permission checks, when the application quickly switches state due to permission dialog being shown. In this case the states would be incorrectly delivered when the application was made active again. Change-Id: I3446eab9414ee5437cd788c27d65f808d1314aa5 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Make QWindow's windowState a QFlags of the WindowStateOlivier Goffart2017-03-161-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This reflects QWidget API, and restores some behavior from Qt4. Some WM can have several state at the same time. On Plasma for example, when a window is both maximized and minimized, the "maximized" checkbox is checked from the taskbar entry. The API of QPlatformWindow was changed to take a QFlag and the platform plugins were adapted. - On XCB: Always send the full state to the WM. And read the full state. - On Windows: The code was originally written with '&' in Qt4, and was changed to == when porting. Some adaptation had to be made so the states would be preserved. - On macOS: Only a single state can be set and is reported back for now, with the possibly to expand this in the future. - Other platforms: Just do as before with the effective state. Task-number: QTBUG-57882 Task-number: QTBUG-52616 Task-number: QTBUG-52555 Change-Id: I7a1f7cac64236bbd4c591f796374315639233dad Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
| * Android: show status bar for any window state except fullscreenKai Uwe Broulik2016-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | This fixes the status bar not re-appearing when a window is reset to Qt::WindowNoState Task-number: QTBUG-37830 Change-Id: Iaef99221993ddf17b9da5b48796143abbcd98c01 Reviewed-by: Risto Avila <risto.avila@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Android: Fix crash in QCompleter testEskil Abrahamsen Blomfeldt2015-01-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | The call to QPlatformWindow::setVisible() will trigger flushing of the window system events. Depending on the events, this could lead to the window being hidden. Since platformScreen()->addWindow() and removeWindow() was done *after* this flush, you could get the remove for a window before it had been added, whereas the logic in these functions were written under the assumption that there is exactly one remove per add, and that add always precedes the remove. This has only been seen when running the QCompleter test so far. This patch reorders the statements to make sure the events are flushed after the window stack has been updated. In addition, it adds asserts for the assumptions in the addWindow/removeWindow code to catch bugs there earlier. Change-Id: Ic67b03afbf7acbcb78be86bffa4c26360dc5832f Task-number: QTBUG-43836 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Android: Release all windows when the application is suspended.BogDan Vatra2014-07-311-0/+18
| | | | | | | | | | | | | | When an application is suspended on Android all its Gl surfaces are destroyed and can't be used to render anymore, so we should release them in order to give back to the system the memory used by them. [ChangeLog] [Android] Release all windows when the application is suspended. Task-number: QTBUG-29069 Change-Id: I038aaa2006da1f3188fccba943ec4ffb3e551cf0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Android: Fix flashing on startup/shutdownEskil Abrahamsen Blomfeldt2014-06-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several issues on startup of the application which were caused by the fact that we would get the wrong available screen geometry on startup, set this as the initial surface size and then expose native windows with this size. This would cause first a flicker of white on the early expose and the window contents to jump around as the window was resized to the actual available space on screen. The fix for this is to postpone the first expose until we have actually got a proper screen size from the main layout. We use width,height = 0 as an indicator that the available geometry is not yet known, and we skip posting any expose events before this is set by the layout. In addition, since we removed the surface before we shut down the application, it was by a white rectangle before the shutdown transition happens, and this white rectangle will be animated instead of application contents. To rectify this, we make sure the last surface in the stack remains in the layout until it is either replaced by a different surface or until the application has shut down. This way, the shutdown animation will work on this surface instead. [ChangeLog][Android] Fixed regression where there would be flickering on startup and shutdown of the application. Task-number: QTBUG-38960 Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Shut up setParent warning.BogDan Vatra2014-01-311-0/+5
| | | | | Change-Id: I43af8bf83d3071f7c1d2eff082df5b1414f553b8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-0/+157
Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>