mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue