This was done to avoid some nullptr references using
SkinTheme::instance() (mainly from
StatusBar::IndicatorsGeneration::add()) when the application is being
closed because an exception was thrown. This might be useful to detect
certain kind of crashes from Sentry.
There is a state where m_selected is pointing to an item that doesn't
exist in the current list of items. We didn't detect this on Debug
mode yet, but we've received one Sentry crash report about it.
Instead of using the window size, we can use the available workarea to
know that the user can resize the main window to its full size and
there will be enough room to display some common dialogs like the
Preferences one.
Before this fix, the Sprite:deleteLayer/Slice/etc() Lua functions
didn't warn the user if its argument (a layer/slice/etc) didn't belong
to the corresponding sprite.
Regression introduced in ed595eb6b1
calling MenuBox::setMenu() of the first child of a MenuBoxWindow when
handling its kCloseMessage. The firstChild() was supposed to be a
MenuBox, but we didn't take care of the case when the MenuBox is
replaced with a View when scrollbars are needed (added by
add_scrollbars_if_needed()).
We can interpret a quick mouse down/up events (e.g. less than 250
milliseconds) as a simple click if the mouse doesn't move too much in
the middle of both events (e.g. a tiny rectangle of 7x7 pixels).
Some discussion about this: https://community.aseprite.org/t/12491/10
In this way we don't process any queued native message for the display
as it will be deleted. This could be a possible fix for some crashes
reported in set_native_cursor_on_all_displays() (#2907)
This fixes the following problem:
* Hide the Timeline, and restart the program
* Open a sprite with a lot of layers
* Show the Timeline
Without this fix, depending on the selected layer the scroll will be
invalid and the layer will not be displayed by default when the
Timeline appears.
Related to 229ded9642
Mainly for Line-like tools (which require the last mouse position
only). Related to #3119, possible fix for several performance issues
on Linux mainly.