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

Bug 353891

Summary: [UICallback] Selecting cancel on ProgressDialog does not close dialog
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 1.5   
Target Milestone: 1.5 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Draft patch
none
Fix none

Description Tim Buschtoens CLA 2011-08-04 10:18:14 EDT
To reproduce:
In controlsdemo go to "Dialogs", "ProgressDialog". Click "cancel" before progressbar is full. The dialog wont close. Not clear if its a bug in the demo or RWT.
Comment 1 Ivan Furnadjiev CLA 2011-08-04 12:33:28 EDT
I think that this bug is the same with bug 315418. My investigation shows the same symptoms - see bug 315418 comment #16.
Comment 2 Ivan Furnadjiev CLA 2011-08-04 12:40:06 EDT
Just for the record - in v14_Maintenance everything works fine.
Comment 3 Ralf Sternberg CLA 2011-08-05 10:27:47 EDT
Looks like we broke it during the UICallBack refactoring.
Comment 4 Rüdiger Herrmann CLA 2011-09-22 03:47:42 EDT
Created attachment 203819 [details]
Draft patch
Comment 5 Rüdiger Herrmann CLA 2011-09-26 05:56:49 EDT
Created attachment 203996 [details]
Fix

It took changes in two places to fix this bug. Display#wake() was broken in that it did only work if there was already a callback-request standing when waske() was invoked.
This patch changes the implementation of wake() in that now it works as if an empty runnable was passed to asyncExec().

In addition, Javascript code to deactivate the ui-callback is now only sent from the callback-request. Previously, ordinary ui-requests as well as callback-requests notified the client when the ui-calback was deactivated. This led to situations where the client stopped sending callback requests too early.
Comment 6 Rüdiger Herrmann CLA 2011-09-26 06:08:47 EDT
Applied patch from comment #5 to CVS HEAD.