mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 15:02:25 +00:00
parent
1a26f33469
commit
0f18ecc142
@ -65,13 +65,9 @@ static void input_callback(enum input_event_type type,
|
|||||||
case EVENT_TYPE_WHEEL: t = Input::Event::WHEEL; break;
|
case EVENT_TYPE_WHEEL: t = Input::Event::WHEEL; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
input_session().submit(Input::Event(t, code,
|
input_session().submit(Input::Event(t, code,
|
||||||
absolute_x, absolute_y,
|
absolute_x, absolute_y,
|
||||||
relative_x, relative_y));
|
relative_x, relative_y));
|
||||||
} catch (Input::Event_queue::Overflow) {
|
|
||||||
PWRN("input ring buffer overflow");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -501,7 +501,6 @@ class Wm::Nitpicker::Session_component : public Genode::Rpc_object<Session>,
|
|||||||
Input::Event const * const events =
|
Input::Event const * const events =
|
||||||
_nitpicker_input_ds.local_addr<Input::Event>();
|
_nitpicker_input_ds.local_addr<Input::Event>();
|
||||||
|
|
||||||
try {
|
|
||||||
while (_nitpicker_input.is_pending()) {
|
while (_nitpicker_input.is_pending()) {
|
||||||
|
|
||||||
size_t const num_events = _nitpicker_input.flush();
|
size_t const num_events = _nitpicker_input.flush();
|
||||||
@ -511,13 +510,6 @@ class Wm::Nitpicker::Session_component : public Genode::Rpc_object<Session>,
|
|||||||
for (size_t i = 0; i < num_events; i++)
|
for (size_t i = 0; i < num_events; i++)
|
||||||
_input_session.submit(_translate_event(events[i], input_origin));
|
_input_session.submit(_translate_event(events[i], input_origin));
|
||||||
}
|
}
|
||||||
} catch (Input::Event_queue::Overflow) {
|
|
||||||
|
|
||||||
PWRN("client \"%s\" does not respond to user input",
|
|
||||||
_session_label.string());
|
|
||||||
|
|
||||||
_input_session.event_queue().reset();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
View &_create_view_object(View_handle parent_handle)
|
View &_create_view_object(View_handle parent_handle)
|
||||||
|
@ -43,10 +43,16 @@ class Input::Session_component : public Genode::Rpc_object<Input::Session>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit input event to event queue
|
* Submit input event to event queue
|
||||||
*
|
|
||||||
* \throw Input::Event_queue::Overflow
|
|
||||||
*/
|
*/
|
||||||
void submit(Input::Event event) { _event_queue.add(event); }
|
void submit(Input::Event event)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
_event_queue.add(event);
|
||||||
|
} catch (Input::Event_queue::Overflow) {
|
||||||
|
PWRN("input overflow - resetting queue");
|
||||||
|
_event_queue.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************
|
/******************************
|
||||||
|
Loading…
Reference in New Issue
Block a user