hismailbulut / Neoray

Simple and lightweight GUI client for Neovim
MIT License
148 stars 5 forks source link

Fix rendering issues on macOS #46

Closed annacrombie closed 3 months ago

annacrombie commented 1 year ago

This fixes #41. My fix is achieved by multiplying various values by 2, but I think the proper fix would involve correctly tracking fb size and window size (with glfwSetWindowSizeCallback(window, window_size_callback);) separately rather than assuming fb size == window size.

From glfw docs:

On some machines screen coordinates and pixels are the same, but on others they will not be. There is a second set of functions to retrieve the size, in pixels, of the framebuffer of a window.

See also https://github.com/glfw/glfw/issues/2089 for a similar issue.

hismailbulut commented 1 year ago

Also I find this comment https://github.com/glfw/glfw/issues/2079#issuecomment-1159798001 in a similar issue. Maybe we can workaround with this but I totally leaved it to you