mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
popupMenu: Use connectObject to disconnect when parent destroyed
Currently the handler is leaked, contributing to https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7143 , by using `connectObject` with the `owner` actor we avoid leaking `PopupMenuManager`s for things like the password entry in `AuthenticationDialog` Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7143
This commit is contained in:
parent
fe292ac941
commit
b6e2836c17
1 changed files with 2 additions and 2 deletions
|
|
@ -1276,7 +1276,7 @@ export class PopupMenuManager {
|
||||||
constructor(owner, grabParams) {
|
constructor(owner, grabParams) {
|
||||||
this._grabParams = Params.parse(grabParams,
|
this._grabParams = Params.parse(grabParams,
|
||||||
{actionMode: Shell.ActionMode.POPUP});
|
{actionMode: Shell.ActionMode.POPUP});
|
||||||
global.stage.connect('notify::key-focus', () => {
|
global.stage.connectObject('notify::key-focus', () => {
|
||||||
if (!this.activeMenu)
|
if (!this.activeMenu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -1285,7 +1285,7 @@ export class PopupMenuManager {
|
||||||
|
|
||||||
if (newMenu)
|
if (newMenu)
|
||||||
this._changeMenu(newMenu);
|
this._changeMenu(newMenu);
|
||||||
});
|
}, owner);
|
||||||
this._menus = [];
|
this._menus = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue