Recently I ran into 2 bugs caused by handling events before drawing (rB9662803833264668322b5ce10f28c852340d6445 & rB1b5a690c721e257f4d2b6b0df3ad87c011af121e).
In the 2.8x branch I've found a 3rd, ([[ https://developer.blender.org/diffusion/B/browse/blender2.8/source/blender/depsgraph/intern/depsgraph_query.cc;9e762693db15f815e93714ac018083676bc908f7$226 | an assert caused by the depsgraph not having run before running an operator.]])
In this case, I don't think its worth to try and workaround missing depsgraph updates, so this patch splits out the part of `wm_event_do_notifiers` that refreshes windows and updates the depsgraph and runs it before handling events.
Think its safe but posting the diff since it touches the mainloop and order of depsgraph execution on startup.