Add weston dependency for units with display permission 75/24775/1 9.99.1 jellyfish/9.99.1 jellyfish_9.99.1
authorScott Murray <scott.murray@konsulko.com>
Tue, 16 Jun 2020 19:44:40 +0000 (15:44 -0400)
committerScott Murray <scott.murray@konsulko.com>
Tue, 16 Jun 2020 19:52:42 +0000 (15:52 -0400)
Add logic to the systemd unit template to add a dependency on the
weston@display.service if the widget has the display permission.
This fixes races with apps against weston / the new AGL compositor.

Bug-AGL: SPEC-3411

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ib89da253933e7e34cfe5dfeb668c8d9df63f0e51

conf/unit/service.inc

index 81554d2..ea08220 100644 (file)
@@ -48,6 +48,11 @@ ENDIF
 
 After=Network.target
 
+IF_PERM(:public:display)
+BindsTo=weston@display.service
+After=weston@display.service
+ENDIF
+
 # Adds check to smack
 ConditionSecurity=smack
 %nl