summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/ui/panel.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/ui/panel.js b/js/ui/panel.js
index b168907de..272368a4b 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -591,14 +591,19 @@ class PanelCorner extends St.DrawingArea {
button = this._findRightmostButton(box);
if (button) {
- if (this._button && this._buttonStyleChangedSignalId) {
- this._button.disconnect(this._buttonStyleChangedSignalId);
- this._button.style = null;
+ if (this._button) {
+ if (this._buttonStyleChangedSignalId) {
+ this._button.disconnect(this._buttonStyleChangedSignalId);
+ this._button.style = null;
+ }
+
+ if (this._buttonDestroySignalId)
+ this._button.disconnect(this._buttonDestroySignalId);
}
this._button = button;
- button.connect('destroy', () => {
+ this._buttonDestroySignalId = button.connect('destroy', () => {
if (this._button == button) {
this._button = null;
this._buttonStyleChangedSignalId = 0;