| Summary: | [Shell] Prevent application from having no active shells | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Tim Buschtoens <tbuschto> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | rsternberg, tbuschto |
| Version: | 1.5 | ||
| Target Milestone: | 1.5 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Tim Buschtoens
After a discussion with Ivan, we came to the conclusion that this case will likely never happen in SWT. An application will only receive events from the OS if one of it's shells has the keyboard focus. There seem to be two ways to solve this issue: a) be consistent with SWT and don't send any requests when no control is focused / no shell is active. In this case the last active shell would have to be deactivated. Currently, it stays active (title bar has blue background). b) prevent the last active shell from being deactivated by clicking on the document. As long as a shell is active, there should always be a focus control (a control or the shell itself). I'm in favor of b). b) +1 for b) too. The Shell is actually still active, it's just the focus that is now on the ClientDocument. I will fix this by changing the EventHandler.js to not set focus if ClientDocument has been clicked. Fixed in CVS HEAD as described above. Note that this is not the ideal solution. The document can still be focused in theory, just not by mouse (and probably not in practise). The best fix would have been to make ClientDocument explicitly non-focusable, which would require to deactivate it as a focus-root, and that would break a lot of test. |