nit_fb: get to front if nit_fb got input focus

Issue #2143
This commit is contained in:
Alexander Boettcher 2016-10-20 11:31:19 +02:00 committed by Christian Helmuth
parent 61e1cf76c2
commit 844174918b

View File

@ -301,8 +301,18 @@ struct Nit_fb::Main : View_updater
Input::Event const * const events = input_ds.local_addr<Input::Event>();
unsigned const num = nitpicker.input()->flush();
for (unsigned i = 0; i < num; i++)
bool update = false;
for (unsigned i = 0; i < num; i++) {
if (events[i].type() == Input::Event::FOCUS)
update = events[i].code();
input_session.submit(translate_event(events[i], position, fb_session.size()));
}
/* get to front if we got input focus */
if (update)
update_view();
}
Signal_handler<Main> input_handler =