Well, for now, I am using a workaround. But I'm not sure if I should present that as "the solution".
Firstly, some events are actually received by SFML. I don't know the reason, but SFML gets the MOUSE_MOVED, MOUSE_ENTER and MOUSE_LEFT events just fine. Resizing events also work out of the box.
For
some reason, when I move the mouse, SFML also gets a JOYSTICK_MOVED event. Any idea what this is about? It might have to do with a VM setting, I'm not using a real Linux machine atm.
Anyway, since AWT receives the events, I can register the respective event listeners on the canvas and simulate SFML events:
- KeyListener (key presses, releases and text typing)
- MouseListener (mouse button presses and releases)
- MouseMotionListener (mouse movements while a mouse is pressed is not recognized by the SFML window)
- MouseWheelListener
This works perfectly and is completely hidden away from the user, but it seems like a really ugly mix of SFML and AWT event reception to me. Any opinions on that?
EDIT:
Thinking about it, I could simulate *all* SFML events from AWT events on all operating system. That way, all the problems would be ruled out and it'd be consistent.
I suppose I would still have to poll events from the RenderWindow to make sure that the buffer doesn't fill up? Or isn't that a problem?