I chose SDL2 after hearing wonders about it: multiplatform, handles windowing, multiple monitors (specially on Linux!), input, releasing of input grabbing when debugging, it's backed by Valve, etc, etc.
I'm an Ogre developer and we have our own windowing management code for all platforms; however it's not perfect and it doesn't handle input. From what I've heard SDL2 would be a great replacement in all aspects.
So I believed what I've been told and went ahead. Now I'm quite pissed. This piece of software is buggy as hell on Linux. This is what I've found:
1. Creating a GL context that is not supported (i.e. trying a 4.6 or a 5.0 context) will result in a deadlock when calling SDL_GL_CreateContext (or when making the next X11 function if I create the context myself). The callstack is (sorry for no symbols):
0 __lll_lock_wait 135 0x7ffff5316f2c 1 _L_lock_909 /lib/x86_64-linux-gnu/libpthread.so.0 0x7ffff5312657 2 __GI___pthread_mutex_lock 79 0x7ffff5312480 3 ?? /usr/lib/x86_64-linux-gnu/libX11.so.6 0x7ffff5a27973 4 ?? /usr/lib/libGL.so.1 0x7fffec262406 5 ?? /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so 0x7fffe706b844 6 ?? /usr/lib/libGL.so.1 0x7fffec236022 7 glXDestroyContext /usr/lib/libGL.so.1 0x7fffec23622c 8 ?? /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 0x7ffff6e1e931 9 ?? /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 0x7ffff6e13710 10 Demo::GraphicsSystem::initialize GraphicsSystem.cpp 140 0x42906e