Ok Michael asked er, where is it broken this morning.

So as he is making the official fix I'll supply a hack so that people  
don't loose their minds over the issue.
The offical fix will override all this, but it will get mac users back  
on track this morning.

First of all you need to do

InputEventSensor startup

so the class variables get initialized, the usual case of "sure my  
startup class method runs, doesn't it?"

Add this method

InputEventSensor>>processMenuEvent: evt
        | handler localCopyOfEvt |

        localCopyOfEvt := evt clone.
        handler := (HostSystemMenus
                defaultMenuBarForWindowIndex: (localCopyOfEvt at: 8))
                getHandlerForMenu: (localCopyOfEvt at: 3) item: (localCopyOfEvt 
at:  
4).
        [[handler handler value: localCopyOfEvt] ifError: [:err :rcvr | ]]  
forkAt: Processor activePriority.

Then alter processMouseEvent: so that it checks for EventTypeMenu types

InputEventSensor>>processMouseEvent: evt
        "process a mouse event, updating InputSensor state"

        (evt at: 1) = EventTypeMenu
                ifTrue: [self processMenuEvent: evt. nil].

        "Check if it is a mouse event"
        (evt at: 1) = EventTypeMouse
                ifFalse: [^evt].

        "Update state for polling calls"
        mousePosition := (evt at: 3) @ (evt at: 4).
        modifiers := evt at: 6.

        "Map button state depending on meta keys pressed"
        mouseButtons := evt at: 5.
        
        "Return the event so we can use this method inline in peek and next"
        ^evt


--
= 
= 
= 
========================================================================
John M. McIntosh <[email protected]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
= 
= 
= 
========================================================================




_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to