From dc264231c825d46354f50a692cf5a8ffeef3bd05 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 20 Apr 2011 08:58:30 +0200 Subject: [PATCH] open menu bar menus directly --- AppKit/CPMenu/_CPMenuManager.j | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/AppKit/CPMenu/_CPMenuManager.j b/AppKit/CPMenu/_CPMenuManager.j index a95bc5fba..15af786fb 100644 --- a/AppKit/CPMenu/_CPMenuManager.j +++ b/AppKit/CPMenu/_CPMenuManager.j @@ -243,9 +243,15 @@ var STICKY_TIME_INTERVAL = 500, // Close the current menu item because we are going to select a new one after a short delay [self showMenu:nil fromMenu:activeMenu atPoint:CGPointMakeZero()]; - _showTimerID = setTimeout(function() { + + if (![activeMenuContainer isMenuBar]) + { + _showTimerID = setTimeout(function() { + [self showMenu:[activeItem submenu] fromMenu:[activeItem menu] atPoint:newMenuOrigin]; + }, 250); + } + else [self showMenu:[activeItem submenu] fromMenu:[activeItem menu] atPoint:newMenuOrigin]; - }, 250); } }