summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
| | * 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>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-06-301-3/+2
| | | | | | | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | multi-screen example: add control-alt-backspace Shortcut to quitShawn Rutledge2017-06-191-1/+5
|/ | | | | | | | | | | | Same as 8cdd72afc11d96ec41f65577b38ffea63bc7294c on the pure-qml example. On the eglfs platform, there is no obvious way to exit back to a console, so it's too easy to get stuck in this example and need to reboot via ssh or some such. Ctrl-Alt-Backspace is the historical way of exiting from an X11 or Weston session, so we use it here. Change-Id: Ife3318675f1b5dbe640feb8f3f99e80efbd5dcfd Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-0440-95/+495
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Include minimal-cpp example in buildPaul Olav Tvete2017-04-271-1/+1
| | | | | | | | Fix accidental qmake syntax error made when porting to new build system. Change-Id: Icc30712c6992bd953f36f393697614b22f5ab48a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Remove non-functional examplePaul Olav Tvete2017-04-2717-1229/+1
| | | | | | | | | | The server-buffer example does not work, and probably has not worked for a long time. This example was written for an early version of Wayland, and the APIs have changed since then. Change-Id: If647c7085aaaae87c06010bd28896fa8bfc4bdcc Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* multi-screen example: use Screen.virtualX/Y rather than screenShawn Rutledge2017-03-281-2/+2
| | | | | | | | | The windows did not get positioned on the correct screens without making this change. It seems to be a consequence of qtdeclarative change f145f33d529c2b59ace7a3cdfd5463e68787f40b Change-Id: I756a9992f80ef17cdbeaf4645298b5b0651947db Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Update examples to account for Window.targetScreen renamev5.9.0-alpha1Tor Arne Vestbø2017-02-113-6/+6
| | | | | Change-Id: I97af04c43a5966472eb195779ffd730b7459aa37 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-2511-43/+134
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/custom-extension/client-common/main.cpp src/client/qwaylandwlshellintegration_p.h src/client/qwaylandxdgshellintegration_p.h src/compositor/compositor_api/qwaylandquickoutput.h src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
| * Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-2310-25/+25
| | | | | | | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Add animations to the C++ examplePaul Olav Tvete2017-01-023-19/+110
| | | | | | | | | | | | | | Show how to use setBufferLocked() from C++. Change-Id: I43be7dcf8f44fd80dd0d4977e38a0d8ff3339432 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Remove unused files from examplePaul Olav Tvete2017-01-023-103/+0
| | | | | | | | | | Change-Id: I8ce9c4b284da2d3e7f88e8449be22f9a25b5a2e0 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-121-1/+2
|\| | | | | | | Change-Id: Idd91b55bc2b1e3506d9385b3352aeda06de6d4bc
| * Make qwindow-compositor look different than pure-qmlPaul Olav Tvete2016-11-291-1/+2
| | | | | | | | | | Change-Id: I8aac99dd98be943909f5a6dc254a4f79e83e61d9 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Try to find compositor among parents for QWaylandQuickOutputJohan Klokkhammer Helsing2016-12-062-4/+0
| | | | | | | | | | | | | | And simplify the minimal-qml and ivi-compositor examples Change-Id: Ic445349c9d7845813b6700414464a688aac40e73 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | multi-screen example: create an output for each screenShawn Rutledge2016-11-232-33/+36
| | | | | | | | | | | | | | Use Instantiator to create an output for each screen that exists. Change-Id: Ice74632c36a9e0d55bd9e8b6d04022f5c10de6f0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'qt/5.8' into devPaul Olav Tvete2016-11-2310-60/+19
|\| | | | | | | Change-Id: I8a9455105e8e3519f6a860f58820382d7e337b1e
| * Move qtwayland over to use the new configuration systemLars Knoll2016-11-237-55/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Re-use configuration results from qtbase where possible and move all pkg-config handling over to be done at configuration time. Since waylandclient and waylandcompositor are two independent libs, this required some duplication of features and libraries used by both in the configure.json files. Change-Id: I1f3ec56c85cb780324cc7634a3ad7951125853a0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Make sure we send leave events in the c++ examplePaul Olav Tvete2016-11-221-4/+3
| | | | | | | | | | | | | | | | The code was there, but an unfortunate null pointer check made us skip sending leave events. Change-Id: I3095949ac41330fc10e2a97c025d94d47bc6ea4e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Fix crash with nested xdg popupsPaul Olav Tvete2016-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | Popups that are children of popups would get a null parent in pure-qml. This would cause a crash in XdgPopupV5Integration. This change fixes pure-qml to set the parent correctly, and also adds null pointer checks to XdgPopupV5Integration. Change-Id: Ica5bd6c1a0853fbec1b30bc6ffff806b2cfd15f8 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Fade-out animation for menusPaul Olav Tvete2016-11-151-0/+3
| | | | | | | | | | | | | | | | Since child items don't get transformation animations, enable an opacity transformation for them. Change-Id: I4ab77bc10d61602a0df72f5927cde4ebbcad27ce Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-037-0/+367
|\| | | | | | | Change-Id: Ic2135c6ff27ca3fdef6a76dbdc72f73f5ca4d7fb
| * Add a multi-screen compositor exampleJohan Klokkhammer Helsing2016-10-107-0/+367
| | | | | | | | | | | | | | | | | | This example shows how shell surfaces can move across outputs in order to create traditional multi-monitor desktop functionality. Change-Id: Ie7c0aa1dc47c0c1a944dffcce5237dee92785396 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | spanning-screen: show how a real multi-display system would do itLaszlo Agocs2016-10-111-1/+11
|/ | | | | Change-Id: I04cd0a4699fae119a563f2db0b70701a617e21dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Example compositor for the ivi application extensionJohan Klokkhammer Helsing2016-10-045-0/+172
| | | | | | | | A compositor with two areas, clients are maximized on one of those areas depending on their ivi surface id. Change-Id: I2dbb20b47e38680e14465d3a4a8147d64817de63 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add mode support to QWaylandOutputPier Luigi Fiorini2016-10-039-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Outputs usually have more than one mode, add an API to support them. When sizeFollowsWindow is true, modes are replaced by one with the window size and refresh rate. In that circumstance the mode changes when the window is resized. The sizeFollowsWindow property default value is no longer true. The setGeometry() method is gone as it doesn't make sense now, the setWidth() and setHeight() methods are now private slots to resize the resolution as the window resizes (and sizeFollowsWindow is true). Refresh rate is expressed in mHz rather than Hz just like the Wayland protocol. A compositor implementation may choose to add modes if it has access to hardware information, it will call addMode() for each mode and then invoke the setCurrentMode() method that sends the modes list to the client. The preferred mode is indicated with a boolean parameter to the addMode() method. Change-Id: Iffed4784ccef695c276ebd800172957f4cff3324 Task-number: QTBUG-49814 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Refactor buffer handlingPaul Olav Tvete2016-10-016-44/+22
| | | | | | | | | | | | | | | | | | | | | | | | | We cannot support bindToTexture() functions. On some platforms the texture is provided by the driver. Therefore, the HW integration must always provide a texture. This has the added bonus of unifying the two separate code paths that were introduced when EGLStream support was added. Add a separate buffer manager that owns all buffers. Don't destroy buffer objects on release. The client will probably attach them again later. Also, release shm buffers immediately after uploading to texture (needs to be documented that image() will not work afterwards). Make the old SurfaceBuffer class into an abstract base class, so we can store state in the buffer class instead of having to map from the wl_resource in each buffer integration. Move the shared memory buffer handling into a separate subclass. Change-Id: I81e471d13c92913d31ea1efe487f93fa908b5e0c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Make the custom extension example more interestingPaul Olav Tvete2016-09-3011-95/+470
| | | | | | | Define a protocol that does something visible. Change-Id: I29133eeffbb2c98a61ee59b241dcf6a6a0f543cb Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Follow surface isMapped property renamePier Luigi Fiorini2016-09-301-2/+2
| | | | | | | | With b7075b72200b7b087e2c34fa449737970981ccea the QWaylandSurface::isMapped property was renamed to hasContent but this example wasn't updated. Change-Id: I9b13fa3a17ffcc3d6d8be19b59552f61b25bb64b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Base shell classPier Luigi Fiorini2016-09-302-3/+4
| | | | | | | | | | | | Standard shell class with focus policy shared by all protocol implementations. The automatic focus policy gives focus to windows automatically as they are created, while the manual policy allows a compositor to decide what to do. Change-Id: Ica71271174b30e28217e31c53f1c8dd576752c5e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Add a spanning screens exampleJohan Klokkhammer Helsing2016-09-275-0/+201
| | | | | | | | | This example shows how one application can be displayed full screen spanning two screens. The intended use case is for running applications with lots of scrolling content, such as a web browser. Change-Id: Icba2715aa7ccd79c9d44c7e1d621bfdd9e51e66c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor API: Add closeAllPopups method to QWaylandWlShellJohan Klokkhammer Helsing2016-09-202-18/+12
| | | | | | | | | | The WlShell implementation now matches xdg shell. Also adds a convenience method to QWaylandWlShell to get all popups. QWaylandWlShellIntegration and qwindow-compositor uses this new API. Change-Id: Ibfe3323ad7f56d43379785582b9be6801905a485 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Simplify custom-extension examplePaul Olav Tvete2016-09-0816-70/+50
| | | | | | | | | | | | | Don't confuse people by creating the extension inside a platform plugin. It's only necessary when modifying Qt's default behaviour, and we're not going to teach that in this example. Also remove the load/unload extension logic from the qml example. Don't make people believe that they have to use a loader. Change-Id: Id263bb7d77fba176bfb8b6843a6ece9a0a203754 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Rename the QWaylandXdg* classes to QWaylandXdg*V5Giulio Camuffo2016-09-055-30/+30
| | | | | | | | This frees the QWaylandXdg name for the hopefully coming stable version of xdg-shell. Change-Id: I9beb9b035c6497fb45bee5c9104485b564ca0619 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-281-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandseat.cpp src/compositor/compositor_api/qwaylandview.cpp tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/testinputdevice.cpp tests/auto/compositor/compositor/testinputdevice.h tests/auto/compositor/testinputdevice.cpp tests/auto/compositor/testinputdevice.h tests/auto/compositor/testseat.cpp tests/auto/compositor/testseat.h Change-Id: I98e045908dd964e5d4120bd35e71b8839c0d923a
| * qwindow-compositor: remove drag icon before droppingJohan Klokkhammer Helsing2016-08-111-1/+3
| | | | | | | | | | Change-Id: Ief93b5e79d3a51e4d20387357ad2abe15bf1a695 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>