summaryrefslogtreecommitdiffstats
path: root/src/compositor
Commit message (Collapse)AuthorAgeFilesLines
* Compositor xdg-shell: Warn when clients supply invalid anchor rectsJohan Klokkhammer Helsing2019-01-182-10/+28
| | | | | | | | | | | From the protocol: "When the xdg_positioner object is used to position a child surface, the rectangle may not extend outside the window geometry of the child's parent surface." Adds a warning for both v6 and stable when clients do this. Change-Id: I575a89785f45c080d488be748ec099569b38ea9b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Client: Initialize m_retainedReadIndexJohan Klokkhammer Helsing2019-01-181-1/+1
| | | | | | Change-Id: I9ae028cda8f8a874eb8379f16a9ef7facf0ed85d Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Clean up .gitignorePier Luigi Fiorini2019-01-171-0/+3
| | | | | | | | | Ignore more files resulting from the build process. Glob all scanner generated files, and add exceptions for pregenerated files. Change-Id: Ica60951356bdc145ebd66f5e6fc6bf4e23f2aa72 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Emit a signal when WaylandQuickItem.compositor changesJohan Klokkhammer Helsing2019-01-172-1/+6
| | | | | | | | | | | | | 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>
* Member init for some variables that are not covered by constructorsJohan Klokkhammer Helsing2019-01-164-8/+8
| | | | | | | Where it makes sense, default init variables to sensible values Change-Id: Ie2aa6ab79a6a3c8322bb0ff804f340f7ffd1c1d1 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Compositor: Implement support for the viewporter extensionJohan Klokkhammer Helsing2019-01-029-2/+458
| | | | | | | [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-227-21/+34
|\ | | | | | | | | | | | | | | Conflicts: README src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri Change-Id: I7cbbf39916821f0f1749e3ccab3151f68f4aa1ac
| * Compositor: Fix crash in QWaylandSurface::waylandClientJohan Klokkhammer Helsing2018-12-222-1/+14
| | | | | | | | | | | | | | | | Adds a test for customSurface which crashed without the fix. Fixes: QTBUG-72688 Change-Id: I30c50e474379c61b90b2dd294eae9a7c88c105a2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * Fix invalid QWaylandOutputMode comparison operatorJędrzej Nowacki2018-12-061-2/+2
| | | | | | | | | | | | Fixes: QTBUG-72288 Change-Id: I61fde92ea4275febbb4ec8c067280a4ca570d7c1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * use new feature name xkbcommon_evdev -> xkbcommonGatis Paeglis2018-12-054-18/+18
| | | | | | | | | | | | | | | | | | The xkbcommon configure logic was refactored in qtbase/c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a. For more details see the relevant commit. Change-Id: Ic1aa26846ab8266c589f6e92dc8b81aba36df58a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: Implement linux-dmabuf-unstable-v1Andreas Cord-Landwehr2018-12-132-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Added support for linux-dmabuf-unstable-v1. Implement client side DMABUF buffer sharing support by supporting the linux-dmabuf-unstable-v1 (version 3) protocol. For enabling DMABUF, set the following environment variables for the compositor: QT_QPA_PLATFORM=eglfs QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=linux-dmabuf-unstable-v1 The current implementation supports the following DRM buffer formats: - RGB and RGBA - YUYV This implementation requires Mesa with the following patch applied. Otherwise, textures are not updated. The patch is contained in Mesa 18.1.5. See https://patchwork.freedesktop.org/patch/238080/ Fixes: QTBUG-66288 Fixes: QTBUG-67845 Change-Id: Id4d90337dbe0be956b0f964426ebed3f281c6c30 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-054-11/+25
|\| | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: I5e01a0731e880e3eb8eab349043756a5993e3050
| * Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-051-1/+3
| |\ | | | | | | | | | Change-Id: Ica38060e6d624a7534660eabec604f6795970c95
| | * Don't crash if view is deleted from surfaceDestroyed signalv5.12.0-rc2v5.12.0-rc1v5.12.0Paul Olav Tvete2018-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced in 297bcd005c4205f69e1bf9e9dc565ab757cf0bac Fixes: QTBUG-71643 Change-Id: I769518a9ca13fcd13ea277c7fa8ac1885ca123ba Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | Fix compilation with gcc 4.8Ville Voutilainen2018-12-043-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-041-0/+1
|\| | | | | | | | | | | Change-Id: I29192963efa6753a4cf222a3aec92ab400deb2f0
| * | Fix build due to missing QDebug includeSergio Martins2018-11-301-0/+1
| |/ | | | | | | | | | | | | Build was failing on Archlinux Change-Id: I3cf9a367a099cd365a2de6579c7ef5585cd9be56 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Add convenience for converting wl_resource * to wrapper typesJohan Klokkhammer Helsing2018-11-2113-42/+119
| | | | | | | | | | Change-Id: Ieb2f9706ac707ff878165d3f9001e4a28b8ff1ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add QWaylandSurface::bufferSize and deprecate sizeJohan Klokkhammer Helsing2018-11-162-11/+47
| | | | | | | | | | | | | | | | | | | | | | | | Size is confusingly returning the surface size in buffer coordinates and not surface coordinates. Create a new property bufferSize and deprecated size in order to make it less ambiguous. [ChangeLog][Compositor] QWaylandSurface::size has been deprecated. Use bufferSize or destinationSize instead. Change-Id: I7985e4cc1b8d627f922680c1800d2687d710d7b3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix coordinate system inconsistenciesJohan Klokkhammer Helsing2018-11-1612-54/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-302-1/+12
|\| | | | | | | Change-Id: I1d9281750b06f7584e55759994dc6fcbcc5b2455
| * Compositor: Add const version of QWaylandQuickItem::inputRegionContainsJohan Klokkhammer Helsing2018-10-222-1/+12
| | | | | | | | | | Change-Id: I649149e2cee24f8296bf24a22ee8bb865feea9c6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-202-50/+40
|\| | | | | | | Change-Id: I36baa27b69b755f81de9cda94113d338f06c34a1
| * Compositor: Emit signals after applying pending surface statev5.12.0-beta3Johan Klokkhammer Helsing2018-10-182-50/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where some signals on QWaylandSurface were emitted before all double buffered state had been applied. Restructures QWaylandSurface::commit so no signals are emitted until all state mutations are completed. Adds a test to confirm that pending state is applied at once. Also fixes opaqueRegion, which is documented to be double buffered as well, but the old implementation set it immediately. Change-Id: I1c4dfea7c83dd9ee84dc8c03e6d92e2924bf2fad Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-091-0/+4
|\| | | | | | | Change-Id: Ib4c65db63c2f3119fc7c157d4353c4e0ecebefb0
| * Don't send ivi_surface configure events with negative sizeJohan Klokkhammer Helsing2018-10-041-0/+4
| | | | | | | | | | | | | | Similarly to how we don't do it for xdg_shell or wl_shell. Change-Id: I61cd453858c9fdff148364f4dfb85c345943725c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Don't include system versions of wayland protocolJohan Klokkhammer Helsing2018-10-0310-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-021-1/+1
|\| | | | | | | Change-Id: I4bd7389958fcee8b16d131625280c7d125894212
| * Compositor: Fix crash after surface destructionJohan Klokkhammer Helsing2018-10-011-1/+1
| | | | | | | | | | | | | | | | Fixes a crash due to dangling pointer dereference in QWaylandQuickItem::inputMethodQuery. Change-Id: Id379779f23221e7de17423f75c3d78d7e794b7b9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-2510-14/+30
|\| | | | | | | Change-Id: I66c91dfde14a7c252a02777cfcf0396b1d05e854
| * Add server buffer integration using Linux dma-bufPaul Olav Tvete2018-09-211-0/+11
| | | | | | | | | | | | Fixes: QTBUG-70494 Change-Id: Iaa4990fe9d39a1f9fb81f5e5f19039aa2e52dcac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Add virtual QtWayland::ServerBuffer::bufferInUse()Paul Olav Tvete2018-09-211-0/+1
| | | | | | | | | | | | | | | | This allows the compositor to reclaim unused graphics memory when a buffer is no longer used by clients. Change-Id: Ia0269608019c5120da8c091c81e165411b563554 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Add logging category for hardware integrationsPaul Olav Tvete2018-09-202-0/+2
| | | | | | | | | | | | | | qLcWaylandCompositorHardwareIntegration, "qt.waylandcompositor.hardwareintegration" Change-Id: I977ccc53f51b24b58acee08c424b806868550eac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Change compositor categorized logging namespacePaul Olav Tvete2018-09-203-6/+8
| | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Add new categorized logging namespace "qt.waylandcompositor" and rename "qt.compositor.input.methods" to "qt.waylandcompositor.inputmethods" Change-Id: Id861e527e3eb8582fdc96f8497fad0cba0766847 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Don't use members of wl_resourceJohan Klokkhammer Helsing2018-09-185-8/+8
| | | | | | | | | | | | | | | | | | When we switch to only including core wayland headers, wl_resource will be an opaque type. Use the getters and setter functions instead. Task-number: QTBUG-70553 Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix popup positions on screens when DPR != 1Johan Klokkhammer Helsing2018-09-244-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where xdg-shell popups were misplaced when devicePixelRatio was not 1. The fix is to use the more robust QWaylandQuickItem::mapFromSurface instead. Also made wl-shell use mapFromSurface, although it already accounted for devicePixelRatio. Fixes: QTBUG-70662 Change-Id: I8be3ea76d6bcfd6d6974d532d160c20e44499382 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add QWaylandQuickItem::mapFromSurfaceJohan Klokkhammer Helsing2018-09-242-0/+17
|/ | | | | | | | | | | [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>
* Compositor: Rename addSocketFd to addSocketDescriptorJohan Klokkhammer Helsing2018-09-172-4/+4
| | | | | | | | Generally we prefer not to use abbreviated names. It now also matches what's in other Qt modules. Change-Id: I67d54961bebf93760780be54761c6122069f1e1d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove ifdefs for unsupported libwayland versionsJohan Klokkhammer Helsing2018-09-172-18/+0
| | | | | | | The ifdefs were for version 1.2.0. Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Use Q_PRIVATE_SLOTs in QWaylandOutputJohan Klokkhammer Helsing2018-09-173-37/+34
| | | | | Change-Id: I25a8feb0919dcccc30d2f23d619e0ba5d4c214ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Compositor: Rename QWaylandKeyboard::toScanCode to keyToScanCodeJohan Klokkhammer Helsing2018-09-173-4/+4
| | | | | | | Since the key argument is an int, the signature looks ambiguous otherwise. Change-Id: I732971437ff7354ad3863ecfe42c779a06a84d69 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove confusing elses after returnsJohan Klokkhammer Helsing2018-09-142-8/+4
| | | | | Change-Id: I0ba39df637f6e5ce93ba57f40f279c81532e9289 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add missing Q_UNUSEDJohan Klokkhammer Helsing2018-09-141-0/+1
| | | | | Change-Id: I41ff947ed5fd18d19058583ed3da51225d353af9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.11' into 5.12Paul Olav Tvete2018-09-122-24/+35
|\ | | | | | | Change-Id: I703c03c4c92889f82a1c8d16eb906bad9fa10461
| * Don't destroy buffer before surfaceDestroyed signalPaul Olav Tvete2018-09-112-24/+35
| | | | | | | | | | | | | | | | Give the application time to set buffer lock first. Change-Id: Id8a7ee8956bc587344b8eece7072edff5197414c Task-number: QTBUG-69384 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Create feature wayland-shm-emulation-server-bufferJohan Klokkhammer Helsing2018-09-101-0/+5
| | | | | | | | | | | | | | | | | | And make OpenGL a requirement, in order to make builds without OpenGL work again. Fixes: QTBUG-69779 Change-Id: Iff1153b0aaca8e115f47c59c2ceb028e638e3fe9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Prefix and suffix server buffer integrationsJohan Klokkhammer Helsing2018-09-101-2/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Features for server buffer integrations have been renamed. "drm-egl-server" is now "wayland-drm-egl-server-buffer" and "libhybris-egl-server" is "wayland-libhybris-egl-server-buffer". Change-Id: I06a9d1b1c9219c88045fe966be134ff072cd756e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add XdgToplevel::xdgSurfaceJohan Klokkhammer Helsing2018-09-072-0/+19
| | | | | | | | | | | | | | Similar to the property we already have for popups, XdgPopup::xdgSurface. Change-Id: I1a0b77b28a35597139fcf381a4b345ccaa93d626 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-063-3/+6
|\| | | | | | | Change-Id: I06b86b413984c07f6be98120450bc859dab271c1
| * Compositor: Don't send illegal leave eventsJohan Klokkhammer Helsing2018-09-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a client doesn't bind to an output, don't try to send leave events for it. ...similarly to how we don't send enter events for it. weston-simple-egl is one such client. [ChangeLog][Compositor] Fixed a bug that caused some clients to abort in libwayland when a surface left an output. Change-Id: Ia7f4c21a7d766092dfb8a20c56fa1128a3046f97 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>