I'm trying to handle my usb controller (xbox model) via GLFW.

I can get it's input, but I see a strange behaviour in my sample application that I couldn't explain.
Can you enlight me please?

If I disable automatic event polling on buffer swapping (line "A"), the screen content is refreshed but OS part is unresposive: I can't resize, move, etc.

With automatic event polling enabled, everything is fine.

I tried disabling automatic event polling and calling "waitEvents" (line "B") before refreshing the screen. But, changes to the joystick input do not generate any event, so I need to move the mouse or type a key to release "waitEvents" call.

What am I missing?

I'm using Windows 7 64-bit.

The code is available here: http://hpaste.org/80031