* PoseView waited for 200 ms after a B_META_MIME_CHANGED message was evaluated

to give other windows the opportunity to mark the icon invalid before
  recaching it.
* Since we currently update all app MIME types on first boot, over 400 messages
  are generated, so that delay easily caused the message queue to get full.
* I've now reduced the wait to 10 ms, and also call BWindow::UpdateIfNeeded()
  afterwards, which empties the message port, too. This fixes bug #2212.
* Note though, this should be handled completely different to make it really
  work right.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25719 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-05-30 09:10:53 +00:00
parent 873066a8e1
commit 9abdb2222c

View File

@ -4678,7 +4678,9 @@ BPoseView::MetaMimeChanged(const char *type, const char *preferredApp)
IconCache::sIconCache->IconChanged(type, preferredApp);
// wait for other windows to do the same before we start
// updating poses which causes icon recaching
snooze(200000);
// TODO: this is a design problem that should be solved differently
snooze(10000);
Window()->UpdateIfNeeded();
EachPoseAndResolvedModel(fPoseList, &OneMetaMimeChanged, this, type);
}