[chromium-dev] Re: [Chrome-team] Re: [Mac] Something is eating the right mouse button events in the Toolbar. Help!

2010-01-11 Thread Mike Pinkerton
Can you compare what happens when you right-click on the omnibox vs. a
bookmark button? It might be interesting to see where/how those stacks
differ.

On Mon, Jan 11, 2010 at 2:55 PM, Andrew Bonventre andyb...@chromium.org wrote:
 Wrong list. Oops.

 On Mon, Jan 11, 2010 at 2:50 PM, Andrew Bonventre (Bons)
 andyb...@google.com wrote:
 I'm attempting to add context menus to Browser Action buttons within
 the toolbar, but I've hit a snag and cannot for the life of me figure
 out what is happening with my events...

 - (void)onRightMouseDown:(NSEvent*)theEvent; is never being called
 within my NSButton subclass, and in fact, any other portion of the
 Toolbar controller except for the Omnibar. I've tried overloading the
 function within BrowserActionButton, ToolbarController and
 ToolbarView, only to never have it called. In order to track down the
 codepath for a right mouse down event that _does_ work in the toolbar,
 I got a stacktrace of the context menu code within the Omnibar:

 #0      0x001c7454 in -[AutocompleteTextFieldEditor menuForEvent:] at
 autocomplete_text_field_editor.mm:89
 #1      0x92ecf0ae in -[NSView rightMouseDown:]
 #2      0x92e3e1ef in -[NSTextView rightMouseDown:]
 #3      0x929adfe0 in -[NSWindow sendEvent:]
 #4      0x001f6c58 in -[ChromeEventProcessingWindow sendEvent:] at
 chrome_event_processing_window.mm:101
 #5      0x001f58a7 in -[ChromeBrowserWindow sendEvent:] at
 chrome_browser_window.mm:300
 #6      0x928c6b2f in -[NSApplication sendEvent:]
 #7      0x0078b18a in -[CrApplication sendEvent:] at 
 chrome_application_mac.mm:33
 #8      0x9285a4ff in -[NSApplication run]
 ...

 I have confirmed that -[ChromeEventProcessingWindow sendEvent:] IS
 being called on right mouse clicks and therefore NSWindow's sendEvent
 is being called.

 Any ideas would be greatly appreciated. Something is eating them up
 and I don't know what's going on.

 A


 --
 You received this message because you are subscribed to the Google Groups 
 Chrome-team group.
 To post to this group, send email to chrome-t...@google.com.
 To unsubscribe from this group, send email to 
 chrome-team+unsubscr...@google.com.
 For more options, visit this group at 
 http://groups.google.com/a/google.com/group/chrome-team/?hl=en.







-- 
Mike Pinkerton
Mac Weenie
pinker...@google.com
-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev

[chromium-dev] Re: [Chrome-team] Re: [Mac] Something is eating the right mouse button events in the Toolbar. Help!

2010-01-11 Thread Drew Wilson
Are you adding application-custom context menus, or is this a static context
menu provided by the browser? I ask, because I'm looking at adding custom
context-menu functionality for extension systray UI, and I'd like to see
what kind of API you came up with.

-atw

On Mon, Jan 11, 2010 at 11:55 AM, Andrew Bonventre andyb...@chromium.orgwrote:

 Wrong list. Oops.

 On Mon, Jan 11, 2010 at 2:50 PM, Andrew Bonventre (Bons)
 andyb...@google.com wrote:
  I'm attempting to add context menus to Browser Action buttons within
  the toolbar, but I've hit a snag and cannot for the life of me figure
  out what is happening with my events...
 
  - (void)onRightMouseDown:(NSEvent*)theEvent; is never being called
  within my NSButton subclass, and in fact, any other portion of the
  Toolbar controller except for the Omnibar. I've tried overloading the
  function within BrowserActionButton, ToolbarController and
  ToolbarView, only to never have it called. In order to track down the
  codepath for a right mouse down event that _does_ work in the toolbar,
  I got a stacktrace of the context menu code within the Omnibar:
 
  #0  0x001c7454 in -[AutocompleteTextFieldEditor menuForEvent:] at
  autocomplete_text_field_editor.mm:89
  #1  0x92ecf0ae in -[NSView rightMouseDown:]
  #2  0x92e3e1ef in -[NSTextView rightMouseDown:]
  #3  0x929adfe0 in -[NSWindow sendEvent:]
  #4  0x001f6c58 in -[ChromeEventProcessingWindow sendEvent:] at
  chrome_event_processing_window.mm:101
  #5  0x001f58a7 in -[ChromeBrowserWindow sendEvent:] at
  chrome_browser_window.mm:300
  #6  0x928c6b2f in -[NSApplication sendEvent:]
  #7  0x0078b18a in -[CrApplication sendEvent:] at
 chrome_application_mac.mm:33
  #8  0x9285a4ff in -[NSApplication run]
  ...
 
  I have confirmed that -[ChromeEventProcessingWindow sendEvent:] IS
  being called on right mouse clicks and therefore NSWindow's sendEvent
  is being called.
 
  Any ideas would be greatly appreciated. Something is eating them up
  and I don't know what's going on.
 
  A
 

 --
 You received this message because you are subscribed to the Google Groups
 Chrome-team group.
 To post to this group, send email to chrome-t...@google.com.
 To unsubscribe from this group, send email to
 chrome-team+unsubscr...@google.com chrome-team%2bunsubscr...@google.com.
 For more options, visit this group at
 http://groups.google.com/a/google.com/group/chrome-team/?hl=en.




-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev