| Summary: | [Win32] Opening a FileDialog resets radio buttons | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nikita Nemkin <nikita> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | dominik, paul-eclipse | ||||
| Version: | 4.15 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 10 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Nikita Nemkin
Yes. See also bug 558015. From what I found so far it is a regression from bug 297510 because the savedFocus can contain the wrong radio button. If you move the push button above the radio buttons, the radio buttons won't reset. (In reply to Paul Pazderski from comment #1) > Yes. See also bug 558015. > > From what I found so far it is a regression from bug 297510 because the > savedFocus can contain the wrong radio button. This might be a duplicate of Bug 558015, I'll investigate. From my testing, the issue is that SWT can't properly save focus because GetFocus() in WM_ACTIVATE is zero. If the focus isn't saved, it falls on the first control in the tab order, which is a radio button. It doesn't feel like SWT bug, more like some weird interaction between dialogs and focus. (In reply to Nikita Nemkin from comment #3) > (In reply to Paul Pazderski from comment #1) > > Yes. See also bug 558015. > > > > From what I found so far it is a regression from bug 297510 because the > > savedFocus can contain the wrong radio button. > > This might be a duplicate of Bug 558015, I'll investigate. I would be surprised if not. > From my testing, the issue is that SWT can't properly save focus because > GetFocus() in WM_ACTIVATE is zero. Saw the same but couldn't find a reason. > It doesn't feel like SWT bug, more like some weird interaction between > dialogs and focus. Well I wouldn't disagree but I bisected the problem (for bug 558015) and it worked (maybe by luck) before bug 297510. I uploaded what I have tried as fix in bug 558015. https://git.eclipse.org/r/157366 It basically restores the special focus handling for radio button removed with bug 297510. (In reply to Paul Pazderski from comment #4) > > From my testing, the issue is that SWT can't properly save focus because > > GetFocus() in WM_ACTIVATE is zero. > > Saw the same but couldn't find a reason. Here's the reason, from CFileOpenSave::Show in comdlg32.dll v48 = GetFocus(); v110 = v48; if ( !(unsigned int)SHIsChildOrSelf(hWnd, v48) ) { v94 = 1; SetFocus(0i64); } No idea why they are doing this. Maybe just to make us miserable... > > It doesn't feel like SWT bug, more like some weird interaction between > > dialogs and focus. > > Well I wouldn't disagree but I bisected the problem (for bug 558015) and it > worked (maybe by luck) before bug 297510. > > I uploaded what I have tried as fix in bug 558015. > https://git.eclipse.org/r/157366 > It basically restores the special focus handling for radio button removed > with bug 297510. Do you think your patch is still necessary if we fix focus saving? I mean, if we save focus for a radio button, it has to be selected already, so restoring it to selected state is fine. Is focused but unselected radio button possible at all? That special radio focus was added in Bug 93870, but I can't reproduce the original problem. Focus saving isn't difficult to fix. I think an extra saveFocus() in WM_KILLFOCUS (when the target is zero) will do the trick. *** This bug has been marked as a duplicate of bug 558015 *** |