summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* C++ examples: Delay compositor initialization until GL is readyPaul Olav Tvete2019-01-096-2/+7
| | | | | | | | | | When running with xcb_egl, the platform plugin's native interface is not always ready immediately after the QGuiApplication constructor is done. Calling QWaylandCompositor::create() at the time of initializeGL() makes sure that everything is ready. Change-Id: I9e5e434ff85b92a45caddfd393439a4ffe3bcdc6 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add server buffer integration using Linux dma-bufPaul Olav Tvete2018-09-211-2/+2
| | | | | | Fixes: QTBUG-70494 Change-Id: Iaa4990fe9d39a1f9fb81f5e5f19039aa2e52dcac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Don't use members of wl_resourceJohan Klokkhammer Helsing2018-09-181-1/+1
| | | | | | | | | 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>
* server-side-decoration example: Implement window movePaul Olav Tvete2018-08-211-12/+23
| | | | | Change-Id: I5e876338a37dc3126ce8b7950d2eef58ec09c07d Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor API: Add xdg-decoration unstable v1 supportJohan Klokkhammer Helsing2018-08-176-0/+227
| | | | | | | | And add an example with server-side window decorations. Task-number: QTBUG-69934 Change-Id: Ic3984b50cf7574cae5135dea51eb4b1c80bb45a7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add mouse and keyboard handling to minimal-cpp examplePaul Olav Tvete2018-08-165-18/+168
| | | | | | | ...and do some other minor cleanups. Change-Id: I7fe2c70d8b2de37cee5cc114cc0148d31821e10f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor API: Add xdg-shell stableJohan Klokkhammer Helsing2018-08-156-10/+24
| | | | | | | | | | | | | | | [ChangeLog][Compositor API] Added APIs for xdg-shell stable. Code copied from the V6 implementation with suffixes and prefixes removed. Otherwise a few minor edits, such as renaming xdg_shell to xdg_wm_base, and handling the anchor and gravity edges no longer being bitfields. Examples that used v6 have been updated to use stable instead, or, in some cases, to support both. Task-number: QTBUG-66784 Change-Id: Ia619b478a938fdcd9b47af8a8df2d7fcc4406204 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* qwindow-compositor: rename input to seatJohan Klokkhammer Helsing2018-08-091-6/+6
| | | | | | | This should have been done when we renamed from inputDevice to seat. Change-Id: I4a296322fc79a6dd6d30ee2b1c97c3a818cc568e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* hwlayer-compositor example: Remove xdg-shell unstable v5 supportJohan Klokkhammer Helsing2018-08-071-1/+0
| | | | | Change-Id: Iac4189584286995f2d03d16fe4edfe74367e0645 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Multi-screen example compositor: Upgrade to xdg-shell unstable v6Johan Klokkhammer Helsing2018-08-072-4/+4
| | | | | Change-Id: Ifdee719cd79516a36ba9282abac9c59afacf542f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-2/+5
|\ | | | | | | Change-Id: I7947816edbfef4e07d488d25122cfd9a969436db
| * Make sure we don't use deleted memory in examplePaul Olav Tvete2018-08-041-2/+5
| | | | | | | | | | | | | | | | | | | | The view has a pointer to a QOpenGLTexture that is owned by the buffer. Don't keep using that pointer after the buffer has deleted it. Task-number: QTBUG-69384 Change-Id: I48fd813e0dcb74db04d217238be7b0b6b345fc11 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-281-1/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandxdgsurface.cpp src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h Done-with: Johan Klokkhammer Helsing <johan.helsing@qt.io> Change-Id: Ia39be6254a95af1c4efa831358cc06a697da3423
| * Doc: Add missing dots (qtwayland)Paul Wicking2018-06-191-1/+2
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I02ba2e659d21923934dab970af23856b45ff1570 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Revamp overview-compositor exampleJohan Klokkhammer Helsing2018-05-281-16/+23
| | | | | | | | | | | | | | | | | | | | | | - Switch to xdg-shell v6 - Use autoCreatePopupItems - Follow QML coding conventions - Support for screen dpr != 1 Task-number: QTBUG-60661 Change-Id: Iad9547c0d7529c0fce8e9303c55b5c0b0ee0e27b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add overview-compositor to compositor examples .pro-fileJohan Klokkhammer Helsing2018-05-281-0/+1
| | | | | | | | | | Change-Id: I613888a5d5693586be3221861a70cdad087283ae Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Revamp spanning-screens exampleJohan Klokkhammer Helsing2018-05-281-48/+27
| | | | | | | | | | | | | | | | | | | | | | | | - Switch to xdg-shell v6 - Use autoCreatePopupItems - Follow QML coding conventions - Remove redundant compositor bindings - Support for screen dpr != 1 Task-number: QTBUG-60661 Change-Id: I9447aca2e21732de4361c0cf53a2f09216a75dc8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Revamp pure-qml exampleJohan Klokkhammer Helsing2018-05-184-70/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | - Use a ListModel to manage shellSurfaces - Remove obsolete/deprecated extensions (QtWindowManager, XdgShellV5) - Remove no-ops (onSurfaceRequested created a default surface) - Remove dead code (primarySurfaceArea, output property on Window) - Add comments - Follow coding conventions (formatting, order of object attributes etc.) Task-number: QTBUG-60661 Change-Id: I4ffd2c4b5deff1d801a25efa96300fc5851d3359 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Automatically create ShellSurfaceItems for popupsJohan Klokkhammer Helsing2018-05-183-16/+4
|/ | | | | Change-Id: I5e6b0147c4f1bb73ff3a8f5512d21884f962a89a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove waylandclient-private dependency from custom-extension exampleJohan Klokkhammer Helsing2018-04-255-8/+5
| | | | | | | | We really only depend on gui-private. Change-Id: Ic774cf94d8d94194c26d3852206ecff488948196 Reviewed-by: Drew DeVault <qt@cmpwn.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Make the minimal-cpp example a real compositorPaul Olav Tvete2018-03-214-22/+23
| | | | | | | | | Use the ivi-application protocol, since a compositor without a shell is not really a proper compositor. Use the IVI id to determine the position instead of generating a random position for each frame. Change-Id: I2ede824c656e4c2ef88117cf0f0b8d27ad80b6e2 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-282-3/+3
| | | | | | | | | | 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>
* Use default member initialization for raw pointersJohan Klokkhammer Helsing2018-02-285-7/+7
| | | | | | | | Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-2713-39/+21
| | | | | | | | | | | | | | | | | | | | 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-205-10/+10
| | | | | | | | 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>
* Compositor API: Add support for hardware compositingJohan Klokkhammer Helsing2018-02-096-0/+246
| | | | | | | | | | [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>
* Compositor examples: Remove unused dependencies on private APIsJohan Klokkhammer Helsing2018-01-162-2/+2
| | | | | Change-Id: Iee33e9fe065693a615e1d18d3d03d5a7618e3f75 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Fix outdated FDL license headerLiang Qi2017-12-051-4/+4
| | | | | Change-Id: Ie664c28c21880af15452f091a977a5bedec3d73a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-202-3/+2
|\ | | | | | | Change-Id: If69178e53ede77032d1a1e298e416fd69dd053f4
| * pure-qml example: fix position of XdgShellV6 popupsShawn Rutledge2017-11-201-2/+1
| | | | | | | | | | | | | | Menus open up at the right place this way. Change-Id: Iae18fdcefe33356e9e9ee105b9f5c597bb6c896b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Update to new QRandomGenerator APIThiago Macieira2017-11-031-1/+1
| | | | | | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add overview-compositor exampleJohan Klokkhammer Helsing2017-11-156-0/+252
| | | | | | | | | | Change-Id: Id6243dbe9d1c5f872006264938c735bc2a779517 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Fix broken minimal-qml exampleJohan Klokkhammer Helsing2017-11-061-2/+2
| | | | | | | | | | | | | | | | The example didn't work because XdgShellV6 was added in 1.1 and we imported 1.0. Also, xdgSurface is the shell surface in the toplevelCreated signal. Change-Id: Idf64745e39d50a6b2f8df696ba890890ef14af50 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Merge remote-tracking branch 'qt/5.10' into devPaul Olav Tvete2017-10-2716-42/+291
|\| | | | | | | Change-Id: I4f885a551093ada07da97fd3d99902e36f98595e
| * Merge remote-tracking branch 'qt/5.9' into 5.10v5.10.0-beta3Paul Olav Tvete2017-10-2516-42/+291
| |\ | | | | | | | | | Change-Id: I6c283081669594b3e8c6b30194bb96e389319cb2
| | * Support threaded rendering for Nvidia EGLStreamsPaul Olav Tvete2017-10-252-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create and update the texture on the GUI thread. Make sure there is a valid context on the GUI thread: create one if necessary, and share it with the global share context. Note: this requires that threaded compositors set the Qt::AA_ShareOpenGLContexts application attribute. Task-number: QTBUG-63039 Change-Id: Ia19af0536f9df319cde84221ed53db1c2ef42293 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * Fix outdated FDL license headerKai Koehne2017-10-207-31/+31
| | | | | | | | | | | | | | | Change-Id: Id4ba079514c7844821adac3c0c108af7deb57889 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | * Add non-global object to custom extension examplePaul Olav Tvete2017-10-057-11/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show how to create non-global objects on the client side. Also fix error in the XML file: move the enum outside the event. Change-Id: I85b4cae115a57d60eda4a54d652ea98a8cd39548 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Update minimal-qml exampleJohan Klokkhammer Helsing2017-10-161-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use xdg-shell-v6 instead of v5 and use a ListModel instead of instantiating ShellSurfaceItems explicitly. Change-Id: Ia9e8620ff0beed19fa1401a535311a2d78797368 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-051-1/+6
|\| | | | | | | | | | | Change-Id: I7c3c1fb4535fe13b34a1b056bb16256e7f8057c0
| * | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta1Liang Qi2017-10-041-1/+6
| |\| | | | | | | | | | Change-Id: I83392c13a9cea972fbb570a9510a19f401675283
| | * Make minimal-cpp work with EGLStreamsPaul Olav Tvete2017-09-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redo change 955ac0d0eeaf2f543676b649291558f4dcce37c3 for the minimal compositor example. EGL_KHR_stream_consumer_gltexture only allows connecting to the texture bound to GL_TEXTURE_EXTERNAL_OES, meaning that assumptions about the target always being GL_TEXTURE_2D break horribly. Change-Id: If5b21d740eb80486e4f55bee843a820f0b0edd60 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-271-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp src/client/qwaylandwindow_p.h src/compositor/compositor_api/qwaylandpointer.cpp Change-Id: Icbc22a1ae3cdd9cde438742817d07fccf97f647b
| * | Fix namespaced buildsJohan Klokkhammer Helsing2017-09-181-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: Iac3d7751b9c3a8c94ee87dbc4effcaceaf8a47dc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
|/ / | | | | | | | | | | | | Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-176-0/+163
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia0f9d099e92a40cae7ec506781f70c56415bcf89
| * Add missing documentation for examplesJohan Klokkhammer Helsing2017-08-144-0/+161
| | | | | | | | | | | | | | | | Add documentation for the following examples: minimal-qml, ivi-compositor, multi-screen and spanning-screens. Change-Id: Iacb14af9b1c825f08e2092836cb4821db005628d Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Update .gitignorePaul Olav Tvete2017-07-102-0/+2
| | | | | | | | | | Change-Id: Iddbfa1f631fe13fd901e0b3a00bafe334da51cf1 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Reintroduce the server-buffer examplePaul Olav Tvete2017-08-1617-1/+836
| | | | | | | | | | | | | | | | | | | | The old, non-functional server-buffer example was removed in change 69bbd62a3c93f8142f57ad764db29ecaabbb0ff7. This is a reimplementation of the old example, based on the new server buffer API, and using the current Qt Wayland Compositor API. Change-Id: Idc455eab070fce35c5897dc7be53002c1bb6147a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: Add support for xdg-shell-unstable-v6Johan Klokkhammer Helsing2017-07-211-2/+16
| | | | | | | | | | | | | | | | | | | | This adds QML and C++ support for xdg-shell-unstable v6 on the compositor side. A couple of things are still missing for complete support, but can be added implemented later without breaking the API. Task-number: QTBUG-56174 Change-Id: I08d7c05aa4f40f00377d92f2519d89ab416daaf4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>