popupmenu.patch 1.2 KB

12345678910111213141516171819202122232425262728
  1. From dd8ca024254341258a9e54c253c080f25be6f9cd Mon Sep 17 00:00:00 2001
  2. From: Florian Müllner <fmuellner@gnome.org>
  3. Date: Tue, 14 May 2013 16:55:08 +0000
  4. Subject: PopupMenuManager: Fix child menus
  5. Since commit c84dc6254d2d65c, popup menus are closed automatically
  6. when another menu opens (to catch the case where a menu is opened
  7. by keyboard shortcut, which wasn't handled before). However in the
  8. case of child menus, both child and parent are expected to be visible,
  9. so handle this case explicitly.
  10. https://bugzilla.gnome.org/show_bug.cgi?id=699678
  11. ---
  12. diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
  13. index fc37dd8..ab6c795 100644
  14. --- a/js/ui/popupMenu.js
  15. +++ b/js/ui/popupMenu.js
  16. @@ -2124,7 +2124,7 @@ const PopupMenuManager = new Lang.Class({
  17. _onMenuOpenState: function(menu, open) {
  18. if (open) {
  19. - if (this.activeMenu)
  20. + if (this.activeMenu && !this.activeMenu.isChildMenu(menu))
  21. this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
  22. this._grabHelper.grab({ actor: menu.actor, modal: true, focus: menu.sourceActor,
  23. onUngrab: Lang.bind(this, this._closeMenu, menu) });
  24. --
  25. cgit v0.9.1