Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353891 - [UICallback] Selecting cancel on ProgressDialog does not close dialog
Summary: [UICallback] Selecting cancel on ProgressDialog does not close dialog
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 1.5 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 10:18 EDT by Tim Buschtoens CLA
Modified: 2011-09-26 06:08 EDT (History)
0 users

See Also:


Attachments
Draft patch (10.32 KB, patch)
2011-09-22 03:47 EDT, Rüdiger Herrmann CLA
no flags Details | Diff
Fix (12.62 KB, patch)
2011-09-26 05:56 EDT, Rüdiger Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.