Skip to content

Commit

Permalink
dialogs: Re-enable panels on destroy
Browse files Browse the repository at this point in the history
If we only do it on close() we're missing some use cases.

For instance:

- Right-click an applet
- Choose to remove it
- Click No.

Before this commit, the panel wasn't coming back.
  • Loading branch information
clefebvre committed Jan 2, 2025
1 parent 09b9d13 commit e3dbc51
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions js/ui/modalDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ var ModalDialog = GObject.registerClass({
this._cinnamonReactive = params.cinnamonReactive;
this._destroyOnClose = params.destroyOnClose;

this.connect('destroy', this._onDestroy.bind(this));

Main.layoutManager.modalDialogGroup.add_child(this);

let constraint = new Clutter.BindConstraint({
Expand Down Expand Up @@ -369,6 +371,16 @@ var ModalDialog = GObject.registerClass({
}
});
}

/**
* _onDestroy:
*
* This is called when the dialog actor is destroyed, either
* by destroying its container or by explicitly calling this.destroy().
*/
_onDestroy() {
Main.panelManager.enablePanels();
}
});

/**
Expand Down

0 comments on commit e3dbc51

Please sign in to comment.