Make get_output_next() work with non-aligned RandR setups (+test) (Thanks Feh, swh, Moritz)
A good visualization of the new algorithm is this: +--------+ | | +--------+=| S1 |======================== | | | | | S0 | +--------+ | | +--------+ +--------+=========| |================ | S2 | +--------+ | | | | +--------+ | S3 | | | +--------+ When focus is on S0, 'focus output right' will first match S1 (the closest output which overlaps in the highlighted area), then S2, but not S3 (since S3 does not overlap into the highlighted area). fixes #669 fixes #771
This commit is contained in:
@ -486,7 +486,7 @@ static bool _tree_next(Con *con, char way, orientation_t orientation, bool wrap)
|
||||
else
|
||||
return false;
|
||||
|
||||
next_output = get_output_next(direction, current_output);
|
||||
next_output = get_output_next(direction, current_output, CLOSEST_OUTPUT);
|
||||
if (!next_output)
|
||||
return false;
|
||||
DLOG("Next output is %s\n", next_output->name);
|
||||
|
Reference in New Issue
Block a user