mirror of
https://gitlab.gnome.org/GNOME/libmks.git
synced 2024-12-22 13:45:21 +00:00
lib: robustness fixes for mouse movement
This commit is contained in:
parent
0a7c1ff21c
commit
62f084b0b4
@ -393,6 +393,10 @@ mks_display_legacy_event_cb (MksDisplay *self,
|
|||||||
double guest_x = floor (x) / area.size.width * guest_width;
|
double guest_x = floor (x) / area.size.width * guest_width;
|
||||||
double guest_y = floor (y) / area.size.height * guest_height;
|
double guest_y = floor (y) / area.size.height * guest_height;
|
||||||
|
|
||||||
|
if (guest_x < 0 || guest_y < 0 ||
|
||||||
|
guest_x >= guest_width || guest_y >= guest_height)
|
||||||
|
return GDK_EVENT_PROPAGATE;
|
||||||
|
|
||||||
mks_mouse_move_to (mouse,
|
mks_mouse_move_to (mouse,
|
||||||
guest_x,
|
guest_x,
|
||||||
guest_y,
|
guest_y,
|
||||||
|
Loading…
Reference in New Issue
Block a user