Commit 6b7d125b authored by Mall, Anon's avatar Mall, Anon
Browse files

notify fix

parent e2a39355
......@@ -218,6 +218,14 @@ LinakDesk::move(Command cmd)
}
void LinakDesk::notifyFrontends(int height)
{
for (auto f : m_frontends)
{
f.get().updateHeight(height);
}
}
void
LinakDesk::doDeskControl(void)
{
......@@ -237,6 +245,7 @@ LinakDesk::doDeskControl(void)
// stop
// wait for new command
m_finished = true;
notifyFrontends(m_currentHeight);
do
{
try
......@@ -254,10 +263,7 @@ LinakDesk::doDeskControl(void)
cout << "currentHeight=" << m_currentHeight << endl;
if (m_currentHeight != last_height)
{
for (auto f : m_frontends)
{
f.get().updateHeight(m_currentHeight);
}
notifyFrontends(m_currentHeight);
last_height = m_currentHeight;
}
}
......
......@@ -92,6 +92,7 @@ class LinakDesk : public Controller
};
LinakDesk(std::string offset_file = "desk_offset.conf");
void notifyFrontends(int height);
virtual void doDeskControl(void);
virtual void setHeight(int height);
virtual int getHeight();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment