File tree Expand file tree Collapse file tree
files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ var AppGroup = class AppGroup {
8686 pressed : true
8787 } ) ;
8888
89- this . groupState . connect ( {
89+ this . groupStateConnectionId = this . groupState . connect ( {
9090 isFavoriteApp : ( ) => this . handleFavorite ( true ) ,
9191 getActor : ( ) => this . actor ,
9292 launchNewInstance : ( ...args ) => this . launchNewInstance ( ...args ) ,
@@ -1196,6 +1196,9 @@ var AppGroup = class AppGroup {
11961196 }
11971197
11981198 destroy ( skipRefCleanup ) {
1199+ if ( this . groupStateConnectionId ) {
1200+ this . groupState . disconnect ( this . groupStateConnectionId ) ;
1201+ }
11991202 this . signals . disconnectAllSignals ( ) ;
12001203 this . groupState . set ( { willUnmount : true } ) ;
12011204
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ class GroupedWindowListApplet extends Applet.Applet {
208208 // applet to avoid passing down the parent class down the constructor chain and creating circular references.
209209 // In addition to manual event emitting, store.js can emit updates on property changes when set through
210210 // store.set. Any keys emitted through store.trigger that are not declared here first will throw an error.
211- this . state . connect ( {
211+ this . stateConnectionId = this . state . connect ( {
212212 setSettingsValue : ( k , v ) => this . settings . setValue ( k , v ) ,
213213 getPanel : ( ) => ( this . panel ? this . panel : null ) ,
214214 getPanelHeight : ( ) => this . _panelHeight ,
@@ -428,6 +428,9 @@ class GroupedWindowListApplet extends Applet.Applet {
428428 workspace . destroy ( ) ;
429429 }
430430 } ) ;
431+ if ( this . stateConnectionId ) {
432+ this . state . disconnect ( this . stateConnectionId ) ;
433+ }
431434 this . settings . finalize ( ) ;
432435 unref ( this , RESERVE_KEYS ) ;
433436 MessageTray . extensionsHandlingNotifications -- ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const {RESERVE_KEYS} = Me.imports.constants;
1111var Workspace = class Workspace {
1212 constructor ( params ) {
1313 this . state = params . state ;
14- this . state . connect ( {
14+ this . stateConnectionId = this . state . connect ( {
1515 orientation : ( ) => this . on_orientation_changed ( false )
1616 } ) ;
1717 this . workspaceState = createStore ( {
@@ -421,6 +421,9 @@ var Workspace = class Workspace {
421421 }
422422
423423 destroy ( ) {
424+ if ( this . stateConnectionId ) {
425+ this . state . disconnect ( this . stateConnectionId ) ;
426+ }
424427 this . signals . disconnectAllSignals ( ) ;
425428 this . appGroups . forEach ( appGroup => appGroup . destroy ( ) ) ;
426429 this . workspaceState . destroy ( ) ;
You can’t perform that action at this time.
0 commit comments