glfwSetMouseButtonCallback lag

Started by mudlee, November 01, 2019, 16:42:22

Previous topic - Next topic

mudlee

UPDATE: something is wrong with IntelliJ. I built a standalone JRE app and running it without the IDE it works.

I have a complex Input system in my framework, hence first I thought that the bug is there. But using this code below, mouse clicks are lagging with like half a seconds sometimes. Sometimes the lag is just  like 100ms. But it's really observable.
The problem is it only happens on Linux. On OSX it's immediate. I have no windows OS, so I don't know how it works there. Any idea?

glfwSetMouseButtonCallback(ID, new GLFWMouseButtonCallback() {
    @Override
    public void invoke(long window, int button, int action, int mods) {
        System.out.println(Math.random());
    }
});