@@ -102,15 +102,15 @@ class LauncherState : public rmlib::StateBase<LauncherWidget> {
102102 return Wrap (widgets);
103103 }
104104
105- auto appList () const {
105+ auto appList (rmlib::AppContext& ctx ) const {
106106 using namespace rmlib ;
107107
108108 std::vector<AppWidget> widgets;
109109 for (const auto & app : apps) {
110110 if (!isRunning (app.getLaunchPid ())) {
111- widgets.emplace_back (app, [this , &app] {
111+ widgets.emplace_back (app, [this , &app, &ctx ] {
112112 setState (
113- [&app ](auto & self) { self.launch (*const_cast <App*>(&app)); });
113+ [&](auto & self) { self.launch (ctx, *const_cast <App*>(&app)); });
114114 });
115115 }
116116 }
@@ -120,7 +120,7 @@ class LauncherState : public rmlib::StateBase<LauncherWidget> {
120120 auto launcher (rmlib::AppContext& context) const {
121121 using namespace rmlib ;
122122
123- return Cleared (Column (header (context), runningApps (), appList ()));
123+ return Cleared (Column (header (context), runningApps (), appList (context )));
124124 }
125125
126126 auto build (rmlib::AppContext& context,
@@ -165,7 +165,7 @@ class LauncherState : public rmlib::StateBase<LauncherWidget> {
165165 void hide (rmlib::AppContext* context);
166166 void toggle (rmlib::AppContext& context);
167167
168- void launch (App& app);
168+ void launch (rmlib::AppContext& ctx, App& app);
169169 void switchApp (pid_t pid);
170170
171171 void onSignal ();
@@ -185,6 +185,7 @@ class LauncherState : public rmlib::StateBase<LauncherWidget> {
185185
186186 rmlib::TimerHandle sleepTimer;
187187 rmlib::TimerHandle inactivityTimer;
188+ rmlib::TimerHandle backgroundTimer;
188189
189190 rmlib::Rotation rotation = rmlib::Rotation::None;
190191 std::optional<rmlib::Canvas> background;
0 commit comments