X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fui%2Fmessage_center%2Fcocoa%2Fpopup_collection.mm;h=adc4f6216d6a7e020870ac4ff2ead79db224d62a;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=fb220199a341538f6f47c0ad901362555819f651;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ui/message_center/cocoa/popup_collection.mm b/src/ui/message_center/cocoa/popup_collection.mm index fb22019..adc4f62 100644 --- a/src/ui/message_center/cocoa/popup_collection.mm +++ b/src/ui/message_center/cocoa/popup_collection.mm @@ -191,7 +191,8 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver { bounds.origin.y = y; [popup showWithAnimation:bounds]; [popups_ addObject:popup]; - messageCenter_->DisplayedNotification(notification->id()); + messageCenter_->DisplayedNotification( + notification->id(), message_center::DISPLAY_SOURCE_POPUP); return YES; } @@ -201,9 +202,11 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver { } - (void)updateNotification:(const std::string&)notificationID { - // The notification may not be on screen. - if ([self indexOfPopupWithNotificationID:notificationID] == NSNotFound) + // The notification may not be on screen. Create it if needed. + if ([self indexOfPopupWithNotificationID:notificationID] == NSNotFound) { + [self layoutNewNotifications]; return; + } // Don't bother with the update if the notification is going to be removed. if (pendingRemoveNotificationIDs_.find(notificationID) !=