redhog / InfiniteGlass

Window manager with infinite desktop, infinite zoom and infinite window resolution
https://redhog.github.io/InfiniteGlass/
GNU General Public License v3.0
35 stars 5 forks source link

Picking bug #63

Closed redhog closed 4 years ago

redhog commented 4 years ago

The logic here

seems broken, and sometimes mangles the window id. 0x1000007 gets transformed into 0x1000008. Why?

redhog commented 4 years ago

Any hints why this would not work, and fail this way, in https://en.wikipedia.org/wiki/Single-precision_floating-point_format ?

IanTrudel commented 4 years ago

Seems like an error caused by rounding from floor().

redhog commented 4 years ago

But... floor shouldn't round, riiight? https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/floor.xhtml

IanTrudel commented 4 years ago

Well, output the values and manually calculate the numbers. You can also try casting instead of floor.

redhog commented 4 years ago

Fixed it, I think: https://github.com/redhog/InfiniteGlass/commit/3b285d6ce057fb3e3b13d9c84daa778cf4a328b8