Wrong cursor position in Linux - Wayland - Sway WM when scale is not 1.0
ernierasta opened this issue · comments
Hi,
I love Goxel, it is amazing and I am using to teach kids 3d printing.
As title says on Linux in Wayland using Sway WM when monitor scale is not 1 (tested with 1.5) there is problem with cursor position (cube is drawn to the left and higher then actual mouse cursor).
From what I understand from code it is the same problem as on apple, my wrong, primitive workaround is:
In src/main.c (around line 200):
//#ifndef __APPLE__ // As far as I can tell this is a bug in glfw on Mac.
// xpos /= scales[0];
// ypos /= scales[1];
//#endif
//
So if there is option to recognize we are running on Wayland (eventually Sway WM), it would be great to also avoid dividing positions.
Another way of "solving" a problem without auto-detecting environment would be to make it configurable via cmd options.
I had not tested it under other Wayland client, so I have no idea if this is general Wayland problem or it is specific to Sway WM.
Thanks for the report. I'll try to find out a bit more about this issue. Goxel is probably not the first application to run into it.