Not blocking: A piece is missing here: the handling of surface movements... I.e. imagine a window manager short cut that changes the window position on screen i.e. toggles form full screen to windows or back - without loosing focus.
I am not sure who should be in charge of that. In the past in mirserver we would use a surface change observer. With AbstractShell we might want to have a move_resize_surface_to(...) that handles that and more things...
Not blocking: A piece is missing here: the handling of surface movements... I.e. imagine a window manager short cut that changes the window position on screen i.e. toggles form full screen to windows or back - without loosing focus.
I am not sure who should be in charge of that. In the past in mirserver we would use a surface change observer. With AbstractShell we might want to have a move_resize_ surface_ to(...) that handles that and more things...
Codewise a suggestion:
void mi::SeatInputDe viceTracker: :set_confinemen t_regions( geometry: :Rectangles const& regions) this](mir: :geometry: :Point& pos) confine( pos); >confine( pos); viceTracker: :reset_ confinement_ regions( ) geometry: :Point& pos) {input_ region- >confine( pos);}; viceTracker: :confine_ pointer( ) :geometry: :Point const old{cursor_x, cursor_y}; >confine( confined) ; function( confined) ; x.as_int( ); y.as_int( ); viceTracker: :update_ cursor( MirPointerEvent const* event) event_axis_ value(event, mir_pointer_ axis_relative_ x); event_axis_ value(event, mir_pointer_ axis_relative_ y);
+{
+ confine_function = [regions,
+ {
+ regions.
+ input_region-
+ };
+}
+
+void mi::SeatInputDe
+{
+ confine_function = [this](
+}
+
+void mi::SeatInputDe
+{
mir:
auto confined = old;
- input_region-
+ confine_
if (confined.x != old.x) cursor_x = confined.
if (confined.y != old.y) cursor_y = confined.
+}
+
+void mi::SeatInputDe
+{
+ cursor_x += mir_pointer_
+ cursor_y += mir_pointer_
+
+ confine_pointer();
and just let confine_function be a std::function< void(geometry: :Point& )> confine_function initialized like reset_confineme nt_regions.
hmm is that a needs fixing..