popupMenu: Avoid open state reentrancy in dummy menus
Dummy menus may emit ::open-state-changed multiple times for the same state. Avoid doing that so that the PopupMenuManager is happy not having to handle reentrancy. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5064 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2178>
This commit is contained in:
parent
57d681863a
commit
89db7bbb12
@ -994,10 +994,16 @@ var PopupDummyMenu = class {
|
||||
}
|
||||
|
||||
open() {
|
||||
if (this.isOpen)
|
||||
return;
|
||||
this.isOpen = true;
|
||||
this.emit('open-state-changed', true);
|
||||
}
|
||||
|
||||
close() {
|
||||
if (!this.isOpen)
|
||||
return;
|
||||
this.isOpen = false;
|
||||
this.emit('open-state-changed', false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user