The calls to filter out mouse motion events doesn't seem to work and the SDL_WarpMouse call adds another motion event to the queue which just floods the queue continuously, which is causing the freeze. Commenting out the SDL_WarpMouse line fixes the issue of course, but once the cursor hits the edges of the window, it stops.
Edit: so reading a few lines further, the actual issue might be with SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE), and not SDL_WarpMouse itself.
Running the latest OpenXcom built from source, and sdl12-compat 1.2.68, on manjaro, I again encountered this scrolling issue. Quoting from there:
Edit: so reading a few lines further, the actual issue might be with
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE)
, and notSDL_WarpMouse
itself.