summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.h
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Fix cursors getting out of sync after restoring override ↵Friedemann Kleint2021-12-081-0/+3
| | | | | | | | | | | | | | cursors on native windows Introduce a flag to QWindowsWindow which forces the cursor to be applied after restoring override cursors. Fixes: QTBUG-98856 Pick-to: 6.2 5.15 Change-Id: Id62cdc2dd01f45324503a542446b1c11a1fe6f44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Further cleanup of pre-Win10 codeYuhang Zhao2021-11-241-82/+0
| | | | | | | | | | | | | | | | | Mostly a removal of dynamically loaded Win32 APIs. Since Qt 6's minimum supported platform is Win10 1809 (10.0.17763, code name RS5), all these functions will be available and no need to resolve them at run-time. Things not remove: WinTab functions in "qwindowstabletsupport.cpp". Not my familiar area, so not touch it. Pick-to: 6.2 Task-number: QTBUG-84432 Change-Id: I7ad6c3bc8376f6c0e3ac90f34e22f7628efeb694 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Track current window DPIMorten Johan Sørvig2021-08-061-0/+4
| | | | | | | | | | The WM_DPICHANGED event gives us the new DPI, but we also need the current DPI in order to determine the scale factor corresponding to the DPI change. Pick-to: 6.2 Change-Id: Ia61388415f57aa739397d3125b8751952e8fd392 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Add support for PerMonitorV2 DPI awarenessMorten Johan Sørvig2021-02-081-0/+5
| | | | | | | | | | | | | | Add support for opting in to PerMonitorV2 DPI awareness on the command line: -platform windows:dpiawareness=3 This mode is supported on Windows 10 and up. Setting it requires using the new SetProcessDpiAwarenessContext API, which can be resolved from user32.dll. Task-number: QTBUG-68712 Change-Id: I37821e27a67e08c2e9fef25e494cfd7abed13314 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Use a QSharedPointer for the touch deviceFriedemann Kleint2020-10-261-2/+0
| | | | | | | | | | For reasons of symmetry with the tablet devices. As a drive by, give it more distinct IDs. Task-number: QTBUG-46412 Change-Id: Ie667621246b26db6fdda84c5ff2455fe38633cb3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Move the touch types API from platformheaders into QtGuiFriedemann Kleint2020-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | Change TouchWindowTouchType(s) to be (global) property of QGuiApplication's native Windows interface since it does not make sense to set it per window. It appears the previous code setting the types per Window has never worked since registerTouchWindow() bailed out due to the checks for the flags TouchRegistered and IsTouchWindow() (setting in HCBT_CREATEWND). In addition, registering windows for touch after plugging in a device would not observe the setting. Move the checks around to make this work. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I4306fdf13208f6eef22655875f3bd1769270e617 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Start the native interface QWindowsApplicationFriedemann Kleint2020-07-211-2/+2
| | | | | | | | | | | | Implement the static parts of QWindowsWindowFunctions. Move some things around and make them static in tablet support to make this easier. Task-number: QTBUG-83252 Change-Id: I24c3b0b3c6548eb96c4f3285a4e46385a1e79ef5 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Windows: Provide a way to switch between WinTab and Windows Ink at run-timeAndre de la Rocha2020-04-101-0/+1
| | | | | | | | | | | | | | | | This change adds the setWinTabEnabled() function to Qt Platform Headers, which allows an application to set at run-time whether the WinTab API will be used for tablet input instead of the native Windows Ink API. [ChangeLog][Windows] The setWinTabEnabled() function added to Qt Platform Headers now allows an application to set at run-time whether the WinTab API will be used for tablet input instead of the native Windows Ink API. Fixes: QTBUG-83218 Change-Id: I51d3c7316baeda136763cf37c2f54295905450ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-181-0/+2
|\ | | | | | | Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
| * Windows QPA: Fix broken frame geometry when moving windows with native menusFriedemann Kleint2020-03-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::updateFullFrameMargins() which is called from the screen changed handling does not take native menus into account. Since the size of the menu is not known when using EnableNonClientDpiScaling(), obtaining the correct frame size requires triggering a WM_NCCALCSIZE message. Extract the helper forceNcCalcSize() from QWindowsMenu and use that from updateFullFrameMargins() in case menus are present. Amends d2fd9b1b9818b3ec88487967e010f66e92952f55. Fixes: QTBUG-82580 Change-Id: I306f1faf84e26c88608cb22ffd42eccc848905c3 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | Windows QPA: Add detection of dark modeFriedemann Kleint2020-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | Read the dark mode setting and make it accessible via native interface. Add a command line option to set the support level. Task-number: QTBUG-72028 Change-Id: I1e9fe296a6b1bda81512d003183038b866b67545 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA: Better disambiguate Window class namesFriedemann Kleint2020-01-251-0/+1
|/ | | | | | | | | Use a standard prefix for Window class names containing version, build and namespace which should reduce conflicts. Task-number: QTBUG-81347 Change-Id: Ia7c20af71d364e362781f791a4e51b77d605c918 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-11-131-0/+2
|\ | | | | | | | | | | | | | | Conflicts: examples/widgets/widgets/scribble/mainwindow.cpp This amends cb54c16584cf3be746a1a536c1e37cb3022a2f1b. Change-Id: Iaae60a893330524b2973917e23b31f9d51f8bd38
| * Windows QPA: Fix missing update when the display is sleepingAndre de la Rocha2019-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | If an item was updated while the display was in sleep mode then when the display came back from sleep it would not be updated. This change detects when the display returns from sleep and repaints the windows to ensure the updated items are presented. Fixes: QTBUG-76307 Change-Id: I5fff5209e8a5c359d06ba1df61944690e9475ea6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Replace Q_DISABLE_COPY by Q_DISABLE_COPY_MOVEFriedemann Kleint2019-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix clang warnings like: warning: class 'QWindowsStaticOpenGLContext' defines a default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions Change-Id: I736d20476ef407100b6ecb654d1112106e545758 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA: Use nullptr consistentlyFriedemann Kleint2019-05-281-2/+2
|/ | | | | | | | | Change-Id: I09297e34bd62359e31c483199ade1d7a0baf7195 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix window frame calculation in multi-monitor setupsFriedemann Kleint2019-05-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introducing EnableNonClientDpiScaling() for QTBUG-53255, the window frame calculation was not adapted. That is, window frames were calculated from the style for the primary screen only, causing - minimum size constraints not being calculated correctly for applications on secondary screens when populating the MINMAXINFO structure. - warnings about not being able to apply a geometry when moving fixed size windows across screens. The calculation of the frames for propagating size hints is also no longer required after 3035400f36731c400adb9204b94e9afe346a71b7, which retrieves them from the WM_NCCALCSIZE message; QWindowsWindow::fullFrameMargins() can be used instead. For newly created windows, use the newly added AdjustWindowRectExForDpi() function to calculate the initial frame size. Change QWindowsGeometryHint from a class to a collection of static functions and add overloads to calculate the frame. In checkForScreenChanged(), update the margins until WM_NCCALCSIZE is received. Task-number: QTBUG-67777 Task-number: QTBUG-65580 Task-number: QTBUG-53255 Change-Id: Iff2d382b2b316adec6c1a0622ae8015dba6de371 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* Windows QPA: Add helper function to obtain DPI-dependent metrics on Windows 10Friedemann Kleint2018-10-171-0/+14
| | | | | | | | | Use newly introduced SystemParametersInfoForDpi() API with some convenience overloads. Task-number: QTBUG-4362 Change-Id: I4c41c700007bf7cc4fd5868356e3145c136704c0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Work around intermittent clipboard copy failuresFriedemann Kleint2018-09-281-0/+2
| | | | | | | | | Repeatedly attempt to open the clipboard in case it is opened by other applications. Task-number: QTBUG-27097 Change-Id: Ic1cfec0bb17e34f8c7f744add21a4431dae4f5b7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Windows QPA: Dispatch skipped touch/pen events if compression is offRomain Pokrzywka2018-09-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the hardware produces events faster than the app can consume between two updates, Windows automatically coalesces them into a single message with the latest touch/pen pointer state and coordinates, effectively compressing those events. But the pointer API also supports querying and retrieving the skipped individual touch and pen frames. There are cases where keeping all the events generated by the hardware is desired, especially for pen events where having the most sampled points available is critical to precisely rendering curves. Qt already defines application attributes to control event compression for general high frequency events and for tablet events in particular. Use them on Windows also to control whether to retrieve skipped frames. [ChangeLog][Windows] The application attributes AA_CompressTabletEvents and AA_CompressHighFrequencyEvents are now supported on Windows 8 and above for touch/pen input, with the same defaults as on X11 (compress touch events, don't compress tablet events) Task-number: QTBUG-44964 Task-number: QTBUG-60437 Change-Id: I1b11a043e2d71ee502895971fafb3a46306a89d8 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix duplicate Pointer Touch events and missing TouchCancelRomain Pokrzywka2018-08-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | translateTouchEvent needs to filter events based on the message type passed in msg, as Windows sends more than just down/up/update events, it also sends enter/leave for each touch and occasionally a few more. One of them is WM_POINTERCAPTURECHANGED which indicates a general loss of touch input, which needs to be translated to a touch cancel event. Ignore WM_POINTERENTER/WM_POINTERLEAVE events as they result in sending duplicate Qt::TouchPointPressed/Qt::TouchPointReleased events otherwise. Also avoid sending duplicate events for each additional touchpoint: Windows already bundles all available touchpoints for a touch event when calling GetPointerFrameTouchInfo, so we get all points at once, but we'll still receive other events for each additional touchpoint, resulting in reading the same bundled data again for each one and sending duplicate events to QWindowSystemInterface. Use SkipPointerFrameMessages() to avoid receiving the additional events for the frame we just processed. Finally, add raw event logging when the platform verbose level is >1. Change-Id: I55d840285f642a00f6ffcda4a3efd7ae3985310b Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* Windows QPA: Improve Pointer Pen events translationRomain Pokrzywka2018-08-271-0/+2
| | | | | | | | | | | | | | | | | | Compute QPointF hi-res screen coordinates based on the HIMETRIC values contained in the native message. This gives the same high-precision screen coordinates as what the old WinTab handler supported. Add the possibility to not synthesize mouse events if the platform plugin option DontPassOsMouseEventsSynthesizedFromTouch is set, just like we do for finger touches. This makes it possible to have clean Pen events without mouse duplicates for an application that handles both input types in parallel. Add raw event logging when the platform verbose level is >1. Change-Id: Ibf68b6275400388a76f8d5c573eed8f4b9bf4e9d Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Add option to detect AltGr key pressesFriedemann Kleint2018-08-211-0/+2
| | | | | | | | | | | According to MSDN, AltGr key presses are sent as a sequence of SYS left Ctrl + right Alt. Add an option to detect AltGr as modifier key. Task-number: QTBUG-69317 Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add logging for QPlatformBackingStore::composeAndFlushTor Arne Vestbø2018-08-071-1/+0
| | | | | Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add Windows Pointer Input Messages supportAndre de la Rocha2018-07-121-2/+21
| | | | | | | | | | Replaces the handling of tablet/touchscreen/touchpad/mouse input with a unified implementation based on the Windows Pointer Input Messages added to Windows 8. The legacy implementation is still used for Windows 7. Task-number: QTBUG-60437 Change-Id: I0a0f48ee9d5365f84ba528aa04c6ab1fe4253c50 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-231-3/+3
| | | | | | | | | | | | Change #include <QtCore/QDebug> to #include <QtCore/qdebug.h> according to the coding style. Change-Id: I6ba8a7424c548ddde1d18f3f6f4f87e30973d710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Fix duplicate/missing native eventsFriedemann Kleint2018-04-201-0/+3
| | | | | | | | | | | | | | | | | | | Add utility functions to QWindowsContext input messages sent to native event filters (event dispatcher and window system interface). Do not send input and similar events to the event dispatcher since QEventDispatcherWin32::processEvents() also sends them. Note though that QEventDispatcherWin32 does not receive all windows messages. In QWindowsKeyMapper, send the WM_CHAR/WM_IMECHAR events from where the messages are removed. Task-number: QTBUG-67095 Change-Id: I5f61294fcb3aee7e0eacd840a2010d128cd02a5d Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add support for Windows UI AutomationAndre de la Rocha2017-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the Qt Accessibility Windows back end, formerly based on legacy MSAA, with a new implementation based on UI Automation. Fixes issues with accessibility tools like screen readers and magnifiers, and with the automatic showing and hiding of the virtual keyboard in touchscreen-based Windows computers. [ChangeLog][Windows] The Windows Accessibility back end, formerly based on Microsoft Active Accessibility, was replaced with a new implementation based on Microsoft UI Automation. Task-number: QTPM-487 Task-number: QTBUG-53024 Task-number: QTBUG-43190 Task-number: QTBUG-61926 Task-number: QTBUG-38499 Task-number: QTBUG-38337 Task-number: QTBUG-38501 Task-number: QTBUG-38502 Task-number: QTBUG-38504 Task-number: QTBUG-38505 Task-number: QTBUG-38507 Change-Id: I20b4f8f5e938fef791c6e9c577fcd919140999bd Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Windows QPA: Directly link against touch functionsFriedemann Kleint2017-10-051-13/+0
| | | | | | | They are available on Windows 7. Change-Id: Ia937c459fe0df0d39d407ca0e65641f8aa583f4a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Windows QPA: Implement QPlatformWindow::initialize()Friedemann Kleint2017-07-181-1/+1
| | | | | | | | | | | | | | Move the code that sends geometry change events from QWindowsIntegration::createPlatformWindow() to QWindowsWindow::initialize(), using the obtained geometry from the creation context. Drop the check for window flags since they are not changed. Complements change 4c855a9f9ff523e2753157897100393d14bf2f9e Task-number: QTBUG-61977 Change-Id: I0c23abefc45110cc4bf11e10d65dc7ddbb9d20d5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Native Windows file dialog: Observe Windows Explorer "Show hidden files" settingFriedemann Kleint2017-06-131-0/+2
| | | | | | | | | | Extract a helper function to read the setting and use that in file dialogs and tray icon. Task-number: QTBUG-60593 Change-Id: I03cf1e45611690a128bf2cc17eba5dff23b86969 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Move system tray icon implementation into the pluginFriedemann Kleint2017-04-271-0/+1
| | | | | | | | | | | | | | The system tray icon implementation relied on QMenu. After the introduction of QPlatformSystemTrayIcon::contextMenuRequested(), the code can be moved into the plugin, making use of native menus when enabled or falling back to QMenu. This enables the SystemTrayIcon QML Type to work. [ChangeLog][QtGui][Windows] A native system tray icon is now available for SystemTrayIcon. Change-Id: I0fdbfb5cbb815c1ea6fb19305a9bceb9c5bcc034 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Add native menusFriedemann Kleint2017-04-271-0/+3
| | | | | | | | | | | | | | | | | | | | | Add simple Win32-API based menus (not owner-drawn). Native menus are implemented using Win32 API and are simpler than QMenu-based menus in for example that they do allow for placing widgets on them or changing properties like fonts and do not provide hover signals. They are mainly intended for Qt Quick. By default, they will be used if the application is not an instance of QApplication or for Qt Quick Controls 2 applications. In addition, the command line option -platform windows:menus=native will unconditionally activate them and -platform windows:menus=no turns them off. [ChangeLog][QtGui][Windows] Native menus have been implemented. Task-number: QTBUG-55967 Change-Id: I439a7d949745debea3eb0e5789cf42288a0d526f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Windows QPA plugin: Use member initializationFriedemann Kleint2016-11-301-18/+16
| | | | | | | | Use C++ 11 member initialization in value-type structs. Task-number: QTBUG-51673 Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Windows QPA: Use new EnableNonClientDpiScaling() for Windows decorationFriedemann Kleint2016-11-221-0/+7
| | | | | | | | | | Use newly introduced EnableNonClientDpiScaling() function to fix the decoration having the wrong size in multimonitor setups with per-monitor DPI awareness. Task-number: QTBUG-53255 Change-Id: Ic6e2f2a92f790259107d2a0837b96177cf3adb5f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Windows QPA: Reimplement calculation of window framesFriedemann Kleint2016-11-181-1/+3
| | | | | | | | | | | | | | | Instead of relying on AdjustWindowRectEx() and dirty-handling, capture the rectangles before and after the processing of WM_NCCALCSIZE and calculate the frame from that. This allows for changing window frames by handling WM_NCCALCSIZE and monitor-dependent window frames when using High DPI scaling. Task-number: QTBUG-53255 Task-number: QTBUG-40578 Task-number: QTBUG-56591 Change-Id: If8364a5440a6324ea5d470bf5b74e68942285abe Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Move Windows font DB and engines to QtFontDatabaseSupportGabriel de Dietrich2016-10-281-1/+0
| | | | | | | | | | | | | | | This allows creating or extending QPA plugins to provide access to QFont and related types. It concerns both GDI and DirectWrite engines, as well as the regular and the freetype based font databases. The qt.qpa.fonts logging category has been moved together into the QWindowsFontDatabase related files to avoid depending on the qwindowscontext.h header file. Finally, QwindowsNativeImage is following pending a future refactor with similar code in qpixmap_win.cpp and the Windows XP style. Change-Id: Iddff2f3d715e3ab7695e6c2052b7596a01fd6fa8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Remove qtwindows_additional.h.Friedemann Kleint2016-05-171-1/+1
| | | | | | | | | | Clean up helper definitions required for old SDKs and MinGW and move the remaining ones to the files that require them. Ensure compilations with MinGW 4.9. Task-number: QTBUG-51673 Change-Id: I607989dd1d9197f237c6d021209a2c94aeb84021 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Increase API level to 0x600 (Windows Vista).Friedemann Kleint2016-04-011-35/+3
| | | | | | | | | | | | | | - Directly link against dwmapi which should be present on Windows Vista and remove duplicated header constants. - Remove struct QWindowsShell32DL since all required functions are present on Windows Vista. - Remove functions that are no longer needed from QWindowsUser32DLL with exception of the clipboard functions which are not present in the MinGW stub libraries until v5. Task-number: QTBUG-51673 Change-Id: Ia4a8a3f1db0f0d02322317d547e61ae39f9008b5 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Windows QPA: Remove Windows CE.Friedemann Kleint2016-03-291-5/+1
| | | | | | Task-number: QTBUG-51673 Change-Id: I5b58a7d1651fce7f868a4d3fdd8fa46f35e67695 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.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>
* Windows: Output resulting DPI awareness in debug and warning output.Friedemann Kleint2016-01-081-1/+2
| | | | | | | | | | | | Fix the signature of QWindowsShcoreDLL::GetProcessDpiAwareness and output the value in the warning about failures of SetProcessDpiAwareness and in debug output. Failures occur when Qt is embedded into another application, for example Active Qt servers. Task-number: QTBUG-41186 Task-number: QTBUG-50206 Change-Id: I3fd6cba26826ee8bbfa0a34f129deb64797c947f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows QPA: Add API for setting the application orientation preference.Friedemann Kleint2015-11-271-0/+6
| | | | | | | | | | Dynamically load the Win32 API functions for setting the rotation preference and map this to static functions taking a Qt::ScreenOrientation in QWindowsScreen. Task-number: QTBUG-49541 Change-Id: I1c81cf6274d79a023a2ee755dd7c085ffd7cc015 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Delay-initialize pluggable touch devices.Friedemann Kleint2015-10-281-0/+3
| | | | | | | | | | | | | Move touch device initialization code to QWindowsContext and replace the assert on the touch device in QWindowsMouseHandler by a call to the initTouch(). Task-number: QTBUG-48849 Change-Id: If8573b8283ef94e7fd015f6edc626e3c8cc0b139 Reviewed-by: Joni Poikelin <joni.poikelin@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Support virtual folders as initial directory for file dialog.Friedemann Kleint2015-03-271-0/+8
| | | | | | | | | | | | | Use the scheme "clsid" to be able to pass them as "clsid:<GUID>" (with '{', '}' stripped). Task-number: QTBUG-33962 Change-Id: Ib045fe81518bca6e91588007ce8a245a48479b1f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Patrick Spendrin <patrick.spendrin@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Only set the touch flags if the window is not already registeredAndy Shaw2015-03-111-0/+2
| | | | | | | | | It is possible for there to be a HCBT_CREATEWND hook which can set the touch window flags already while the window is being created. Therefore we want to defer to those settings instead as they should take precedence. Change-Id: If8dcbd34db2b3bbbfb1bc36731665fb17fb87c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@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>
* Windows: make TranslucentBackground functional alwaysLaszlo Agocs2015-01-191-1/+1
| | | | | | | | | | | | | | | | QOpenGLWidget and QQuickWidget was not functional when WA_TranslucentBackground was set. This is due to the static "isGL" type of checks that are not suitable since 5.3 due to RasterGLSurface windows which may or may not be OpenGL windows, depending on their content. To handle this, we have to do some check on every makeCurrent and perform the necessary calls (most importantly SetLayeredWindowAttributes). Task-number: QTBUG-43854 Change-Id: If19c79482ec4f0a8b795ee710d52ed7e08b52563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>