+ /* If the mouse is not on this screen but used to be, that's motion.
+ If the mouse was not on this screen, but is now, that's motion.
+ */
+ {
+ Bool on_screen_p = (root_x != -1 && root_y != -1);
+ Bool was_on_screen_p = (ssi->poll_mouse_last_root_x != -1 &&
+ ssi->poll_mouse_last_root_y != -1);
+
+ if (on_screen_p != was_on_screen_p)
+ moved_p = True;
+ }