One of the parts of #289 was to refactor signal handling so they would be delivered synchronusly to the main thread(as a 'special key'), avoiding these kind of checks all over the code. This PR doesn't refactor signal-handling code so it's very likely resizing is broken for now