ssokolow / quicktile

Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
https://ssokolow.com/quicktile/
GNU General Public License v2.0
861 stars 78 forks source link

Fix edge_steps unique values #86

Closed avaly closed 6 years ago

avaly commented 6 years ago

For ColumnCount = 8, edge_steps contain a double value for 0.5, which makes windows cycle only between 0.125 and 0.5 of the screen width.

Before:

DEBUG: edge_steps (0.5, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875)

After:

DEBUG: edge_steps (0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875)
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 32.633% when pulling e5f65b8cc79f6bb6d11911f8f7235c155eede711 on avaly:fix/edge_steps into 31b8144fc6618ed0c7de7bcd81942a8fa301a176 on ssokolow:master.

ssokolow commented 6 years ago

While I appreciate you offering up a PR this quickly, I don't want that sorted in there.

While I could quickly whip up a solution which throws out duplicates while preserving ordering, the actual proper solution is just to track where in that sequence it is without getting stuck... and, if all goes well, that change will be complete by the end of today in order to fix #20 and to prepare to fix #24, #10, and #30.

I'll leave this open as a reminder to test this situation once it's done.

ssokolow commented 6 years ago

I wound up spending more time refactoring the code than I expected, so it'll probably be tomorrow instead.

ssokolow commented 6 years ago

There. Fixed. This also fixes #20 in that window size hints can't interfere either.

You might get weird layout bugs if if you try to tile something which imposes geometry restrictions like a video player, but at least the cycle won't get stuck. (I'd have actually had this ready hours ago but I got side-tracked working on the code to fix that other problem.)

If you want to track the progress on that follow issue #87.