Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 389797

Summary: Activate event events are not fired for controls
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M3   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2012-09-18 05:16:56 EDT
The follwing does not work in RWT:

    button.addListener( SWT.Activate, new Listener() {
      public void handleEvent( Event event ) {
        button.setText( "Active" );
      }
    } );

The client does not send any activation events to the server. It works fine SWT. I'm not sure when this bug was introduced.
Comment 1 Ivan Furnadjiev CLA 2012-10-03 09:31:19 EDT
Today I looked at the client-side code (Shell.js) and the problem is the following. Event is fired *only* if Shell.js#_isRelevantActivateEvent returns true. This method works fine for composites (when activate listener is attached to a composite), but not for a simple controls like buttons. For buttons in Shell.js#_isRelevantActivateEvent listeningWidget === widget and this method *always* returns false. One possible solution is to add additional condition in the if statement for exactly this case: listeningWidget === widget. I've checked all RAP releases from 1.1 to 1.5 and this issue is valid for all of them - no regression.
Comment 2 Ivan Furnadjiev CLA 2012-10-19 11:31:08 EDT
Fixed in master with the changes for bug 390419.