app/backdrop: use 'with_libc'

Fix #2577
This commit is contained in:
Emery Hemingway 2017-11-11 23:38:00 -06:00 committed by Christian Helmuth
parent 44a43aa060
commit 0b60b8954b

View File

@ -135,8 +135,11 @@ struct Backdrop::Main
*/
void handle_config();
void handle_config_signal() {
Libc::with_libc([&] () { handle_config(); }); }
Signal_handler<Main> config_dispatcher = {
env.ep(), *this, &Main::handle_config };
env.ep(), *this, &Main::handle_config_signal };
void handle_sync();
@ -352,8 +355,10 @@ void Backdrop::Main::handle_config()
void Backdrop::Main::handle_sync()
{
buffer->flush_surface();
_update_view();
Libc::with_libc([&] () {
buffer->flush_surface();
_update_view();
});
/* disable sync signal until the next call of 'handle_config' */
nitpicker.framebuffer()->sync_sigh(Signal_context_capability());
@ -367,5 +372,5 @@ extern "C" void _sigprocmask() { }
void Libc::Component::construct(Libc::Env &env) {
static Backdrop::Main application(env); }
with_libc([&env] () { static Backdrop::Main application(env); }); }