mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 07:27:35 +00:00
nitpicker: re-eval pointer on panorama change
Whenever the panorama changes, eagerly re-evaluate the validity of the current pointer position. Otherwise, the pointer may stay at an invisible position until the next input motion happens. During this intermediate phase, the position featured in the hover report cannot reliably be matched against the panorama report (as needed by the sculpt manager to let the leitzentrale GUI follow the pointer). Issue #5370
This commit is contained in:
parent
38650149b6
commit
1336495858
@ -717,22 +717,26 @@ struct Nitpicker::Main : Focus_updater, Hover_updater,
|
||||
if (size_changed) {
|
||||
_view_stack.bounding_box(new_bb);
|
||||
|
||||
if (!_user_state.pointer().ok())
|
||||
_user_state.pointer(_capture_root.any_visible_pointer_position());
|
||||
|
||||
_update_pointer_position();
|
||||
_capture_root.screen_size_changed();
|
||||
|
||||
/* redraw */
|
||||
_view_stack.update_all_views();
|
||||
}
|
||||
|
||||
/* re-evaluate current pointer position */
|
||||
_user_state.pointer(_user_state.pointer().convert<Pointer>(
|
||||
[&] (Point p) { return p; },
|
||||
[&] (Nowhere) { return _capture_root.any_visible_pointer_position(); }));
|
||||
|
||||
_update_pointer_position();
|
||||
|
||||
/* notify GUI clients about the mode-info change */
|
||||
for (Gui_session *s = _session_list.first(); s; s = s->next())
|
||||
s->notify_mode_change();
|
||||
|
||||
_report_panorama();
|
||||
_update_input_connection();
|
||||
update_hover();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -228,7 +228,11 @@ class Nitpicker::User_state
|
||||
_view_stack(view_stack)
|
||||
{ }
|
||||
|
||||
void pointer(Pointer p) { _pointer = p; }
|
||||
void pointer(Pointer p)
|
||||
{
|
||||
p.with_result([&] (Point pos) { _try_move_pointer(pos); },
|
||||
[&] (Nowhere) { _pointer = Nowhere { }; });
|
||||
}
|
||||
|
||||
Pointer pointer() const { return _pointer; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user