summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * winrt: fix compilation without drag and drop supportMaurice Kalinowski2016-05-311-0/+4
| | | | | | | | | | Change-Id: Ifd0d2238e8dacffe34753d95e12cccfd13519c55 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * winrt: Enable drop supportMaurice Kalinowski2016-05-311-0/+10
| | | | | | | | | | | | | | | | | | Allow Qt applications to receive drops. Dragging is not supported yet and will be handled in a separate commit. Task-number: QTBUG-50827 Change-Id: I684e3d5685ce73f74805691f6ac7bbc45e2d19ec Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Unify license header usage.Jani Heikkinen2016-03-291-12/+15
|/ | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* winrt: Fix clipboardMaurice Kalinowski2016-02-171-0/+9
| | | | | | | | | | | Native implementation was missing and so far it only used the Qt internal fallback mode. Unfortunately this does not apply to Windows Phone 8.1. Task-number: QTBUG-49766 Change-Id: I8cbbb0c843d077d7df1396d673fedeab2799b5a6 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Add support for offscreen surfacesMaurice Kalinowski2016-01-261-7/+21
| | | | | | | | | | | | | | | Previously offscreen surfaces were only needed to properly shutdown Qt Quick applications and the scene graph to have something to potentially render into but not show on the screen. However, Canvas3D requires a fully functional surface, preferably offscreen. Hence we use the QEGLPbuffer provided by eglconvenience in platformsupport. Task-number: QTBUG-50576 Change-Id: I1a32820bb2f2c6823be4e96dd92cf7965566f2c3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: enable hardware buttons for Windows 10Maurice Kalinowski2016-01-141-35/+62
| | | | | | | | | | | | | | | | | | Previously the hardware and camera button handler were guarded inside a Q_OS_WINPHONE which does not apply to Windows 10. Instead use WINAPI_PARTITION_FAMILY like on other places, this covers Windows Phone 8.1 as well as Windows 10. To find windows.phone.ui.input.h at build time the Mobile Extension directory needs to be added to the include paths inside qmake. On runtime we need to check whether we have hardware buttons or not. In case they exist, register the handlers, otherwise skip registration. Skipping also helps to keep WACK succeeding. Task-number: QTBUG-50427 Change-Id: Ibeae15dbde12553cebd2b73b1a40b754c014f426 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winphone: Properly close the applicationMaurice Kalinowski2016-01-111-0/+17
| | | | | | | | | | | | | | | | | | | When shutting down an application on Windows Phone the SceneGraph tries to create an offscreen surface to render into. If there is no offscreen surface available, it creates a new native window and tries to hide it. As the native event loop is about to shut down, creation fails and exceptions are raised. Instead we create a vanilla QPlatformOffscreenSurface. The SceneGraph recognizes it as such and can handle a proper cleanup on its own. Furthermore removing the suspend/resume handler in the destructor of QWinRTIntegration fails for Windows Phone as the application object itself does not accept this anymore. Hence skip this part for this platform. Task-number: QTBUG-49310 Change-Id: I02acdd5a635ef0b9d6ef8199376537b8f0f1a8fb Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT: Invoke correct remove handlerMaurice Kalinowski2016-01-111-1/+1
| | | | | | | Probably a typo when moving to Xaml. Change-Id: I0739f4561912e1e16df7b124d6d187cd0f60f657 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT: Add camera button events on Windows PhoneSamuel Nevala2016-01-051-0/+64
| | | | | | | | | | | | | | Windows Phone 8.1 provides access to the camera button and press/release events get passed as Key_CameraFocus and Key_Camera. Unfortunately a release does not provide what has been pressed before, hence this information needs to be cached when the press happens. Done-with: Maurice Kalinowski<maurice.kalinowski@theqtcompany.com> Task-number: QTBUG-39115 Change-Id: I6ce58a1f07a6bf7183b8d99a26e5cd7b0d32d6db Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com> Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Use handleExtendedKeyEvent when handling back button.Samuel Nevala2015-11-191-2/+4
| | | | | | | | | | | QWindowSystemInterface::handleKeyEvent runs the shortcut override unconditionally; use QWindowSystemInterface::handleExtendedKeyEvent instead, because it allows bypassing the override (as the back button press is not a valid shortcut). This also prevents an unnecessary mutex lock. Change-Id: I8d8bb957e1556ac47e031cfe6fca6481f7c3220d Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: move input context creation into xaml threadMaurice Kalinowski2015-11-041-1/+1
| | | | | | | | | | This way we ensure that creation always works and we can access the input pane statics. Task-number: QTBUG-49034 Change-Id: I5d0340a7f6304b717f17f2106134fa9d083a7fde Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* WinRT: Add support for QOpenGLWidgetLaszlo Agocs2015-11-021-0/+1
| | | | | | | | | Also involves adding support for sharing contexts. Task-number: QTBUG-48663 Change-Id: I0b18846ae70b63a0a21132f820a12ea744c0e936 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Fix sending of back key event.Samuel Nevala2015-10-221-15/+5
| | | | | | | | | | Windows Runtime side callback is run from XAML thread and receiver is at UI thread thus sendEvent asserts. Use synchronous system interface key event handler to deliver the event. Task-Id: QTBUG-48105 Change-Id: I91a8ef6fd29c277edfb699b688b9e7895dadda8f Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* Remove superfluous newlineSamuel Nevala2015-10-221-2/+1
| | | | | Change-Id: I556ac48f586633faa6b7048e03a33a0f018973e6 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Connect callbacks after after integration class constructed.Samuel Nevala2015-10-221-16/+13
| | | | | | | | | | | It was possible for Windows Runtime callback to run while integration class was constructed. That caused an assert when handling application state change. Fix this by connecting callbacks after integration class fully constructed. Change-Id: I029c2e1f932e8edc3665443cc17dbf11eaae1bf6 Task-Id: QTBUG-48109 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* WinRT: Initialize platform servicesMaurice Kalinowski2015-10-161-0/+2
| | | | | | | | | platformServices has not been created and caused a crash as soon as an URL gets opened. Task-number: QTBUG-48740 Change-Id: Ib099a0ff3007b168738e02c0fab8f9ca7bcd25c7 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Fix capabilities query.Samuel Nevala2015-09-131-2/+2
| | | | | | | Windows Runtime port supports non-fullscreen and multiple windows. Change-Id: I6f4791a7c329ece88e5f6f9910f3635a7bfef3f8 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Refactor platform plugin for XAML supportAndrew Knight2015-08-131-14/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using XAML as the platform compositor, many benefits are possible: - Better input context handling for tablets - Better multiple window support (including non-fullscreen windows) - Support for transparent windows and window opacity - Integration with native platform controls - Simpler orientation handling on Windows Phone with built-in transitions This patch applies only the minimal parts to make XAML mode work just as the raw D3D mode. It does this by: - Moving all OpenGL parts into QWinRTEGLContext. This will allow us to have non-OpenGL windows later (e.g. Direct2D raster surfaces). - Moving more window-specific parts into QWinRTWindow. Each window creates a SwapChainPanel which can then be used for ANGLE (or Direct2D) content. - Moving non screen-specific parts into QWinRTIntegration. - Having QWinRTScreen create the base XAML element Canvas. - Running certain calls on the UI thread where necessary. The following code parts were removed: - The UIAutomationCore code in QWinRTInputContext, as this is incompatible with XAML automation. - The D3D Trim and device blacklist, as these have been fixed in ANGLE. - Core dispatcher processing in QEventDispatcherWinRT. Now there is only one native event dispatcher; it is always running and never needs to be pumped. Future commits should address: - Maintaining the window stack list and visibility using the XAML Canvas. - Allowing for windows (e.g. popups) to be sized and positioned instead of fullscreen. - Using the XAML automation API to improve the platform input context. [ChangeLog][QPA][winrt] Windows Store apps are now composited inside a XAML container, allowing for tighter integration with the native UI layer. Change-Id: I285c6dea657c5dab2fda2b1bd8e8e5dd15882c72 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Updated WinRT license headers to use LGPLv3 instead of LGPLv21Jani Heikkinen2015-05-201-10/+13
| | | | | | | | | From 5.5.0 -> WinRT port is licensed with LGPLv3, see http://blog.qt.io/blog/2015/04/29/windows-10-support-in-qt/ Change-Id: I7e42564276af3fdbd0d4c61e2736610fa698b11c Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@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>
* winrt: Blacklist certain devices from creating a depth/stencil bufferAndrew Knight2014-11-141-1/+1
| | | | | | | | | | | This passes the EGLConfig created in the platform screen to the underlying context, and certain GPUs are blacklisted to be prevented from creating a configuration which does not render properly with Qt Quick. Task-number: QTBUG-42260 Change-Id: I7e1cdc33c2f5662538723c6930fad5f13b151d6f Reviewed-by: Oliver Wolff <oliver.wolff@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>
* winrt: Clean up platform themeAndrew Knight2014-07-101-34/+3
| | | | | | | | | | - Drop "Platform" from class name for consistency - Move styleHint() into theme class for better code reuse - Use ComPtr and result checking - Remove obsolete WinRT ifdefs Change-Id: Id26bd75739a9665f61ee2e70eb3fb36747b75410 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Clean up QWinRTScreenAndrew Knight2014-06-251-20/+1
| | | | | | | | | | | - Remove WP8.0 code paths - Remove WinRT types from header as much as possible - Use ComPtr where appropriate - Use COM convenience methods Task-number: QTBUG-38115 Change-Id: Ib241c3e5107add255a48340f86ee5885f895ff83 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Disable non-fullscreen windows for WinRTMaurice Kalinowski2014-03-271-0/+2
| | | | | | | | | | The integration seems to have been missing this flag. Hence we tried to open new windows in non-fullscreen mode causing lots of issues. For instance this resolves QCombobox popup problems. Task-number: QTBUG-37593 Change-Id: I3d3e3699dff91dcb95613893c2a5bdefc90131b7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT: move most of GUI event dispatcher logic into coreAndrew Knight2014-02-121-4/+1
| | | | | | | | | | The native event dispatcher is responsible for delivering callbacks to non-GUI handlers, such as network socket listeners. So, the non-GUI logic is moved into the core dispatcher so that the event loop works better for apps (and test cases) which use QCoreApplication. Change-Id: Ic5f7d939cf164198fd39aa5880e265ae560b39b4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Implement native message box for WinRTMaurice Kalinowski2014-02-121-0/+14
| | | | | | | | | | | | | | | | Added a basic theme class, which creates accessors for the QPlatformMessageDialogHelper. This handles creation of the native dialog, but also spawning an event loop around it. There are some limitations shared with the Android implementation. First you cannot create custom labelled buttons and also selecting the default button is not possible. This will be added at a later point. Note that Windows Phone is not supported. Change-Id: I2dec83dcded7919835a6dcdf8dc2a56282024a7e Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT QPA: Improve key handlingAndrew Knight2013-10-161-0/+5
| | | | | | | | | Simplify key handling by providing a cleaner tracking of physical key presses and associated character events. Change-Id: I5aa8990e0b24e101b348c04d1ada2cbcd1b0b6be Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Adopt new event dispatcher approach for WinRT pluginOliver Wolff2013-10-121-8/+5
| | | | | | Change-Id: I5605cbe926b57b981071d71187aca6af5d2e6269 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows RT and Windows Phone QPAAndrew Knight2013-10-021-0/+192
Change-Id: I6ab8af31f73439172e43fb709831821482b1cc99 Done-with: Kamil Trzcinski Done-with: Oliver Wolff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>