summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandquickitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Compositor: Use RHI-compatible APIJohan Klokkhammer Helsing2019-11-151-1/+2
| |/ | | | | | | | | | | | | | | Egl clients now work when the compositor is started with QSG_RHI=1 and QSG_RHI_BACKEND=gl in the environment. Change-Id: I4ebcee174c86dd65470d41b5799c12def6b68f85 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-15/+5
|\| | | | | | | Change-Id: I25e65c392612cc1c379bd408adb60559b1d8a498
| * Update QtWaylandCompositor license headers to GPL 3v5.14.0-beta2Paul Olav Tvete2019-10-161-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | As announced on the mailing list, QtWaylandCompositor licensing is changing to GPLv3: https://lists.qt-project.org/pipermail/development/2019-October/037666.html Change-Id: I4bdc1aa5914e53ac760acc2b6453355af636baa9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Compositor: Remove QWaylandQuickItem::sizeFollowsSurfaceJohan Klokkhammer Helsing2019-10-031-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | As the TODO says, this can be handled by implicit size instead. [ChangeLog][Compositor] WaylandQuickItem.sizeFollowsSurface has been removed since it didn't offer anything not already covered by the implicit size. Fixes: QTBUG-68841 Change-Id: I6c4c9975ac245d107665e01690493a4c57dc2ac8 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Compositor: Remove non-const QWaylandQuickItem::inputRegionContainsJohan Klokkhammer Helsing2019-10-031-10/+0
|/ | | | | Change-Id: I8c338255272523c0d1f1d2f33c77b341fcde1de2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-161-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddatadevice.cpp src/client/qwaylandinputcontext.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/compositor_api.pri src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: Ice0d8c7d869c9c46113d6ee6ba3adf895a71d58f
| * Compositor: Fix various input-related rounding errorsJohan Klokkhammer Helsing2019-09-051-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPointF::toPoint (which is what the QPoint versions of the events use internally) uses qRound, which is not the right kind of rounding to use with the QRegion we use for the input region. This switches to use QPointF variants instead of QPoint wherever possible, and then the correct conversion (with qFloor) is done once in the new QPointF version of QWaylandSurface::inputRegionContains(). The compositor inputRegion test has now been updated to test the new API. [ChangeLog][Compositor] Fixed various rounding errors related to touch and mouse input. Fixes: QTBUG-77457 Change-Id: Ife2365abd56a239c34eee91310ab0e698a50d4ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Remove usages of deprecated APIs of QWheelEventSona Kurazyan2019-08-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated QWheelEvent::delta() and QWheelEvent::orientation() with QWheelEvent::angleDelta(). - Removed the tests for deprecated APIs. Task-number: QTBUG-76491 Change-Id: I2f9a53d3236bce8ba6cee66ec1b0b933d50518aa Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Remove usages of deprecated APIsSona Kurazyan2019-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the code related to deprecated QWaylandWlScaler compile conditionally, only when QWaylandWlScaler is enabled. - Replace the usages of deprecated APIs by the corresponding alternatives. - Fix the tests to compile when the deprecated APIs are disabled. Task-number: QTBUG-76491 Task-number: QTBUG-76541 Change-Id: Ieba98858e970868a2cbc97df2d06bae346e30d7a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-131-1/+1
|\| | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp Change-Id: I20fb102162351b714855258175ed00437e55f072
| * Fix crash when closing windows via XDG sendCloseRobert Griebl2019-08-121-1/+1
| | | | | | | | | | | | | | | | | | This crash only occurs on a few machines running autotests for the application-manager, but it's happening consistently on the affected machines. Change-Id: I4533379580b7c1f62e4f45bf223d73aac3e8d5b7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devJohan Klokkhammer Helsing2019-05-071-1/+0
|\| | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay_p.h src/client/qwaylandwindow.cpp Change-Id: I50eb5c83a8b81e4bdb032b68d41f429b17d0a74d
| * Doc: Fix minor link issuesNico Vertriest2019-04-251-1/+0
| | | | | | | | | | Change-Id: I42bca2a6d5a687217c3dde9bd80394bc95e361f8 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: Don't require OpenGL to build the QML APIsJohan Klokkhammer Helsing2019-04-041-31/+45
|/ | | | | | | | | | | | [ChangeLog][Compositor API] The compositor API now works without OpenGL support. This makes the compositor API work with shared memory clients only. If OpenGL clients connect they will currently punch holes in the compositor window, but fixing that is out of scope for this patch. Fixes: QTBUG-74896 Change-Id: I6c1ba82f28ba9edecf380e471124e15d16f9518e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* docs: Fix qdoc warningsKavindra Palaraja2019-03-271-1/+1
| | | | | | | * Added some missing documentation Change-Id: I214b108c084aeff501bed85845153aa80fa61e6d Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Fix documentation for bufferLocked propertySimon Hausmann2019-03-191-2/+11
| | | | | | | | | | | | | Commit 2824a71e5c28ec1843edc056f2c17c6274378f1d silenced the qdoc warning about the bufferLocked property, but it did not fix the underlying problem that the existing documentation would be shown. This patch reverts the change and fixes it by making the \property command match the name of the property, not the getter. Similarly, the \qmlproperty annotation was missing entirely. Change-Id: I66281ea4df0162b14ebfab15f1cc18162ea0e8ef Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Fix incorrect texture size for client buffers when dpr > 1v5.13.0-beta1Johan Klokkhammer Helsing2019-03-111-1/+2
| | | | | | | | | The old implementation used QQuickItem::width and height, which changes with the devicePixelRatio. We now use the new property, QWaylandSurface::bufferSize, instead, which is the actual pixel size of the buffer. Change-Id: I430f46746ed2b8f0330e0d220718f58004b3bd2e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Add missing version information for new APIJohan Klokkhammer Helsing2019-02-271-0/+18
| | | | | Change-Id: Ieec4a97d901f236d2cec003d8b35e2f95b1b2aea Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-091-2/+2
|\ | | | | | | Change-Id: I1b00775ff2d9ede97dbcd9f9deb9f2a947cf1ae5
| * Doc: Fix wrong link to isBufferLockedNico Vertriest2019-02-071-2/+2
| | | | | | | | | | | | Change-Id: I5024e50af6e403e9373181948b36548bc0862f9b Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: Emit a signal when WaylandQuickItem.compositor changesJohan Klokkhammer Helsing2019-01-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes warnings like: QQmlExpression: Expression qrc:/Chrome.qml:13:5 depends on non-NOTIFYable properties: Chrome_QMLTYPE_28::compositor [ChangeLog][Compositor] Added a missing change signal for WaylandQuickItem.compositor. Change-Id: I9f372c46778d0851a82a8dcbb0751a0e12f825b1 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Compositor: Implement support for the viewporter extensionJohan Klokkhammer Helsing2019-01-021-0/+4
| | | | | | | | | | | | | | [ChangeLog][Compositor] Added support for the viewporter Wayland extension. Change-Id: I1d33652fab6ff18da4ae1ae3497f0ca43517420a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-051-10/+10
|\| | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: I5e01a0731e880e3eb8eab349043756a5993e3050
| * Fix compilation with gcc 4.8Ville Voutilainen2018-12-041-10/+10
| | | | | | | | | | | | | | | | | | | | GCC 4.8 doesn't like QPointers in signal connections. Also, Default Member Initializers for aggregates are C++14, so we need to write a constructor to make a class with DMIs work in C++11. Change-Id: I567c60a8081fa2f268517ec747bd6534674bcce5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Compositor: Fix coordinate system inconsistenciesJohan Klokkhammer Helsing2018-11-161-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several properties were using pixel coordinates and surface coordinates without converting. [ChangeLog][Compositor] QWaylandSurface::destinationSize has been added which returns the size of the surface that will be displayed on the screen in surface coordinates. [ChangeLog][Compositor] Fixed a bug where QWaylandSurface::inputRegionContains would return true for some points outside surfaces with buffer scale > 1. [ChangeLog][Compositor] Fixed a bug which caused ShellSurfaceItems for surfaces with buffer scale > 1 to move too much when resizing interactively. It also gets rid of all calls to QWaylandSurface::size, which confusingly returns the size of the surface's buffer in pixel coordinates. Most properties now use destionationSize's surface coordinates consistently. Hopefully, QWaylandSurface::size can be renamed or removed in Qt 6. Change-Id: I007256a8df7759cf74fbfd51624fa1f90c083336 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-301-1/+11
|\| | | | | | | Change-Id: I1d9281750b06f7584e55759994dc6fcbcc5b2455
| * Compositor: Add const version of QWaylandQuickItem::inputRegionContainsJohan Klokkhammer Helsing2018-10-221-1/+11
| | | | | | | | | | Change-Id: I649149e2cee24f8296bf24a22ee8bb865feea9c6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Don't include system versions of wayland protocolJohan Klokkhammer Helsing2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wayland-client.h and wayland-server.h includes protocol generated for the version of wayland.xml corresponding to the libwayland version. This becomes a problem when we want to support a version of wayland.xml that's newer than the system libwayland. The solution is to include wayland-client-core.h and wayland-client-server.h instead. These headers don't include any wayland-scanner generated code, so we can safely compile and link code generated against the version of wayland.xml that we ship. [ChangeLog] Code generated by qtwaylandscanner now includes wayland-client-core.h and wayland-server-core.h instead of wayland-client.h and wayland-server.h. This might break source compatibility for code using custom wayland extensions. Fixes: QTBUG-70553 Change-Id: Ice0cdb60ecc4f936acc0e158b96f7978549f62c1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add QWaylandQuickItem::mapFromSurfaceJohan Klokkhammer Helsing2018-09-241-0/+16
|/ | | | | | | | | | | [ChangeLog][Compositor] Added QWaylandQuickItem::mapFromSurface which converts points in Wayland surface coordinates to points in QQuickItem coordinates. i.e. the inverse of the existing QWaylandQuickItem::mapToSurface. Task-number: QTBUG-70662 Change-Id: I11123c2c5394d7d9b7b8fdfcfd325592597a6b50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-061-1/+1
|\ | | | | | | Change-Id: I06b86b413984c07f6be98120450bc859dab271c1
| * Compositor: Fix OpenGL textures deleted prematurelyJohan Klokkhammer Helsing2018-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where destroying a WaylandQuickItem would delete the OpenGL texture for all other WaylandQuickItems using that surface. The texture QWaylandBufferRef::toOpenGLTexture returns is owned by the buffer (documented public API), so setting QQuickWindow::TextureOwnsGLTexture in QWaylandTextureProvider is wrong. Task-number: QTBUG-70163 Change-Id: I831f2aa81ed20c08d4d87bccac33650ab86d19c8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Update WaylandQuickItem size on new dpr or scaleFactorJohan Klokkhammer Helsing2018-08-301-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | updateSize() depends on both screen devicePixelRatio and output scaleFactor. Make sure to call it when they change. This still doesn't handle all cases, because there is no signal for when a screen device pixel ratio changes, but we update when we get a new screen, which should be good enough in most cases Change-Id: I4550cf580d4821e4b0f4da0d2eb7bb8d9ab823cf Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Subsurface placeAbove/Below implementationPaul Olav Tvete2018-08-171-0/+118
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Added support for wl_subsurface.place_above and place_below in WaylandQuickItem. Task-number: QTBUG-49809 Change-Id: Ie30c342f329c26feaa954f8909b61b139e5588dc Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-141-0/+5
|\| | | | | | | Change-Id: Ia9584a185a3d7a68a4333890ade535585ba33fee
| * Handle subsurfaces added before QWaylandQuickItem createdPaul Olav Tvete2018-08-071-0/+5
| | | | | | | | | | | | | | | | This makes gstreamer and Firefox work with QML-based compositors. Task-number: QTBUG-69643 Change-Id: Iaddaeb7dc3493a262993eecc5ea0b6ce076b4044 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-131-2/+6
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6596d1a127cc93e53ec30cd881da1810cb8076d5
| * Add support for building QtWayland on macOSRobert Griebl2018-06-091-2/+6
| | | | | | | | | | Change-Id: I98aadd5019e913bf0adcf0122b7b209981926278 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-121-2/+2
|\| | | | | | | Change-Id: I26643c160e3f974f7b570e04c33733ee67a13522
| * Compositor: Fix mapToSurface for surfaces with bufferScale != 1Johan Klokkhammer Helsing2018-04-211-2/+2
| | | | | | | | | | | | | | | | | | Since QWaylandSurface::size (public API) returns the buffer size in pixels and not the size in surface local coordinates, we need to also account for the surface buffer_scale in order to get surface local coordinates. Change-Id: I79a396c55b674b1ac42ca17e1e88e50c1506ce83 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor QML API: Add QWaylandQuickItem::sendMouseMoveEventJohan Klokkhammer Helsing2018-04-181-0/+13
|/ | | | | | | | | | | QWaylandSeat::sendMouseMoveEvent can't be exposed to QML, because it requires a QWaylandView, which is not available from QML. [ChangeLog][Compositor] QWaylandQuickItem::sendMouseMoveEvent was added to allow sending generated mouse move events from QML. Change-Id: I5793444a3367863980d2feca78ea56de5da231ad Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Ensure a QWaylandQuickItem has keyboard focus before sending key eventsJohan Klokkhammer Helsing2018-03-211-1/+4
| | | | | | | | | If a QWaylandQuickItem had gotten focus in other ways than through QWaylandQuickItem::takeFocus, then the keyboard focus would not be updated. Change-Id: I6b5ee6d33449f0048e1c44765c1723eaa82ffd69 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-1/+1
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-8/+4
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-201-4/+4
| | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-2/+2
|\ | | | | | | Change-Id: I851b9b1bdfaa8be403d69f43b82a3f745038cc1c
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-021-2/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/extensions/extensions.pri Change-Id: Ia9a5bd52b7cac9a4f66e7c5deb43d89f0c792325
| | * Fix incorrect documentation of QWaylandQuickItem::paintEnabledJohan Klokkhammer Helsing2018-01-221-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: Id24b417687843709d9f7df499c4e8c8428f658b6 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Compositor API: Add support for hardware compositingJohan Klokkhammer Helsing2018-02-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Add a tech preview for a plugin-based hardware layer API and a VSP2 implementation (for Renesas R-Car M3 and H3). Task-number: QTBUG-64600 Task-number: QTBUG-64604 Change-Id: Ia4abfb6343cf4f006ba408d293ec9464cd6f31b7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'qt/5.10' into devPaul Olav Tvete2018-01-311-13/+31
|\| | | | | | | | | | | Change-Id: I603cbb164e6015c1bb7796bd8bb055d84dbc3b04
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-071-13/+31
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: Id2f49e8703a67daedcee66db83f006df828d9da0