#14767: Mail app briefly blocks window in some circumstances
-------------------------------+------------------------------
Reporter: anevilyak | Owner: czeidler
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/Mail | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
-------------------------------+------------------------------
When a new mail window is opened via the mail app, certain timing
circumstances can briefly cause window drawing to block for a second or so
on start. This is due to the following set of circumstances:
1) Spell check is enabled.
2) When the window is started, it checks this setting and immediately
posts a spell check BMessage if so.
3) after being shown, said message is processed. The first thing it does
is check if the application object has already loaded the dictionaries. If
not, it then initiates a 1.5 second snooze (!) on the window looper to
wait for that. This may or may not occur depending on how quickly the
dictionary load occurs, so this behavior is somewhat nondeterministic.
There are numerous problems here:
- The check simply looks if any dictionary whatsoever has been loaded,
which doesn't necessarily guarantee that it's the one for the correct
language.
- Obviously blocking the window this way is a no-no. Multiple possible
solutions present themselves there: 1) the window could instead create a
message runner to resend the message with a delay, and check again then
rather than blocking, or preferably 2) Something could be put in place
where the app notifies windows of dictionaries coming available via an
observer notice, which could then cause the spell check to be initiated.
Other solutions are entirely possible of course.
Note that this problem appears to originate from the original import of
the MDR code in 2004.
--
Ticket URL: <https://dev.haiku-os.org/ticket/14767>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.