Insert the application image at the head of the list. Work-around for

code (like found in Firefox) that relies on get_next_image_info() to
return it first.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-09-25 11:47:12 +00:00
parent 657a3676f9
commit 5def543d91
1 changed files with 7 additions and 1 deletions

View File

@ -78,7 +78,13 @@ register_image(struct team *team, image_info *_info, size_t size)
mutex_lock(&sImageMutex);
image->info.id = id;
list_add_item(&team->image_list, image);
// Add the app image to the head of the list. Some code relies on it being
// the first image to be returned by get_next_image_info().
if (image->info.type == B_APP_IMAGE)
list_add_link_to_head(&team->image_list, image);
else
list_add_item(&team->image_list, image);
sImageTable->Insert(image);
mutex_unlock(&sImageMutex);