summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* eglfs_kms: Remove unused virtuals and move flip callbackLaszlo Agocs2017-09-197-46/+29
| | | | | | | | ...to the screen, where it belongs. Task-number: QTBUG-63088 Change-Id: I4bfc4c259f91431d12851f888a7d044e43856d63 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Forward nativeRes.ForInteg.() to backendsLaszlo Agocs2017-09-195-0/+17
| | | | | | | | | | | | | Expose the fd from eglfs_kms. More exposed bits will follow later on. [ChangeLog][Platform Specific Changes][eglfs] The DRM+GBM backend now exposes the DRM/GBM device handle under the key "dri_fd", queriable via nativeResourceForIntegration(). Task-number: QTBUG-63088 Change-Id: Iac95393c115bb83d1f65cb4a7acc0ea3e7d3e68f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Allow forwarding platformFunction() to backendsLaszlo Agocs2017-09-193-3/+8
| | | | | | Task-number: QTBUG-63088 Change-Id: I52cc56324c755cc4f7c9388470bfd27793b4abeb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Move out window subclass from integrationLaszlo Agocs2017-09-194-56/+153
| | | | | | | | Clean up the includes too while we are at it. Task-number: QTBUG-63058 Change-Id: I36eaaa5fc18219ca271b6bea8425ac8cc7cb8b6d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* kms: Rename the plane index workaround vars appropriatelyLaszlo Agocs2017-09-193-21/+6
| | | | | | | | | ...and purge support from eglfs_kms. That path never worked, the environment variable was meant for the NVIDIA backend only. Task-number: QTBUG-63058 Change-Id: I8cf47168d5878e18eb22c839d56e2d48cbb4fdad Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* iOS: disable Apple Pencil support if configure -no-feature-tableteventShawn Rutledge2017-09-152-2/+14
| | | | | | Task-number: QTBUG-59042 Change-Id: Ia60cb01206316ae85fffac44c453803f39d3a611 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix compilation with clang 4 on LinuxLars Knoll2017-09-151-1/+1
| | | | | Change-Id: I7fdafeced7cdef7a97b4e004e9302cb2f1e6f258 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add Apple Pencil support on iOSShawn Rutledge2017-09-143-22/+64
| | | | | | | | | | | | | The Apple Pencil now generates QTabletEvents, with tilt, rotation and pressure. Predicted touches are not supported, because we don't yet have a suitable QEvent or flag for that. [ChangeLog][iOS] The Apple Pencil now generates QTabletEvents, with the complete feature set (tilt, rotation, pressure). Task-number: QTBUG-59042 Change-Id: Id58e22ac4cf8dfa80519d516c388309966f773f9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Android: remove support for local/debug deploymentJake Petroules2017-09-064-18/+13
| | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: I3fa6819259be365b7a697f7db1d1d01a94032395 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* eglfs_kms: Add headless mode for DRM render nodesLaszlo Agocs2017-09-056-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to switch /dev/dri/cardX to /dev/dri/renderDY is futile on its own now since many output-related drm operations fail and we eventually crash. Add a new headless mode that skips the real screen stuff and registers a fairly dummy, headless screen, does not bother with the mouse cursor, and disallows rendering to the screen via a QWindow (while keeping the actual rendering still fully functional). Such applications will not need any special privileges and will run even if there is a DRM master (X11, Wayland compositor) active. For example the configuration can look like this: { "device": "/dev/dri/renderD128", "headless": "1024x768" } After this applications have two choices to perform offscreen rendering: 1. Use an ordinary window (and its default framebuffer, meaning the gbm_surface), e.g. a QOpenGLWindow subclass MyOpenGLWindow w; w.show(); // will not actually show on screen w.grabFramebuffer().save("output.png"); Note that there is no vsync-based throttling. Also note that windows are still sized to match the screen size, hence the need for specifying a size in the headless property. 2. Or the typical offscreen approach with an extra FBO QOffscreenSurface s; s.setFormat(ctx.format()); s.create(); ctx.makeCurrent(&s0; QOpenGLFramebufferObject fbo(1024, 768); fbo.bind(); ctx.functions()->glClearColor(1, 0, 0, 1); ctx.functions()->glClear(GL_COLOR_BUFFER_BIT); fbo.toImage().save("output.png"); ctx.doneCurrent(); Task-number: QTBUG-62262 Change-Id: Ic1dbfa2b27b223bd5ef8ba36b665f0f61abf4f06 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Output cloning supportLaszlo Agocs2017-09-054-24/+141
| | | | | | | | | | | | | | | | | | | | | { "device": "/dev/dri/card0", "outputs": [ { "name": "HDMI1", "mode": "1920x1080" }, { "name": "DP1", "mode": "1920x1080", "clones": "HDMI1" } ] } Here, assuming the QScreen for DP1 is unused and the resolution is the same, DP1 will simply mirror whatever is on HDMI1. The plane-based mouse cursor is not currently supported. Same goes for any form of scaling since this simply scans out the same framebuffer on all target CRTCs. Task-number: QTBUG-62262 Change-Id: I391be204264284a1bff752ebc2a1dbe5c8592013 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Add support for formats other than XRGB8888Laszlo Agocs2017-09-052-10/+44
| | | | | | | | | | | | | | | | | | Switch to drmModeAddFB2 and add mappings for RGB565 and ARGB8888, and some BGR variants. The default is XRGB8888, like before. Others can be requested in the config file with "format": "rgb565" or "argb8888" etc. on a per-output basis. If the primary plane does not support the format, modesetting and flipping will fail. Task-number: QTBUG-62262 Change-Id: I8537cbeed7f046c46aa63fcea6d6946c0e0038a7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Skip modesetting when current is good enoughLaszlo Agocs2017-09-051-25/+42
| | | | | | | | | | | | | | ...unless explicitly requested via QT_QPA_EGLFS_ALWAYS_SET_MODE. This mirrors the behavior of the EGLDevice backend. Synchronize the "swap" behavior in other aspects too: do not retry a failing modeset until infinity, and make the (currently limited but soon enhanced) plane setup independent of the modesetting. Task-number: QTBUG-62262 Change-Id: If43c4edf09c526a3d0f566994a3d632c217d2c31 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Lift the one window per screen ever limitationLaszlo Agocs2017-09-053-8/+17
| | | | | | | | | | | | | | | There is still one fullscreen window per screen at a time, but there is no reason we should fail in the backend when the screen already has the gbm_surface created. If there is really another active GL window for this screen, then the base eglfs window implementation will panic anyway. This should help certain cases, where windows belonging to screen B get created for screen A and then moved (recreated) for screen B. Task-number: QTBUG-62262 Change-Id: Ia029f028d32a35e8e023f3132097ba9a919b8fe8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: remove unused codeLaszlo Agocs2017-09-054-26/+1
| | | | | | | Task-number: QTBUG-62262 Change-Id: If21cbfcda2decf7bd70cf56695ee1d676cbaa55f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Remove useless log entry for each QOffscreenSurfaceLaszlo Agocs2017-09-051-1/+0
| | | | | | Task-number: QTBUG-62262 Change-Id: Id5225737f619d3f0d980e8b67de92f30dc62e8a6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add QPlatformSurface::screen() constJesus Fernandez2017-09-044-12/+21
| | | | | | | | | | | | | | Classes inheriting QPlatformSurface need to return the QPlatformScreen to allow the platform integration plugin to know information about the used screen by the surface. QPlatformSurface and QPlatformWindow had the same function defined, but it was not possible to call it without casting the QPlatformSurface pointer. Change-Id: I1f93fe7c13ebbc51769677038edeca4de5db0024 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-3128-171/+96
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Cocoa integration: do not use released sessionTimur Pocheptsov2017-08-291-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTBUG_10735_crashWithDialog started to show flakyness recently - it crashes, but not every time (which fits the definition of UB perfectly). While the test itself is doing weird things and puts our event dispatcher into a weird state, our API allows to: 1. Using QDialog to enter event loop (with runModalSession under the hood), then ... 2. to call from a slot (e.g. timer-attached) QApplication::closeAllWindows() while ... 3. we are still inside that special loop and using the 'session' object, thus ... 4. on the next iteration with [NSApp runModalSession:session] we'll re-use already released session (released by endModalSession which in turn was called indirectly by closeAllWindows). And Cocoa gives us a warning/hint: "Use of freed session detected. Do not call runModalSession: after calling endModalSesion:." Task-number: QTBUG-62589 Change-Id: Ie651cee1fba43cfd2b0fc44af5eddc5fd52e2907 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * QCocoaMenu: Stop update timerGabriel de Dietrich2017-08-281-0/+1
| | | | | | | | | | | | | | | | This amends patch f27d1ccbb24ec2fd4098f2976503478831006cc8. Change-Id: I4c7a390a5f2cdd3307007c7b6708692c36f861b4 Task-number: QTBUG-62396 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Remove QMAKE_LIBS_CORE variableJoerg Bornemann2017-08-281-1/+1
| | | | | | | | | | | | | | | | Define the lib dependencies for corelib in corelib.pro, where they belong. Change-Id: I973d3b0c571782d869b27dea243e899db4dddc43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Add missing #ifdef for isTouchScreen() implementationAndy Shaw2017-08-251-0/+2
| | | | | | | | | | | | | | | | | | The definition of isTouchScreen() is protected with XCB_USE_XINPUT22 so the implementation needs to have this too. Task-number: QTBUG-62226 Change-Id: Icc3de01a6cb1299b43e56fc9f77833764131ca4b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * Cocoa: Fix compile when using QT_NO_TABLETEVENTAndy Shaw2017-08-252-0/+6
| | | | | | | | | | Change-Id: I76f08d747009a5bf2c0e8004c3443e16e83b6a7d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Initialize the print engine with the given printer nameAndy Shaw2017-08-2510-15/+19
| | | | | | | | | | | | | | | | | | | | | | Originally when the QPrinter was created it would create the engine with the default printer and then change it afterwards even though the desired printer may already be known here. So by passing the printer name we ensure that it is initialized with the desired one right away. Task-number: QTBUG-62221 Change-Id: Iaa90243708b57bf89354a527a982ac45c991f603 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * iOS: Remove support for OpenGL-backed QBackingStoreTor Arne Vestbø2017-08-243-141/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The default on iOS has been raster for two years now, as of 3e892e4a97, and we haven't seen any major performance regressions that would warrant keeping the OpenGL based code-path alive. This includes the default surface format, which was ony set so that QPainter clip regions would work when using the GL backed backing store. Change-Id: I37b880a758b9c3fad1f23ae60268629ffbe9bc3e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QTableGenerator: Fix handling of illegal characters in fromBase8Robert Loehning2017-08-231-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-60387 Change-Id: I084c2b4a86439857e898e9adc7370c19961d0126 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Windows QPA: Call raise unconditionally for popupsFriedemann Kleint2017-08-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | A case of nested Qt::WindowStaysOnTopHint may occur when context menus are created on windows with Qt::WindowStaysOnTopHint set. Raise the popup in that case. Amends 329a029c361bcbaf70f3aa919693f0bef48a152f. Task-number: QTBUG-62004 Change-Id: Ifb761edbd42b1447bec30735810c006d02e1aa97 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Android: stop composing before pasting new textPaul Olav Tvete2017-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | We have to exit composition mode before inserting text. Otherwise, the state of the input method will be out of sync with the contents of the text editor. Task-number: QTBUG-61717 Change-Id: I58bf3988ae9e0acf3302e810e46bb0ebeda30d17 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * kms: Send enter and leave events to all screensPier Luigi Fiorini2017-08-201-0/+2
| | | | | | | | | | | | | | | | Propage event to all sibling screens resulting in enter and leave events being properly sent. Change-Id: Ia89d53105f6303fae3f304ce0920b5a4a24f86ae Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * fix configure PSQL_*= being ignored, take 2Oswald Buddenhagen2017-08-181-1/+1
| | | | | | | | | | | | | | | | amends 09e2fc43ab. Task-number: QTBUG-62402 Change-Id: I63ca700b12646e8be97735b67c1519b0b4625798 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Android: Fix compile using ndkr15 clang and unified headersBogDan Vatra2017-08-182-0/+2
| | | | | | | | | | | | | | Add missing includes Change-Id: I6fd58c9ebb5a8099c99928e3a7a0cbf3aa23ba43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * XCB: Don't core-dump if we can't connect to the X displayNameThiago Macieira2017-08-163-8/+30
| | | | | | | | | | | | | | Exit with error, but don't crash. Change-Id: Ie05c6480d8a44fda817ffffd14d9dfd8c951beef Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | macOS: Deduplicate QNSWindow/QNSPanel codeTor Arne Vestbø2017-08-245-213/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By sharing the implementations of the methods between QNSWindow and QNSPanel we don't need a helper, and can remove duplicated code. This duplication would expand in the future, as for each method added to the QNSWindowProtocol, we would have to add forwarding functions in both QNSWindow and QNSPanel, forwarding to QNSWindowHelper, and then two more functions in QNSWindow and QNSPanel in case we wanted to call super from the helper, similar to [QNSWindow superSendEvent]. The only snag is that calls to super are hard-coded to a specific superclass during complication, so we provide our wrapper for objc_msgSendSuper that resolves the superclass at runtime. The helper class QSendSuperHelper provides compile time implicit instantiation of the right template without having to provide the return type as a template argument, via operator T and a fallback for the case of no return type via the destructor. Change-Id: Iaf13f27675d90f884470f5005270ea0d9d0316f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | macOS: Simplify and correct style mask determinationMorten Johan Sørvig2017-08-221-43/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function had accumulated a fair bit of accidental complexity over the years. - No early returns, make sure to preserve fullscreen state for all windows. - Use windowIsPopupType() directly to set borderless for Qt::Popup (but not Qt::Tool). - Handle Qt::Tool explicitly. - Deduplicate Qt::CustomizeWindowMask handling. - Remove case that used the absence of NSResizableWindowMask to remove the maximize button. Maximize is now disabled elsewhere (setWindowZoomButton). All windows now get NSResizableWindowMask by default. - Qt::ForeignWindow now gets a standard window style mask instead of NSBorderlessWindowMask. The old code did not handle this case and left the mask value unmodified. Change-Id: I56499e9f05c3f481b5a96e0507da2fb195f207fa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | macOS: Restore support for layered modeTor Arne Vestbø2017-08-213-2/+55
| | | | | | | | | | | | | | | | | | After 871966 we now do drawing as a result of drawRect calls, but layer backed mode was not taken into account. This restores support for both pull and push-mode drawing in layer-backed mode. Change-Id: I35039ee9eb4486206f9f92f8230df104473368c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Redraw window bottom corners after synchronous backing store flushTor Arne Vestbø2017-08-182-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing outside of the display cycle does not care about any ordering between views, including the NSThemeFrame responsible for drawing the rounded corners of the window. Since Qt Widgets is doing a lot of synchronous flushing (for now, until we plumb update() to requestUpdate(), or enable layer-backing), we add a workaround that explicitly draws the corners after flushing, just like the logic in [NSView displayIfNeeded]. This is the same workaround used by WebKit: https://trac.webkit.org/changeset/85376/webkit Change-Id: I884152cdb2685569704e577b64b5ae278ed82c21 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Revert "macOS: Create NSView as initially hidden, to match QWindow behavior"Shawn Rutledge2017-08-181-9/+8
| | | | | | | | | | | | | | | | | | | | It seems to break the ability to grab an offscreen QQuickView. That in turn breaks the tst_qquickimage::hugeImages autotest. This reverts commit 096b56f336e5bb994d46f073d55496d36d38e6b1. Task-number: QTBUG-62548 Change-Id: I11ce452341bfc2cc3cbc832b613c7366049b31d5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-159-17/+91
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * QCocoaMenu: Sync menubar menu when adding itemsGabriel de Dietrich2017-08-152-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Empty menus on a menubar are hidden by default. If the menu gets added to the menubar before it contains any item, we need to get the menubar to sync the menu, which will update its native menu item hidden property. Menurama manual test's 'Add Many Items' button should now work. Change-Id: I8ce1df21031c171789318fdf28ae495819458d71 Task-number: QTBUG-62260 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QCocoaMenu: De-pessimize the number of calls to validateMenuItem:Gabriel de Dietrich2017-08-152-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Calling -[NSMenu update] every time we add a new item can result in a quadratic behavior since the function itself will iterate over all the items in the menu. We solve this by using a 0-timer which will trigger the call to update the next time the event loop spins. Menurama manual test updated. Change-Id: Ic155d364515cc93eb81b1c8085c8e44c93799954 Task-number: QTBUG-62396 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * macOS: Make alpha-based click-trough work againMorten Johan Sørvig2017-08-091-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3ea04c7d made it so that we always set the ignoresMouseEvent property on the NSWindow, based on the WindowTransparentForInput flag. However, this overwrites the magical secret initial state where click-trough is determined based on window content transparency - setting the property to false makes the window capture all events. Restore 5.6 behavior by not modifying ignoresMouseEvent if we can. Toggling WindowTransparentForInput on and off again is still broken. Task-number: QTBUG-54830 Change-Id: I5f44ce14d9a7dc1713f9efb1ef929e2969838d90 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fallback to QGnomeTheme if Gtk3 does not support long-press-timeJan Arve Sæther2017-08-091-2/+15
| | | | | | | | | | | | | | | | | | | | "gtk-long-press-time" was introduced in 3.14. Therefore, if the property does not exist, we should fallback to QGnomeTheme::themeHint(). Task-number: QTBUG-61393 Change-Id: I898c0ddebdbabb300d7ad9dd275d51836ad9cf8c Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | macOS: Create NSView as initially hidden, to match QWindow behaviorTor Arne Vestbø2017-08-111-8/+9
| | | | | | | | | | Change-Id: I25af6635ea9b6aa3fcc642fa2da0553341aabda8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | xcb: add support for peeking into the XCB event queueGatis Paeglis2017-08-114-4/+149
| | | | | | | | | | | | | | | | This will be used by the Qt X11 Extras module. Task-number: QTBUG-50358 Change-Id: Ie095cd211c393ea6d78660b4d53cac28b435a3b2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | macOS: Remove dead code from Leopard timesTor Arne Vestbø2017-08-101-6/+0
| | | | | | | | | | Change-Id: I02bc0a8488763fea525771636538b9d0943b8971 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | macOS: Log target view for backingstore flush without quotesTor Arne Vestbø2017-08-101-1/+1
| | | | | | | | | | Change-Id: I0d5f9f9172aaa7b9b7575dce6ba59b23567b35ce Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | xcb: re-factor QXcbConnection::printXcbEventGatis Paeglis2017-08-102-55/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To use categorized logging. - Print also non-core event types. - Added QLoggingCategory as one of the parameters because I will need it in a subsequent patch. - A call to this function in QXcbConnection::handleXcbEvent I left disabled from builds by default as the "handled" variable is broken. Change-Id: I15cd71c40b5772a4352a69cdc24a0ae026626060 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | xcb: use XInput2 for mouse starting from 2.0 not 2.2Gatis Paeglis2017-08-097-114/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 53d289ec4c0f512a3475da4bbf1f940cd6838ac fixed the issue of not getting touch events when grabbing via the plain xcb functions. And due to wanting to support a setup where mouse events are delivered via core events it was chosen to use mouse via XI2 only when really necessary. Thus starting only from 2.2, the version from which the mouse+touch grabbing becomes the issue (XI2 introduced touch support from 2.2). The same patch states that using QT_XCB_NO_XI2_MOUSE restores to the old behavior (grabbing via core) with broken touch grabbing. Broken only with 2.2+, not 2.0 and 2.1 since those versions of protocol do not know about touch. All of this implies the following: 1) The user code that already depends on QT_XCB_NO_XI2_MOUSE, won't see any behavioural difference if we will use XInput starting from 2.0 for mouse. Mouse grabbing will continue to be done via core (xcb_grab_pointer) as mentioned above and thus touch grabbing will continue to be broken with 2.2+. 2) The code that has never cared how we get the native events (core vs xinput2), won't see any behavioural difference. In this case grabbing will always be done via XI2 (XIGrabDevice) grab when XI2.0+ is available. Since there is no difference in the outcome, we migth as well use XI2 for mouse from 2.0, not 2.2. Extension events are always better choice than core. Besides the broken touch grabbing issue with QT_XCB_NO_XI2_MOUSE, there are other issues with that code path, for details see internal documentation of xi2SelectDeviceEventsCompatibility(), where the conclusion is: *** If your code relies on QT_XCB_NO_XI2_MOUSE, then your code needs fixing. *** This patch also cleans up how we select XInput2 events, by separating the QT_XCB_NO_XI2_MOUSE code path. This has two benefits - improved code readability and will make the deprecation of QT_XCB_NO_XI2_MOUSE easier. The patch removes some sparse comments as the behavior is now documented in one place, see xi2SelectDeviceEventsCompatibility(). [ChangeLog][Platform Specific Changes][Linux] The QT_XCB_NO_XI2_MOUSE environment variable is deprecated and will be removed in Qt 6. If your application relies on behavior set by QT_XCB_NO_XI2_MOUSE, it should be updated accordingly. [ChangeLog][Platform Specific Changes][Linux] Pointer event delivery on X11 is now done starting from XInput version 2.0 (when available) instead of 2.2. XInput support can be disabled by setting QT_XCB_NO_XI2=1 environment variable. Note that using QT_XCB_NO_XI2 would also disable tablet and touch support. Change-Id: I661b36d6710b9f6ec71fecc8287ba479432bff4c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | iOS: Fix accessibility leakTor Arne Vestbø2017-08-092-3/+11
| | | | | | | | | | Change-Id: I359ce521decbbb06376fc48689762f462c8706b0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | xcb: cleanup leftovers in QXcbScreen::updateGeometryGatis Paeglis2017-08-082-7/+6
| | | | | | | | | | | | | | | | | | | | That code was added by ae5f2a66720a4bb22c120bd7d1564652cac00367 and later incompletely removed by c173a5071906867de9da26ee8f49224b23c2ef1d. This patch amends c173a5071906867de9da26ee8f49224b23c2ef1d. Change-Id: Ibfd39aaf9b49424fc54d878dc588454eb841ed97 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>