@@ -65,9 +65,18 @@ class CinnamonNotificationsApplet extends Applet.TextIconApplet {
6565
6666 _openMenu ( ) {
6767 this . _update_timestamp ( ) ;
68+
69+ this . notifications . forEach ( notification => {
70+ global . reparentActor ( notification . actor , this . _notificationbin ) ;
71+ } ) ;
72+
6873 this . menu . toggle ( ) ;
6974 }
7075
76+ _onMenuClosed ( ) {
77+ this . _notificationbin . remove_all_children ( ) ;
78+ }
79+
7180 _display ( ) {
7281 // Always start the applet empty, void of any notifications.
7382 this . set_applet_icon_symbolic_name ( "empty-notif" ) ;
@@ -138,8 +147,6 @@ class CinnamonNotificationsApplet extends Applet.TextIconApplet {
138147 if ( notification . _destroyed ) {
139148 this . notifications . splice ( existing_index , 1 ) ;
140149 } else {
141- notification . _inNotificationBin = true ;
142- global . reparentActor ( notification . actor , this . _notificationbin ) ;
143150 notification . _timeLabel . show ( ) ;
144151 }
145152 this . update_list ( ) ;
@@ -148,11 +155,8 @@ class CinnamonNotificationsApplet extends Applet.TextIconApplet {
148155 return ;
149156 }
150157 // Add notification to list.
151- notification . _inNotificationBin = true ;
152158 this . notifications . push ( notification ) ;
153- // Steal the notification panel.
154- this . _notificationbin . add ( notification . actor ) ;
155- notification . actor . _parent_container = this . _notificationbin ;
159+
156160 notification . actor . add_style_class_name ( 'notification-applet-padding' ) ;
157161 // Register for destruction.
158162 notification . connect ( 'scrolling-changed' , ( notif , scrolling ) => { this . menu . passEvents = scrolling } ) ;
0 commit comments