diff options
-rw-r--r-- | HomeScreen/conf/HomeScreen.service | 14 | ||||
-rw-r--r-- | HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service | 11 | ||||
-rw-r--r-- | InputEventManager/conf/InputEventManager.service | 11 | ||||
-rw-r--r-- | InputEventManager/src/inputeventmanager.h | 2 | ||||
-rw-r--r-- | WindowManager/conf/WindowManager.service | 12 | ||||
-rw-r--r-- | WindowManager/src/windowmanager.cpp | 21 |
6 files changed, 40 insertions, 31 deletions
diff --git a/HomeScreen/conf/HomeScreen.service b/HomeScreen/conf/HomeScreen.service index a343d1e..5a4a042 100644 --- a/HomeScreen/conf/HomeScreen.service +++ b/HomeScreen/conf/HomeScreen.service @@ -1,16 +1,18 @@ [Unit] Description=AGL reference HomeScreen -After=WindowManager.service InputEventManager.service HomeScreenAppFrameworkBinderAGL.service +Requires=dbus.service afm-user-daemon.service InputEventManager.service HomeScreenAppFrameworkBinderAGL.service +After=dbus.service afm-user-daemon.service InputEventManager.service HomeScreenAppFrameworkBinderAGL.service +ConditionKernelCommandLine=!agl.nogfx [Service] -Type=dbus +User=root +Type=dbus BusName=org.agl.homescreen +ExecStartPre=/bin/systemctl --user is-active WindowManager ExecStart=/usr/AGL/HomeScreen/HomeScreen -Environment=QT_IVI_SURFACE_ID=1000 QT_WAYLAND_SHELL_INTEGRATION="ivi-shell" LD_PRELOAD=/usr/lib/libEGL.so +Environment=QT_IVI_SURFACE_ID=1000 QT_WAYLAND_SHELL_INTEGRATION=ivi-shell LD_PRELOAD=/usr/lib/libEGL.so Restart=on-failure -RestartSec=5 - +RestartSec=1 [Install] WantedBy=default.target - diff --git a/HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service b/HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service index 8375912..79fc5d9 100644 --- a/HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service +++ b/HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service @@ -1,14 +1,15 @@ [Unit] Description=AGL App Framework Binder for HomeScreen +Requires=dbus.service afm-user-daemon.service +After=afm-user-daemon.service [Service] -Type=dbus -BusName=org.agl.appframework -ExecStart=/usr/AGL/HomeScreenAppFrameworkBinderAGL/HomeScreenAppFrameworkBinderAGL +User=root +Type=dbus +BusName=org.agl.homescreenappframeworkbinder +ExecStart=/usr/AGL/HomeScreen/HomeScreenAppFrameworkBinderAGL Restart=on-failure RestartSec=5 - [Install] WantedBy=default.target - diff --git a/InputEventManager/conf/InputEventManager.service b/InputEventManager/conf/InputEventManager.service index 4db78bb..a234e31 100644 --- a/InputEventManager/conf/InputEventManager.service +++ b/InputEventManager/conf/InputEventManager.service @@ -1,14 +1,15 @@ [Unit] Description=AGL Input Event Manager +Requires=dbus.service +After=dbus.service [Service] -Type=dbus -BusName=org.agl.inputevent -ExecStart=/usr/AGL/InputEventManager/InputEventManager +User=root +Type=dbus +BusName=org.agl.inputeventmanager +ExecStart=/usr/AGL/HomeScreen/InputEventManager Restart=on-failure RestartSec=5 - [Install] WantedBy=default.target - diff --git a/InputEventManager/src/inputeventmanager.h b/InputEventManager/src/inputeventmanager.h index 075895c..5cba888 100644 --- a/InputEventManager/src/inputeventmanager.h +++ b/InputEventManager/src/inputeventmanager.h @@ -40,7 +40,7 @@ private: InputeventAdaptor *mp_inputEventAdaptor; org::agl::homescreen *mp_dBusHomeScreenProxy; - //from inputevent_adaptor.h + //from inputevent_adapter.h public Q_SLOTS: // METHODS void hardKeyPressed(int key); diff --git a/WindowManager/conf/WindowManager.service b/WindowManager/conf/WindowManager.service index b44e14e..ffc3602 100644 --- a/WindowManager/conf/WindowManager.service +++ b/WindowManager/conf/WindowManager.service @@ -1,15 +1,15 @@ [Unit] Description=AGL Window Manager -After=weston.service +Requires=dbus.service [Service] -Type=dbus +User=root +Type=dbus BusName=org.agl.windowmanager -ExecStart=/usr/AGL/WindowManager/WindowManager +ExecStart=/usr/AGL/HomeScreen/WindowManager Restart=on-failure -RestartSec=5 - +RestartSec=1 +StandardOutput=tty [Install] WantedBy=default.target - diff --git a/WindowManager/src/windowmanager.cpp b/WindowManager/src/windowmanager.cpp index 65ad5cf..a03bab6 100644 --- a/WindowManager/src/windowmanager.cpp +++ b/WindowManager/src/windowmanager.cpp @@ -15,8 +15,7 @@ */ #include "windowmanager.hpp" -#include <wayland-client.h> -#include <QFile> + ////////////////////////////////////////// // THIS IS STILL UNDER HEAVY DEVELOPMENT! @@ -48,12 +47,6 @@ WindowManager::WindowManager(QObject *parent) : m_currentLayout(-1) { qDebug("-=[WindowManager]=-"); - // publish windowmanager interface - mp_windowManagerAdaptor = new WindowmanagerAdaptor((QObject*)this); - - QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/windowmanager", this); - dbus.registerService("org.agl.windowmanager"); } void WindowManager::start() @@ -65,6 +58,11 @@ void WindowManager::start() err = ilm_init(); qDebug("ilm_init = %d", err); + if(ILM_SUCCESS != err) + { + qDebug("failed! Exiting!"); + exit(-1); + } myThis = this; err = ilm_registerNotification(WindowManager::notificationFunc_static, this); @@ -74,6 +72,13 @@ void WindowManager::start() createNewLayer(WINDOWMANAGER_LAYER_APPLICATIONS); createNewLayer(WINDOWMANAGER_LAYER_HOMESCREEN); #endif + + QDBusConnection dbus = QDBusConnection::sessionBus(); + dbus.registerObject("/windowmanager", this); + dbus.registerService("org.agl.windowmanager"); + + // publish windowmanager interface + mp_windowManagerAdaptor = new WindowmanagerAdaptor((QObject*)this); } WindowManager::~WindowManager() |