summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt
Commit message (Collapse)AuthorAgeFilesLines
* QWinRTFontDatabase: Return the base class' fallbacksForFamilyKonstantin Ritt2015-12-151-0/+1
| | | | | | | | instead of an empty list. Even if QBasicFontDatabase::fallbacksForFamily() returns an empty list ;) Change-Id: Ib4a63e7898d2708737dd694f0629bdb68b2eb3a1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QWinRTFontDatabase: Add "Arial" as alias for "Helvetica".Friedemann Kleint2015-12-092-0/+16
| | | | | | | | | Otherwise, the first font from the list is used ("Algerian" or similar), making the widgets/richtext/textedit example look bad. Change-Id: Ia5bb8879f167fef7ad7e81611760ee042abf8da3 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* WinRT: Prepend '.' to default file suffix.Friedemann Kleint2015-12-071-2/+4
| | | | | | | | IFileSavePicker::put_DefaultFileExtension() fails when the '.' is missing, causing the QtWidgets-based dialog to show up (Windows 10). Change-Id: Ifcb870431b792ffa8e4a608dec999225e8383fa9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT/QMessageBox: Default to QtWidgets-based dialog for rich text.Friedemann Kleint2015-12-041-0/+5
| | | | | | Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-2/+2
| | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* winrt: Fix text renderingMaurice Kalinowski2015-11-241-1/+2
| | | | | | | | | | | | | | This is a partial revert of aecf3006bddb959795d03dd72d9c520e49713913. The DPI needs to be set inside the constructor to have the text rendering initialize properly. Landscape orientation fix is still valid and the dpi change was unrelated to resolve QTBUG-49470. Task-number: QTBUG-49610 Task-number: QTBUG-49470 Change-Id: I928b8d291b65cd744731c009917804b96253c276 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: Fix startup orientation handlingSamuel Nevala2015-11-181-4/+2
| | | | | | | | | | | | Calling QWinRTScreen::onOrientationChanged in the class constructor can lead to situation where QWinRTScreen is expected to be fully constructed. Moving the onOrientationChanged call to QWinRTScreen::initialize ensures that QWinRTScreen is fully constructed when it is called. Task-Id: QTBUG-49470 Change-Id: I52748f33a9011dec3a172c1a74023cad15aae38a Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* wirt: Fix cursor position method.Samuel Nevala2015-11-171-6/+10
| | | | | | | | | | | | The native position is given in device-independent pixels, so multiply that by the window scale factor. If no cursor is present (e.g. on Windows Phone), the native API returns SHRT_MIN as the coordinate values. Catch that and pass Infinity instead in order to enable the cursorless fall-back behavior in QQuickMenu::popup(). Change-Id: Ibe8ebcdbe257e8df25eea9873e8f4fa647ae1ab2 Task-Id: QTBUG-48265 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Do not emit keyboard changes in the constructorMaurice Kalinowski2015-11-161-5/+10
| | | | | | | | | | QWinRTInputContext is created from the XAML Thread, which can cause problems when handleVisibilityChange is invoked. Instead just query the keyboardRect and skip the emit. Task-number: QTBUG-49389 Change-Id: I158204a07b9e000adffdc308e68b0f1425ed7c62 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Make dialog and window behave similarly.Samuel Nevala2015-11-122-2/+4
| | | | | | | | Status bar visibility can be controlled from dialog and dialog size is screen size. Change-Id: Ia8e932a9e1e1549a17d12532639391335760f9e0 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Fix filedialog show on Windows 10Maurice Kalinowski2015-11-091-27/+44
| | | | | | | | | | The file picker must be used inside the Xaml thread, otherwise execution will fail without giving any warning or error. Task-number: QTBUG-48389 Change-Id: I917e88e95993da04be3d7cd34344ffd68ee71cdd Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> 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: Avoid blocking the XAML threadSamuel Nevala2015-11-041-34/+89
| | | | | | | | | | Blocking the XAML thread can lead to a deadlock, so switch to the non-blocking version of handleExtendendKeyEvent. Task-Id: QTBUG-49051 Change-Id: I65a348af1f77b6afcd7d0fb9a80c70d60fc94c27 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT: Fix wrong mouse event position for non-fullscreen windowsLaszlo Agocs2015-11-021-2/+7
| | | | | | | | | | | | | When calling handleMouseEvent and similar, there are two choices when it comes to the global and local position: by specifying the window it is the caller's responsibility to provide a valid local position. When the window is null, QGuiApplication calculates the local position. The winrt plugin chose the former and therefore passing the global position as local is wrong. Task-number: QTBUG-48208 Change-Id: I3e1137cdb5d023296c4d73899da016641303c7df Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* WinRT: Add support for QOpenGLWidgetLaszlo Agocs2015-11-023-4/+10
| | | | | | | | | 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: Only destroy existing egl surfacesMaurice Kalinowski2015-10-301-0/+3
| | | | | | | | | | Running for instance the widget auto tests reveals a lot of egl warnings due to items being created and not shown. Hence no surface was created but tried to be destroyed when window was deleted. Change-Id: I5c99eeb94a8fc2cfeb98f85445e013de61ff9ca9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: store egldisplay globallyMaurice Kalinowski2015-10-301-16/+29
| | | | | | | | | | The QWinRTEGLContext must not store the display, as it might get destroyed while other objects still need it, for instance QWinRTWindow to delete the surface. Rather create a global static for creating the display once and delete it when application lifecycle ends. Change-Id: Id176b6934e1d1327f5bb70ad0d258de91f675041 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: initialize EGL display with automatic Trim and WARPAndrew Knight2015-10-302-2/+17
| | | | | | | | | | | The minimum feature level is now detected before requesting a display. If it is less than 9_3, use the WARP device instead. Task-Id: QTBUG-44495 Task-Id: QTBUG-44694 Change-Id: I9f81f4f92269fab73c291f7373aa07236c7e5f98 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* WinRT: Retrieve color settings on Windows 10Maurice Kalinowski2015-10-261-33/+152
| | | | | | | | | | Windows 10 uses one enum for all target platforms. Use ApiInformationStatics to identify whether enum values are accessible at runtime. Change-Id: Ib77c9d2a2b5cf1655fbe7d937d0c83cc4cdd9ee9 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* ANGLE: Fix winrt backing store to support feature level 9_3 devices.Samuel Nevala2015-10-241-6/+5
| | | | | | | | | | | Partially revert c7abf81786f4a0c. Instead of using the ES3 entry point, use ES2 for framebuffer blitting. This means that a small change is required to ANGLE for the blit behave the same as ES3 (applied only for Windows Store apps). Task-Id: QTBUG-48266 Change-Id: Idc51f00a659c91f740876be071eb71bff69e0e38 Reviewed-by: Andrew Knight <andrew.knight@intopalo.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-224-60/+77
| | | | | | | | | | | 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: Add missing Q_DECL_OVERRIDEsSamuel Nevala2015-10-221-12/+12
| | | | | Change-Id: Ifbf2995baa2eedc726e814b04b51bde6e91a7c40 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* WinRT: Fix InputPanel on Windows 10Maurice Kalinowski2015-10-212-17/+13
| | | | | | | | | | Check for MSVC2015 to enable usage of IInputPane(2). Move object construction to the XAML Thread, otherwise instantiation will fail when running on desktop. Task-number: QTBUG-44494 Change-Id: I816230cc5b0def796e86e6c6bb05a552a4e59d1b 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 native MessageBox not closingMaurice Kalinowski2015-10-131-39/+39
| | | | | | | | | | | | The message box buttons need to be added inside the XAML thread. Otherwise QWinRTMessageDialogHelper::onCompleted will not be triggered. To successfully emit the clicked signal across different threads do not exit the eventloop. Change-Id: Ie884bdfe0dc64132559755083dae50c2aa43d80b Task-number: QTBUG-48209 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Default show to showMaximized on Windows Phone.Samuel Nevala2015-09-281-2/+2
| | | | | | | | | | | | | | Status bar visibility can be controlled and window geometry can be adjusted accordingly. Default show to showMaximized instead of showFullScreen. This means that by default application starts status bar visible. [ChangeLog][winphone][Important Behavioral Changes] By default application starts status bar visible. Task-Id: QTBUG-48282 Change-Id: Ia60edd53ec2a7181aa97d21a825600b7c8cf87a7 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Move EGL surface to window.Samuel Nevala2015-09-143-21/+44
| | | | | | | | | | Fixes GPU memory leak when window is created/deleted dynamically and repeatedly. EGL context used to own EGL surface, but the context outlives the surface if window is created/deleted dynamically. The EGL surface is now owned by the window and destroyed with it. Change-Id: Ib949261ef6e77217018e60aad3e36e4a6d2eaba0 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Remove unnecessary assert from window.Samuel Nevala2015-09-131-2/+0
| | | | | Change-Id: I38593c63121e75e5d4a18e715d41c6ce5519e596 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: Fix top level window geometry.Samuel Nevala2015-09-071-2/+3
| | | | | | | | | | Set screen geometry only for top level window. For other window types (dialog, popup and etc.) use their own geometry. Change-Id: I47e45a9fc6f08587ea284d89d56e419907471572 Task-Id: QTBUG-48089 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Add support for native pickers for Windows Phone.Samuel Nevala2015-09-072-42/+250
| | | | | | | | | Support picking file(s), folder and save file via native component on Windows Phone. Task-Id: QTBUG-44833 Change-Id: Ibffc1cf3c133c9fbf9c92e0a4f874c4e197c50ee Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Enable window visibility for the root window.Samuel Nevala2015-08-314-35/+174
| | | | | | | | | | | | | - 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: Work around broken screen rotation on Windows Phone 8.1.Samuel Nevala2015-08-311-0/+1
| | | | | | | | | Expose on orientation change clears bad frames caused by race between Qt and ANGLE. Change-Id: I8970c6be36133d861c718a946d9e9b7a5e88cc2c Task-Id: QTBUG-44333 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Fix MessageDialog show on windows phone.Samuel Nevala2015-08-271-10/+16
| | | | | | | | Run native dialog show on XAML thread. Change-Id: I6273340e87d70aae21c838d9d7646a233c1f48be Task-Id: QTBUG-47938 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Add missing Q_DECL_OVERRIDE and fix white space.Samuel Nevala2015-08-272-8/+6
| | | | | Change-Id: Ibbcb637dac4d531934786fff25f7b8c36ef5ebed Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winphone: Fix keyboard show/hide callsAndrew Knight2015-08-241-8/+18
| | | | | | | | These need to occur on the XAML thread. Change-Id: Id42a37df95b09e6d3c0a1b6e593bbf8cbfe5a129 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Hide status bar on windows phone.Samuel Nevala2015-08-201-0/+25
| | | | | | Task-Id: QTBUG-47789 Change-Id: I9ca5f336ba9ee7524d4a4bbff3bbf4fbbb56fd54 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Refactor platform plugin for XAML supportAndrew Knight2015-08-1311-506/+561
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* winphone: Remove old codeAndrew Knight2015-08-051-5/+0
| | | | | | | The platform message dialogs are always used on WP. Change-Id: If55e1ea804981201fded796adaaf11eb17bc5050 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winphone: Remove old non-DirectWrite codeAndrew Knight2015-08-053-36/+2
| | | | | | | Since 8.1, DirectWrite is always used on WinRT platforms. Change-Id: I742e4a48be6c478a62c16a32cf89852b850aff9d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Updated WinRT license headers to use LGPLv3 instead of LGPLv21Jani Heikkinen2015-05-2029-290/+377
| | | | | | | | | 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: fix namespaced buildJoerg Bornemann2015-05-165-7/+16
| | | | | Change-Id: I0505523a5524995e374dc8f005f101d0cea8b01e Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* QPA plugins: Use _iid macros instead of strings in Q_PLUGIN_METADATA.Friedemann Kleint2015-05-131-1/+1
| | | | | | | | | This makes it easier to change the version numbers by changing the macros in QtGui. Task-number: QTBUG-46009 Change-Id: I94c9591ec6f7c9173a698df9e1fe8fd6a904caf4 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* winrt: Use ANGLE sub-buffer swap on Windows PhoneAndrew Knight2015-05-082-0/+15
| | | | | | | | | This allows the plugin to communicate the swap region to ANGLE and avoid glitches when the orientation changes. Task-number: QTBUG-44333 Change-Id: I40240cbcb3aaec92dbf4a82f4957965e92b9c3da Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: properly retrieve font writing systems from unicode rangesAndrew Knight2015-05-051-7/+82
| | | | | | | | | | | | This was completely broken until now because the ranges were assumed to be from the OS/2 header map. These are actual unicode ranges from the cmap, so they need to be matched by looping over the values and checking if they fall within a given writing system range. Task-number: QTBUG-44155 Done-with: Peng Wu <peng.wu@intopalo.com> Change-Id: I933429627c4dbf3377f41c9281df5a801057698f Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Fix platform plugin after ANGLE upgradeAndrew Knight2015-04-091-17/+2
| | | | | | | Remove manual EGL window resizing as this is now handled inside ANGLE. Change-Id: I0d4c4df71114c60f4ce75e9010f40a0fd58dee1a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: set correct virtual keyboard sizePeng Wu2015-04-094-29/+31
| | | | | | | | This is done by multiplying by the DIP scale factor. Task-number: QTBUG-44152 Change-Id: I587a66f1a2f7fa3a713c279f5d877e6acb844620 Reviewed-by: Andrew Knight <qt@panimo.net>