block linear desk flips that would wrap if desk flip wrapping is disabled

fix T1948
This commit is contained in:
Mike Blumenkrantz 2015-02-17 18:54:39 -05:00
parent 1a4be248fe
commit fbad4c7fd8
1 changed files with 2 additions and 0 deletions

View File

@ -812,6 +812,8 @@ e_zone_desk_linear_flip_by(E_Zone *zone,
dx = zone->desk_x_current +
(zone->desk_y_current * zone->desk_x_count) + dx;
if ((!e_config->desk_flip_wrap) &&
((dx < 0) || (dx >= zone->desk_x_count * zone->desk_y_count))) return;
dx = dx % (zone->desk_x_count * zone->desk_y_count);
while (dx < 0)
dx += (zone->desk_x_count * zone->desk_y_count);