Tool idle event and trace bug fixes
Long standing disable of idle events when they are needed. Steps to recreate: * Create a sprite with a palette * Paint a little with any brush tool * Go to Paint > Edit palette to open the colour picker (ensuring that the menu tree, the mouse, and the colour picker are within the bounds of the sprite view being painted) * Collapse the menu tree and carry on painting with the brush tool The brush tool now only produces output on click, not drag. This is because the idle events are no longer enabled, they were lost in merely opening the picker. "oh god a sprite window's gone walkies" observed in trace during development. Triggered when sprwindow_delete() is called when there's only one sprite window and you close it. This is because of an earlier change which commented out beforeus = /*(main_sprite_window *) &*/us->sprite->windows; The additional addressof operation would have introduced one extra iteration to the loop that followed (with the beforeus->link variable at offset 0, it would just dereference the pointer on the first iteration). Now the case of beforeus == us is explicitly checked. Submission for the Paint bounty.
Showing with 28 additions and 8 deletions