Resolve issues with the animation player drag & drop.
- IMB_exit ran before attempting to load the dropped image,
crashing when the image was loaded.
- The old event consumer wasn't removed from the system
causing events to be processed that accessed freed stack memory.
Back ported from [0].
[0]: 51467b0611
When the window manager set the window size, there were no checks
the size is a multiple of the buffer scale (a requirement for Wayland).
This meant setting the window size could exit Blender without warning
if an invalid window size was set.
Back ported changes from [0] & [1].
[0]: 3ad21b2169
[1]: 46159c131d
Changes to the mouse cursor would only display when the main loop
was being handled, so blocking actions such as file load wouldn't
refresh the cursor.
Solve by flushing the display when the cursor changes.
Back ported from [0].
[0]: 8337b3dd3f