path: root/wayland
Commit message (Collapse)AuthorAgeFilesLines
* Change more function syntax for ConnectionSamuli Piippo2020-03-041-1/+1
| | | | | | | Implicitly defined onFoo properties in Connections are deprecated. Change-Id: I810de65fc69b2704904b9261663ae66afe8429fc Reviewed-by: Kari Oikarinen <>
* democompositor: Use == to compare the appEntry and not ===Holger Hans Peter Freyther2017-12-041-2/+2
| | | | | | | | The empty/invalid QVariant is not an identity for nil. Use the equality operator instead. Change-Id: Idec99cdc7cefb0fef1c2e3edb2ff3183b272c281 Reviewed-by: Paul Olav Tvete <>
* democompositor: Introduce a graceful stop of a client applicationHolger Hans Peter Freyther2017-11-293-1/+23
| | | | | | | | | | Use SIGTERM to terminate the application but to make sure it will go away create a unique timer and start it. The timer is owned by the QProcess and will go away once the process has terminated. On timeout use SIGKILL to make sure the process is going away. Change-Id: I9f9617a579952697aa61bd7bfa1d2fd264a443ce Reviewed-by: Paul Olav Tvete <>
* democompositor: Allow to stop running processes by AppEntryHolger Hans Peter Freyther2017-11-293-1/+13
| | | | | | | | | Kill all processes that were started with the same AppEntry. It is using SIGKILL to make sure that the process is going away and going away quickly. Change-Id: I4d2bf2cf7fb35c34636640562c04e4bd528bed63 Reviewed-by: Paul Olav Tvete <>
* democompositor: Export the sourceFileName as wellHolger Hans Peter Freyther2017-11-291-0/+1
| | | | | | | | This will allow to easily compare two different AppEntry. The easiest way is to check if they come from the same file. Change-Id: I2642b1037eeb3abd77f4b2d677753ccd01256075 Reviewed-by: Paul Olav Tvete <>
* democompositor: Store the AppEntry in the ChromeHolger Hans Peter Freyther2017-11-093-2/+8
| | | | | | | | | Keep the AppEntry in the Chrome and set it when a new surface is created. Handle the situation when an external application is launched and check for null. Change-Id: Ib327ec266587bba9a2c48eacbcb79c508b2066d0 Reviewed-by: Paul Olav Tvete <>
* processlauncher: Fix crashing on destruction with running appsHolger Hans Peter Freyther2017-11-092-4/+15
| | | | | | | | | | | | | | | | The democompositor would crash because the QProcess will be deleted from within ~QObject and then emit a signal which will access the partially destructed WaylandProcessLauncher. Iterate through the list and disconnect the slots and then delete the QProcess before the ~QObject is ran. An alternative would be to iterate the m_appStates and just block the signals of the QProcess. This might be more future proof (e.g. another signal being connected) but can impact other signal/slot connections as well. Change-Id: Id6c19dbe0c3070a131b28365584f06fb7c6014b3 Reviewed-by: Paul Olav Tvete <>
* democompositor: Add a mandatory "Id" to the app specificationHolger Hans Peter Freyther2017-11-0911-6/+31
| | | | | | | | Add a manodatory appId, expose it to QML, add a simple find by id method and update the testcases. Change-Id: I4f80a97e5f31e972694dd61eff0166f9de2f5d51 Reviewed-by: Paul Olav Tvete <>
* democompositor: Allow arbitrary extensions inside the app mapHolger Hans Peter Freyther2017-10-246-3/+31
| | | | | | | | | Allow extensions and let them begin with X-. Briefly document it, add some extensions as an example and briefly test that the right values are parsed. Change-Id: I7a9ae6b2f365802fcce6dce56fa7795f76d83421 Reviewed-by: Paul Olav Tvete <>
* democompositor: Move images and apps to resources/ folderHolger Hans Peter Freyther2017-10-2422-14/+14
| | | | | | | | | The apps were hard to be discovered inside apps/files and other projects here seem to use a resources/ folder. Move the apps and the images in it. Change-Id: If2e9127ea6e941e1a97465b2de5e9f9af3660ea3 Reviewed-by: Paul Olav Tvete <>
* democompositor: Remove deleted files from the modelHolger Hans Peter Freyther2017-10-243-6/+64
| | | | | | | | | | | | | | | In the previous code review Paul discovered the fact that files would never be removed. Implement finding deleted files and emit a signal per removed file. Consume the signal in QML and use the new API to kill the process (one could close the wayland display connection as well). Emit the removed signals _after_ the model has been updated to provide the QML code with an updated model during the signal handling. Change-Id: Ib3bb1bd953bfbf09d25c5e5822756a53b08fd797 Reviewed-by: Paul Olav Tvete <>
* democompositor: Make font name, font size and scene configurableHolger Hans Peter Freyther2017-09-121-2/+29
| | | | | | | | Make it easy to launch another scene. Use the QCommandLineParser to parse the font name, font size and the qml scene. Change-Id: Ib2489f81bc6119ff92da01b6f36035d5266bfacf Reviewed-by: Paul Olav Tvete <>
* democompositor: Forward client application outputHolger Hans Peter Freyther2017-09-121-0/+1
| | | | | | | | | | | | In the long run we could do line based reading and associate the line with the AppState/AppEntry but for now it is better to see some log messages at all (I was debugging an issue that with QT_WAYLAND_DISABLE_WINDOWDECORATION set the surface would remain black). Log output didn't help in the end but it was a start and the issue is still open. Change-Id: Icd4e041a4004c6a76e685906d63704c2cbf51f63 Reviewed-by: Paul Olav Tvete <>
* democompositor: Provide an example to detect unknown appsHolger Hans Peter Freyther2017-09-124-0/+23
| | | | | | | | | | | | | | When a new wlShellSurface is created we can check the identity of the client and if it is belongs to an application launched by the democompositor. In the future such apps might be killed and their surface not displayed. Introduce appStateForPid to find the AppState and return it as a QVariant to easily use it in QML. Use int as type as one can not easily use Q_PID in QML. Change-Id: Ibb9ac004a8016bd76f61679f5c837c99783fa7e8 Reviewed-by: Paul Olav Tvete <>
* democompositor: Keep track of running apps and enforce singletonHolger Hans Peter Freyther2017-09-123-11/+76
| | | | | | | | | | Modify the ProcessLauncher to keep track of running apps in the m_appStates vector. Answer if an AppEntry has a AppState associated and use it to not launch a second instance of the application. In the future this could be an attribute of the .apps file. Change-Id: I19ed2840e0a64eb7f35fba0cb171e1c7fd722b06 Reviewed-by: Paul Olav Tvete <>
* democompositor: Log process related eventsHolger Hans Peter Freyther2017-09-121-2/+15
| | | | | | | | Use some lambda/closures to keep the process (which would be the sender()) and the appentry around. Change-Id: I2993d31e421a5e03c3b48abd8c1fe4026c4b2899 Reviewed-by: Paul Olav Tvete <>
* democompositor: Give up on having AppEntry with only const membersHolger Hans Peter Freyther2017-09-123-26/+18
| | | | | | | | | | | | When building gadgets that include instances of AppEntry that will expose these member variables a Q_PROPERTY we will end trying to do a std::move (even if the AppEntry is not movable). Remove the const from the member variables, leave the CONSTANT in the property to not generate a write function and let's keep the discipline to not assign to an existing AppEntry. Change-Id: I742a9d091e7e6eac6cc3cb84a48b7b8812a24247 Reviewed-by: Paul Olav Tvete <>
* democompositor: Move to start by AppEntryHolger Hans Peter Freyther2017-09-124-8/+22
| | | | | | | | The AppEntry contains the executable name and the $PATH to use. Store a copy of the AppEntry and pass it to the processlauncher. Change-Id: I15792cc7ce651beed2006841c100b31d3252d9d1 Reviewed-by: Paul Olav Tvete <>
* democompositor: Expose the AppListModel and use to display appsHolger Hans Peter Freyther2017-09-122-39/+24
| | | | | | | | | | | | Replace the static configuration of the launch buttons with a Repeater and the instantiated appModel. Use Component.onCompleted to parse the app files. Maybe we can make this a property to ease starting it? It is hardcoding the install directory for the *.app files but I am not sure how to do it differently. Change-Id: I5ef1d78a472f6e0f1dc1c0a3b050179949e6d818 Reviewed-by: Paul Olav Tvete <>
* democompositor: Add method to scan and watch a directoryHolger Hans Peter Freyther2017-09-122-0/+20
| | | | | | | | | This will add files of a given directory and use a QFileSystemWatcher to check for changes and then re-scan it. It will return if the watching has started. Change-Id: I4d5021430fa400c648167fea37c45d7472ceb322 Reviewed-by: Paul Olav Tvete <>
* democompositor: Add method to scan entire directory for filesHolger Hans Peter Freyther2017-09-122-0/+14
| | | | | | | | Make this and the addFile a public slot to be more easily. Take all files from the directory and ignore the suffix. Change-Id: I8017c3a873a962ab0b4e7e5c9946403f1ee0ffcd Reviewed-by: Paul Olav Tvete <>
* democompositor: Introduce a project file that builds the testsHolger Hans Peter Freyther2017-09-122-0/+6
| | | | | | | | Integrate and build the tests when is used. This makes make check run the tests for the apps handling. Change-Id: I911ad2b2645beeaa879e1e0f30e6453bc9f3e32a Reviewed-by: Paul Olav Tvete <>
* democompositor: Add .gitignore to ignore build and generated filesHolger Hans Peter Freyther2017-09-121-0/+10
| | | | | Change-Id: I8959aa22a984730f057ca83c1ddf018e42816519 Reviewed-by: Paul Olav Tvete <>
* democompositor: Introduce an AppListModel to expose appsHolger Hans Peter Freyther2017-09-1212-8/+378
| | | | | | | | | | | | | | | | | | | | | | | Turn the AppEntry into a gadget and store the filename of where the entry came from. Update the existing test to deal with it. Introduce AppListModel as a QAbstractItemModel and expose the raw AppEntry and its fields as role. Have some slow O(n) code to check if an entry has already been added. The goal is to use a directory watcher to automatically update this list. Store the AppEntry as a pointer so we don't have to remove the const from the field. The next steps are to fully populate the AppListModel by scanning and watching a directory and then replacing the LaunchButton code with a Repeater on the application model. After starting of apps will be done by passing the AppEntry to a launcher. Application state should be stored outside the AppEntry and maybe in a different model as well. Change-Id: Ia933a09942ea8bb88eae5c101d13a30564d8c639 Reviewed-by: Paul Olav Tvete <>
* democompositor: Add parsing of entries and testcodeHolger Hans Peter Freyther2017-09-1210-0/+558
| | | | | | | | | | | | | | Implement parsing of the json definition. Initially be strict to parse the file correctly. Add some basic tests for checking how data and file parsing is working and feed some invalid input into the parser and check the result. Use macro for checking the JSON type and doing the conversion to allow an early return and to avoid having to write the same code over and over again. Change-Id: I8c4301bac1b6226f94c8fc0004a313487b73c21a Reviewed-by: Paul Olav Tvete <>
* democompositor: Describe applications using a JSON fileHolger Hans Peter Freyther2017-09-126-1/+57
| | | | | | | | | | | | Inspired by the specification define a simple JSON format and add files for the existing demo applications using this specifcation. Install them into the QStandardPaths::DataLocation/apps direcyory. Change-Id: If5bbec8ec3a1b375f1e58f8534545b89507cc1a8 Reviewed-by: Paul Olav Tvete <>
* democompositor: QFont takes only int as parameters. Pass oneHolger Hans Peter Freyther2017-09-011-1/+1
| | | | | | | | | There is no constructor that takes a qreal/double and we were truncating the double to int. Just pass 12 to it. The alternative is to use the setPointSizeF to set a qreal as point size. Change-Id: Id6f11f45d648a60b2968a7e8bed0e2ae338e7b34 Reviewed-by: Paul Olav Tvete <>
* Update to latest APIPaul Olav Tvete2016-09-053-32/+8
| | | | | Change-Id: Ifb705ae3dfaa12aa23638d3d340c5c17203efb51 Reviewed-by: Johan Helsing <>
* Update license headersKari Hormi2016-06-079-159/+285
| | | | | | | - Update all license headers to commercial+BSD Change-Id: I7dbf9d967cde7dfe21bef255ea63652b42fccb71 Reviewed-by: Kalle Viironen <>
* Update license headersTopi Reinio2016-05-039-18/+18
| | | | | | | | | - Update Copyright year and holder, unify license text formatting - Update BSD, LGPL licenses for files originating from Qt repositories Change-Id: Id77f62f754c3bb29bb4b1c816e3f984a087ee87e Reviewed-by: Samuli Piippo <>
* democompositor: make demo deployableSamuli Piippo2016-03-111-0/+2
| | | | | Change-Id: Ief1e7f2a46a4f873b3328d9616e30b50bfaad2f1 Reviewed-by: Kimmo Ollila <>
* New iconsPaul Olav Tvete2016-03-117-10/+8
| | | | | Change-Id: Ibb6c7c52dc9004268fc4ff501fc5a38b25743d25 Reviewed-by: Samuli Piippo <>
* Add missing quit.pngPaul Olav Tvete2016-02-151-0/+0
| | | | | Change-Id: I78bf35e4d9ba5d315e5103db912a476b8ea61647 Reviewed-by: Eskil Abrahamsen Blomfeldt <>
* Initial implementation of Diana's designPaul Olav Tvete2016-02-0916-88/+250
| | | | | | | | Based on the screenshots. Not using exact values for sizes and distances. Change-Id: I37c9593b776f4fb6f98ab4b8b571357f182ee65a Reviewed-by: Eskil Abrahamsen Blomfeldt <>
* Fade to blackPaul Olav Tvete2016-02-092-5/+35
| | | | | Change-Id: Ib8cb64c1c3d84bf79e70bab3c353519f7daadd92 Reviewed-by: Eskil Abrahamsen Blomfeldt <>
* Disable client-side window decorationsPaul Olav Tvete2015-11-301-0/+1
| | | | | | | Since we're drawing server-side ones. Change-Id: I2ec4a74b103f8499160b7e608b21dd04a16190bd Reviewed-by: Laszlo Agocs <>
* Demo of the new QtWayland compositor APIPaul Olav Tvete2015-11-2711-0/+1008
Change-Id: Icc027eb0994240848604bf0311e0d22c3a6d5020 Reviewed-by: Kalle Viironen <> Reviewed-by: Eskil Abrahamsen Blomfeldt <>