better handle touchscreens

This commit is contained in:
David Rose 2009-05-05 22:41:02 +00:00
parent b13c210550
commit 928aec618d

View File

@ -1409,11 +1409,7 @@ do_transmit_data(DataGraphTraverser *trav, const DataNodeTransmit &input,
output.set_data(_pixel_size_output, pixel_size);
_pixel_size = pixel_size;
if (!input.has_data(_xy_input)) {
// No mouse in the window.
set_no_mouse();
} else {
if (input.has_data(_xy_input)) {
// The mouse is within the window. Get the current mouse position.
const EventStoreVec2 *xy, *pixel_xy;
DCAST_INTO_V(xy, input.get_data(_xy_input).get_ptr());
@ -1570,6 +1566,14 @@ do_transmit_data(DataGraphTraverser *trav, const DataNodeTransmit &input,
}
}
if (!input.has_data(_xy_input)) {
// No mouse in the window. We check this down here, below the
// button checking, in case the mouse left the window in the same
// frame it released a button (particularly likely with a
// touchscreen input that's emulating a mouse).
set_no_mouse();
}
// Now check the inactivity timer.
if (_has_inactivity_timeout) {
if (activity) {