summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Exclude user events when adding/removing windowsMaurice Kalinowski2016-09-051-2/+2
| | | | | | | | | | | Handling user events while creating a window can cause problems and crashes as the event tries to access non initialized parts of the window itself being created. Hence exclude user input events at that time and have them handled when the event loop checks for them regularly. Change-Id: I2a78efd619250be8f6f2e737ed78e39481a4cf76 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* winrt: avoid duplicate signal emitMaurice Kalinowski2016-08-251-1/+0
| | | | | | | | | emitChanged() will be invoked when the system notifies the application about a clipboard change. Hence, there is no need to call it previously and cause two signals on the same change to be emitted. Change-Id: I99605c9a71054e0610006dbeaaa90c5fb2f46755 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: store mimedata in clipboardMaurice Kalinowski2016-08-252-3/+17
| | | | | | | | | In addition to setting the clipboard, we also need to store the mimedata being passed. Otherwise requesting the mimedata returns a different object, causing comparisons to fail. Change-Id: I2ffea76e78be091cb98426e387619ac6788ea270 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Check validity of options shared pointerMaurice Kalinowski2016-08-251-0/+3
| | | | | | | | | QErrorMessage autotests managed to create a scenario where the options are not initialized yet, causing a crash later on. Change-Id: Iabad6f181f2bfdc81a9c73f0e67c8ba70753fec6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Fix crash when clearing mimedataMaurice Kalinowski2016-08-231-1/+1
| | | | | | | | Some autotests clear the clipboard by invoking setMimeData() with a null QMimeData argument. Change-Id: I4a9d3dfd41b2c52964e272fc1362162f47fd8cda Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: only update window title for top level widgetsMaurice Kalinowski2016-08-183-8/+6
| | | | | | | | | 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>
* winrt: Fix crashes for visible window managementMaurice Kalinowski2016-08-182-1/+5
| | | | | | | | | | | | First, offscreen windows/surfaces should not be tracked in the visible window list. Secondly when destroying a window, it is not guaranteed that it had been removed first, hence enforce it to guarantee that the visibleWindows list stays correct and does not hold invalid weak pointers to non existing windows. Change-Id: I7027ecd010b8bcb3d05e3f5d460662e883e42e50 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Fix crash when managing multiple top-level windowsMaurice Kalinowski2016-08-181-1/+1
| | | | | | | | | | When a window gets removed, the active focus window needs to be set to 0 instead of the the current window. Otherwise QGuiApplicationPrivate::focus_window is set to an invalid pointer and crashes when dereferenced. Change-Id: I258b95e447de4cbfb7f19955079c2545a738e03f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: support fullscreen modeMaurice Kalinowski2016-08-091-1/+50
| | | | | | | | | Enable switching application to fullscreen mode. This is mostly required for desktop targets of WinRT. Task-number: QTBUG-54517 Change-Id: I67e4020bc2ec8da86d94815e5765959f4ae2b63f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Clean up function signatureMaurice Kalinowski2016-06-301-2/+2
| | | | | Change-Id: I006d4a2295103c8e4169945dfb451ee55598ec87 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* winrt: Fix compilation for 10586 SDKMaurice Kalinowski2016-06-042-1/+10
| | | | | | | | | | | | | | | | | | | The current implementation of drag and drop requires Redstone 2 Update (SDK version 14322) to be fully functional. The API is limited for previous versions. However, this mostly affects passing allowed operations between sender and receiver, the rest is mostly functional still. Once RedStone 2 is out (estimated July 2016) we can bump the minimum SDK version to 14322. Task-number: QTBUG-50827 Change-Id: I5bab9d36a228d68c1809c241a64168d48c353335 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: fix compilation without drag and drop supportMaurice Kalinowski2016-05-313-4/+10
| | | | | Change-Id: Ifd0d2238e8dacffe34753d95e12cccfd13519c55 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: fix drag pixmap supportMaurice Kalinowski2016-05-311-60/+96
| | | | | | | | | | | Previously dragging only displayed the type of operation provided by the system. Now, in case a pixmap is specified, an image is shown. Also incorporated some cleanups. Task-number: QTBUG-50827 Change-Id: I471e2081eabfed014b08d189538d1d62cdb7248e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: enable drag supportMaurice Kalinowski2016-05-312-4/+188
| | | | | | | | Allow applications to initiate drag operations. Task-number: QTBUG-50827 Change-Id: I3c29b54756af1af24544f49803305f0c95d8b7f9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Enable drop supportMaurice Kalinowski2016-05-316-0/+818
| | | | | | | | | 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>
* winrt: Fix potential startup crashMaurice Kalinowski2016-05-101-3/+4
| | | | | | | | | | | | | Depending on the windowstate passed to QWinRTWindow constructor we might act on the uiElement which has not been created yet. This happened especially in release mode, probably due to timing. Hence delay uiElement changes until we created it in the constructor and can ensure it is valid. Change-Id: I00daa9fcf8542a0535bbcb663a76d85c36e510e2 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Refactor pointer device handling to support penMaurice Kalinowski2016-04-281-30/+37
| | | | | | | | | | | | | | | | | | In addition to pen events being handled as tablet events, we create touch events. Same principle is used on other platforms as well. This allows devices as Surfaces to use the pen with Qt applications. Furthermore, the first update event does not have to be a press event, as in a pen has proximity values describing a move without touch, but also the HoloLens uses touch points as permanent pointer devices. They all send an exit event once released or out of range. Hence, clean up the internal touchpoint hash when the touch device is gone, not on release. Task-number: QTBUG-38681 Change-Id: I38acaa034a3cfe224098bfa36bfead5428f4db16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Fix memory leak for file readingMaurice Kalinowski2016-04-281-3/+9
| | | | | | | | | | | | | | IInputStream::ReadAsync might create a separate buffer to fill in data. Passing a buffer with GetAddressOf() can cause a memory leak of the size of data to be read. Instead, pass a separate buffer pointer and continue to use this one after the async operation. This way, the OS can decide whether to switch buffers or not, keeping ref counting in sync. Task-number: QTBUG-52961 Change-Id: I9dfb627287142355ebcf74ca52427b4e8108e8d1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: emit application activationMaurice Kalinowski2016-04-231-0/+2
| | | | | | | | | | | | | Previously the user only got informed about the application getting inactive or hidden, but not when the application was reactivated again. This can cause problems with applications using for instance a camera as that gets disabled when not being active and never return to a active state again. Change-Id: I5c1d8750db8e75043ecf261616a0bc98434a3863 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: use visible bounds the get the visual areaJochen Seemann2016-04-153-139/+74
| | | | | | | | | | | | | | | | 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>
* winrt: mimic desktop Window's "QKeyEvent::isAutoRepeat" behaviorOliver Wolff2016-04-081-4/+42
| | | | | | | | | | | | | | | We should mimic desktop Qt's behavior as close as possible. That means, that a key release event is triggered between auto generated press events for most keys. For some keys like modifiers, caps lock, scroll lock etc. there are no auto repeated events if the key is held down. The "last" release event after having held the key and several events are triggered does not have the isAutoRepeat flag set so we should not have that flag in this case either. Task-number: QTBUG-52055 Change-Id: I001a73416c4b2072d307ee5d87c7cb8406c9575f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Fix QKeyEvent::isAutoRepeatOliver Wolff2016-04-081-3/+3
| | | | | | | | | | | When keeping a key pressed CorePhysicalKeyStatus' RepeatCount stays 1 while WasKeyDown changes from false to true. Thus WasKeyDown should be used to determine the auto repeat status of the key event. Task-number: QTBUG-52055 Change-Id: I7cde6b92473bd5335e85418c2b92cfe8f338975c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Change input panel behavior to platform defaultMaurice Kalinowski2016-04-051-1/+1
| | | | | | | | | | | | | | | | Native applications do open the native input pane when the touch release happens, not during press. Widget applications seem to not ask the theme, so it was acting like native there already. For Qt Quick applications the platform theme is queried, now returning true for SetFocusOnTouchRelease. As a side-effect this also fixes QTBUG-52295, as showInputPanel() at press time causes issues with focus handling, causing the input pane to disappear again. Task-number: QTBUG-52295 Change-Id: I6da6a0126f695233b7c8a399a1549a8b7c824af2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: enable cross-platform high DPI scalingJochen Seemann2016-03-162-0/+7
| | | | | | | Task-number: QTBUG-46615 Change-Id: I7f75bc7da35b9330753130338a06feb49533061c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Fix painting glitches when orientation changesMaurice Kalinowski2016-03-111-1/+1
| | | | | | | | | | | In addition to handling the pure rotation enforce a size change as well. This way content is redrawn for the correct orientation. It was done for Windows Phone 8.1 already, we only need to extent this to Windows 10. Task-number: QTBUG-50336 Change-Id: I6b3b964f44b631757ea856331c50f53c39ed9ec3 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: add logging to QWinRTScreenMaurice Kalinowski2016-03-111-1/+21
| | | | | | Task-number: QTBUG-38114 Change-Id: Id653487a03ca2920c46cf16e45f28677a69fa570 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-071-5/+6
| | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* winrt: add logging to platform pluginMaurice Kalinowski2016-02-1710-2/+93
| | | | | | Task-number: QTBUG-38114 Change-Id: I24c96bb2e29e1bbfe93dfe45aa764451aa9ddde8 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Fix clipboardMaurice Kalinowski2016-02-175-0/+275
| | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.6.0' into 5.6Liang Qi2016-02-154-13/+47
|\ | | | | | | Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
| * Merge 5.6 into 5.6.0Oswald Buddenhagen2016-02-021-1/+1
| |\ | | | | | | | | | Change-Id: I95962e28b6fc101cbbad41230585e2b61f1f6c0f
| * | winrt: set initial window sizeMaurice Kalinowski2016-01-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After creating the swapchain we set an initial size for the content matching the screen size. Only afterwards append it to the canvas. This fixes problems where dialogs were scaled wrongly, sometimes up to 4 times too big. Task-number: QTBUG-50335 Change-Id: Ie3ad9aa3509dfa105ae2ac2b95d2662ff25cdeba Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * | winrt: Add support for offscreen surfacesMaurice Kalinowski2016-01-263-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix input pane usage on Windows 10 IoT CoreMaurice Kalinowski2016-02-121-4/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Running on Raspberry Pi casting to IInputPane2 fails with E_NO_INTERFACE as there is no input pane available for the device. However, if E_NO_INTERFACE is returned from the lambda, then deletion of the ComPtr holding the AsyncAction in runOnXamlThread() crashes somewhere deep internally of Release(). As we do not check for the return value anywhere, avoid the crash by returning S_OK instead. Change-Id: Icd38ec482b365285a482e5ff792ec1b4f13317d5 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | winrt: fix typoMaurice Kalinowski2016-01-261-1/+1
|/ | | | | Change-Id: I621043b6be797e250fd2cd17de22a18d8773b01c Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: enable hardware buttons for Windows 10Maurice Kalinowski2016-01-142-37/+64
| | | | | | | | | | | | | | | | | | 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>
* winrt: Flush the system event queue when adding/removing windowsMaurice Kalinowski2016-01-111-0/+2
| | | | | | | | | | | | | | This has only been identified by WACK for Windows 10. QWinRTWindow::setVisible adds a Window to the screen and immediately tries to set the native visibility. This only works when the system events are handled immediately. While this is the case most of the time, certification tests revealed that this is not always the case. We have to flush before setting the element visibility. Change-Id: Ifce4c045c185c57bc386a4e832074fb84f5d0053 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winphone: Properly close the applicationMaurice Kalinowski2016-01-113-0/+22
| | | | | | | | | | | | | | | | | | | 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: Fix application shutdownMaurice Kalinowski2016-01-111-6/+11
| | | | | | | | | | | | | | | | | | | | | Do not create a dummy eglDisplay when the global static is constructed. This causes ANGLE to wrongly set some internals, which breaks usage of EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE as the attribute map might be empty after calling eglGetPlatformDisplayEXT. Furthermore initialize() assigns a new display to it without terminating the old one. This way, the internal suspend handler in ANGLE (Trim11.cpp) will be added to the application. The suspend handler is not invoked when an application suspends though. Reason being that the handler needs to be added from inside the Xaml thread. As we cannot control this inside ANGLE, we will call eglInitialize inside the Xaml thread and hence get the suspend event properly. Task-number: QTBUG-50337 Task-number: QTBUG-50292 Change-Id: I3867377254c37084bf24f18e78af467f6237db57 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT: Add camera button events on Windows PhoneSamuel Nevala2016-01-052-0/+68
| | | | | | | | | | | | | | 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>
* 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>