summaryrefslogtreecommitdiffstats
path: root/wayland/democompositor/processlauncher.h
Commit message (Collapse)AuthorAgeFilesLines
* democompositor: Introduce a graceful stop of a client applicationHolger Hans Peter Freyther2017-11-291-0/+1
| | | | | | | | | | 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 <paul.tvete@qt.io>
* democompositor: Allow to stop running processes by AppEntryHolger Hans Peter Freyther2017-11-291-0/+1
| | | | | | | | | 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 <paul.tvete@qt.io>
* processlauncher: Fix crashing on destruction with running appsHolger Hans Peter Freyther2017-11-091-0/+3
| | | | | | | | | | | | | | | | 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 <paul.tvete@qt.io>
* democompositor: Provide an example to detect unknown appsHolger Hans Peter Freyther2017-09-121-0/+1
| | | | | | | | | | | | | | 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 <paul.tvete@qt.io>
* democompositor: Keep track of running apps and enforce singletonHolger Hans Peter Freyther2017-09-121-2/+28
| | | | | | | | | | 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 <paul.tvete@qt.io>
* democompositor: Move to start by AppEntryHolger Hans Peter Freyther2017-09-121-1/+6
| | | | | | | | 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 <paul.tvete@qt.io>
* Update license headersKari Hormi2016-06-071-19/+33
| | | | | | | - Update all license headers to commercial+BSD Change-Id: I7dbf9d967cde7dfe21bef255ea63652b42fccb71 Reviewed-by: Kalle Viironen <kalle.viironen@theqtcompany.com>
* Update license headersTopi Reinio2016-05-031-2/+2
| | | | | | | | | - 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 <samuli.piippo@qt.io>
* Demo of the new QtWayland compositor APIPaul Olav Tvete2015-11-271-0/+52
Change-Id: Icc027eb0994240848604bf0311e0d22c3a6d5020 Reviewed-by: Kalle Viironen <kalle.viironen@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>