saikyun / freja

Self-modifiable editor for coding graphical things
67 stars 3 forks source link

sometimes `(set-config-flags :window-highdpi)` messes up mouse position #44

Open saikyun opened 3 years ago

saikyun commented 3 years ago

A user had problems with mouse clicks being perceived by freja as being in a different position than the mouse were. The user found that commenting out (set-config-flags :window-highdpi). It's not clear why this happens in some situations but not in others.

The user was using i3wm.

One possible solution is figuring out the screen's pixel ratio and not setting the flag if the pixel-ratio is 1. You can't figure out the pixel ratio in raylib before creating a window though (and then it's too late to set the flag), but perhaps there are other ways.