eczarny/spectacle — pull request #214 by arnaudl (2014-06-08 20:50:38+00:00)
Title: bug fix for move to previous/next third

This is a tentative fix for bugs #190, #102 and maybe others... From what I understand, previous/next third commands can't be used with some softwares that use custom sized windows. For instance, my iTerm windows are resized to a multiple of the number of columns, instead of the precise number of pixels calculated by Spectacle. The different sizes make the CGRectEqualToRect() tests fail, and the windows are blacklisted.

This fix allows for some tolerance in the test by comparing the CGRect width/height/x/y parameters +/- the SpectacleWindowCalculationFudgeFactor constant.

The blacklist needs to be emptied before testing:

defaults delete com.divisiblebyzero.Spectacle BlacklistedWindowRects