summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtscreen.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-221-1/+1
|\ | | | | | | Change-Id: I4f4ab05b2de67cd4b1d29b294b96a8c9ffb964b2
| * winrt: only update window title for top level widgetsMaurice Kalinowski2016-08-181-1/+1
| | | | | | | | | | | | | | | | | | Previously we always updated the window title, independently whether the window was visible / the toplevel one. This can also cause troubles when setting the title during initialization. Change-Id: I02ec0f0e385fa490f641ce83a6cb27717a31620f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-12/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| * winrt: use visible bounds the get the visual areaJochen Seemann2016-04-151-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows Phone / Windows 10 Mobile, there are the status bar and sometimes a navigation bar, which are hiding the visible window area. In the Windows Phone code paths, the area of the status bar was tracked and the visual area was dynamically shrinked. This patch enables that we use ApplicationView::visibleBounds() on every target (except Windows 8.1) to get the visible area of the application. Its change event is now also used as a resize trigger for manual resizing through user. Task-number: QTBUG-51163 Change-Id: I7abe2a0978418cc941e118e212426852474c026a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | 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: enable cross-platform high DPI scalingJochen Seemann2016-03-161-0/+1
| | | | | | | Task-number: QTBUG-46615 Change-Id: I7f75bc7da35b9330753130338a06feb49533061c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Connect callbacks after after integration class constructed.Samuel Nevala2015-10-221-1/+3
| | | | | | | | | | | 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: Enable window visibility for the root window.Samuel Nevala2015-08-311-0/+15
| | | | | | | | | | | | | - Minimized and Hidden: hide the status bar and collapse winrt native ui element. - Windowed and Maximized: show the status bar and re-size the window. - FullScreen and AutomaticVisibility: hide the status bar and re-size the window. Showing & hiding the status bar and re-sizing the window affect only the windows phone build. Change-Id: Iaa412382bffc14e470720f2213bb3f6851f57a6b Task-Id: QTBUG-47811 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Add missing Q_DECL_OVERRIDE and fix white space.Samuel Nevala2015-08-271-6/+6
| | | | | Change-Id: Ibbcb637dac4d531934786fff25f7b8c36ef5ebed Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Refactor platform plugin for XAML supportAndrew Knight2015-08-131-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* winrt: set correct virtual keyboard sizePeng Wu2015-04-091-0/+1
| | | | | | | | This is done by multiplying by the DIP scale factor. Task-number: QTBUG-44152 Change-Id: I587a66f1a2f7fa3a713c279f5d877e6acb844620 Reviewed-by: Andrew Knight <qt@panimo.net>
* 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-0/+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-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* winrt: Fix orientation update maskAndrew Knight2014-08-051-1/+0
| | | | | | | | | | | | | | | | | On WP8.0, setting auto rotation preferences at runtime worked like an orientation update mask, and did not modify the behavior of the window. With WP8.1, setting auto rotation preferences has the side effect that the compositor will then resize the window when moving from e.g. portrait to landscape. Because of this, the auto rotation API should not be called inside orientationUpdateMask(). The default implementation is now sufficient, so the platform override is removed. Developers looking to set auto rotation preferences should use the application manifest or call the native api directly. Task-number: QTBUG-35953 Change-Id: I90cf4290ced34df1bb350cb6aa5deff209622865 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Use physical window resolutionAndrew Knight2014-08-051-1/+0
| | | | | | | | | | | | | | This partially reverts eea02ff1 in that devicePixelRatio() will now always return 1. This is because non-integer ratios are bound to cause problems with pixel alignments, and their use prevents users from accessing the complete pixel grid in Qt Quick. Now, the full physical resolution of the screen/window is reported instead. The EGL initialization is adjusted to match requirements for ANGLE 2.1. Change-Id: I24c6dcf4419f30e5e4c73c592beb446a418a0b8b Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* winrt: Clean up QWinRTScreenAndrew Knight2014-06-251-67/+17
| | | | | | | | | | | - 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>
* WinRT: Support High-DPIAndrew Knight2014-05-221-2/+20
| | | | | | | | | | | | | | | | | Previously, the backing store and default framebuffer were created with the logical screen resolution (in device-independent pixels), not the the physical screen resolution. This lead to blurry text on high-DPI devices. This change fixes this by creating those at full size, and setting the device pixel ratio appropriately. Windows are still reported in device-independent pixels, but text and images are now rendered sharply for Qt Quick applications. As QPainter does not support non-integer scaling, the backing store is still drawn in DIPs and scaled by OpenGL. Task-number: QTBUG-38464 Change-Id: I7377d4c734126825d670b8ebb65fd0dd1ef705f2 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Fix multi-touch on PCAndrew Knight2014-05-051-7/+2
| | | | | | | | | | | | | | | The pointer ID was incorrectly interpreted as a device ID, which caused creating a new QTouchDevice for each touch update and potential crashes in QtQuick. The handling has now been simplified and aligned with Windows Phone, treating all touch events as if they originate from the same device. Given that the native device has no ID, it is not possible to track the native device between events anyway (even the pointer values change). Task-number: QTBUG-38745 Change-Id: I24b6c00b765dcb49cd653638afafc04fdd80f774 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Windows Phone: Handle back-button pressAndrew Knight2014-03-071-0/+13
| | | | | | | | | | | | | | | | | When the back button is pressed, send an immediate key event to the topmost window (or the application if there is no window). If it is accepted, mark the native event as accepted and send a key release event. This way, the application may call accept() on the KeyPress event for Qt::Key_Back in order to create backstepping behaviors within the app. This is in line with Android, which quits the app when the event is ignored. On Windows Phone, the default behavior occurs when the event is ignored, which is to back out of the application and leave it running in the background. Task-number: QTBUG-35951 Change-Id: I46d15478f441f73d3660370370689b2f9fa11f25 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Add suspend and resume event handling for WinRTMaurice Kalinowski2014-02-041-0/+11
| | | | | | | Task-number: QTBUG-35952 Change-Id: Icb4edb0f55c1d02dfbb5501df311b0fff87d2dc1 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT QPA: Improve key handlingAndrew Knight2013-10-161-2/+6
| | | | | | | | | 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: Improve orientation handlingAndrew Knight2013-10-121-0/+1
| | | | | | | Support setting the update mask. Change-Id: I88f4dddd9af5203ec47c70ad3381436caf140fef Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Windows RT and Windows Phone QPAAndrew Knight2013-10-021-0/+163
Change-Id: I6ab8af31f73439172e43fb709831821482b1cc99 Done-with: Kamil Trzcinski Done-with: Oliver Wolff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>