It is a bug when it works with SDL1. Because applications must hint the joystick subsystem that they want non-keyboard-focus events from joysticks (which you most likely don't have when having no window manager). This can be done with SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS. You can change this behavior with SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); before calling SDL_Init(SDL_INIT_JOYSTICK|.....
But I think that the no-focus-no-event is sane and should stay that way.
- - - Updated - - -
It is a bug when it works with SDL1. Because applications must hint the joystick subsystem that they want non-keyboard-focus events from joysticks (which you most likely don't have when having no window manager). This can be done with SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS. You can change this behavior with SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); before calling SDL_Init(SDL_INIT_JOYSTICK|.....
But I think that the no-focus-no-event is sane and should stay that way.