Hello Guest

[BUG] LWJGL 3.0.0b stable / Mac (10.10.5), Mouse press w/ click to focus

  • 2 Replies
Greetings!  I can't find mention of this anywhere and it's causing some issues.

When I click to give focus to a LWJGL/GLFW window a mouse press event never gets fired.  This can cause some odd situations like the following:
  • Immediately after clicking to focus on the window, glfwGetMouseButton() returns GLFW_RELEASE despite the button being physically down
  • After clicking to focus on the window, no release event is triggered despite the mouse button being physically released over the window while the window has focus.

My experience with other windowing systems would make an initial click on the window to gain focus also immediately trigger the mouse press event in addition to a focus event (and sometimes a mouse enter event as well).  Right now, the focus and enter events are happening essentially simultaneously but no press event happens.

I suppose it's likely that this is a GLFW issue but figured I should start here as this is how I am using LWJGL.

Seth B.


Offline spasi

  • *****
  • 2212
    • WebHotelier
Hey Seth,

I was able to verify what you describe, using the Events demo. On Windows I'm getting the press/release events and there other differences too (e.g. cursor move events before the window receives focus). These could simply be fundamental differences between operating systems. It'd be probably be best to open a GLFW issue to make sure.


Offline Cornix

  • *****
  • 488
Well, it would surely be nice to get consistent behavior across platforms from a cross platform library.