From a8631aeae952745d6b8b16b49f72657cc3b904c5 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 20 May 2022 16:17:17 +0200 Subject: [PATCH] sculpt: let touch input drive the input seq number This change allows the use of the sculpt manager with touch-only input. Issue #4514 --- repos/gems/src/app/sculpt_manager/gui.cc | 5 ++++- repos/gems/src/app/sculpt_manager/main.cc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/gui.cc b/repos/gems/src/app/sculpt_manager/gui.cc index dbf75b5bb3..c8c7060038 100644 --- a/repos/gems/src/app/sculpt_manager/gui.cc +++ b/repos/gems/src/app/sculpt_manager/gui.cc @@ -41,7 +41,10 @@ struct Gui::Session_component : Rpc_object * Augment input stream with sequence numbers to correlate * clicks with hover reports. */ - if (ev.key_press(Input::BTN_LEFT) || ev.key_release(Input::BTN_LEFT)) { + bool const advance_seq_number = ev.key_press(Input::BTN_LEFT) + || ev.key_release(Input::BTN_LEFT) + || ev.touch(); + if (advance_seq_number) { _global_input_seq_number.value++; _input_component.submit(_global_input_seq_number); } diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index f6a04842f9..2c409c72a1 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -691,7 +691,7 @@ struct Sculpt::Main : Input_event_handler, { bool need_generate_dialog = false; - if (ev.key_press(Input::BTN_LEFT)) { + if (ev.key_press(Input::BTN_LEFT) || ev.touch()) { _clicked_seq_number.construct(_global_input_seq_number); _try_handle_click(); }