We have an SWT application which does a time consuming calculation when pressing a button and after that opens a new window. The calculation is done in the UI thread (which is not very nice, but it is a legacy application), so during operation the window is frozen. Usually on completion of the job the new window is repainted correctly. But if the application is run on Windows 7 an I connect to that computer using Windows remote desktop, after finishing the operation the new window sometimes is not painted correctly. This happens when I do the following:

Press the calculation button

Switch to another window which overlaps my application

Switch back to my application (which is still not responding)

Wait for the calculation to be finished.

The new window opens, but the content is not painted correctly.

After minimizing and restoring the window, the repaint is done correctly.

One solution would be to set maximum details in the remote desktop settings. But this takes too much bandwidth.

I tested with SWT versions 3.4.1, 3.6.1, and 4.2.1 and remote connection from XP->Windows 7 as well as Windows 7->Windows 7.

Right afer opening the new window with shell.open() I added a shell.redraw(). Could have thought about that earlier ;-)

bla

Thank you!

EDIT:

Unfortunately this did not the trick in all situations. It works only if I switch back to my application before the title bar shows the text "(Not responding)". Switching back when "(Not responding)" is already indicated in the title bar, the behaviour is as before.