Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6527109

Focus problems with two SWT_AWT components inside a single SWT shell

XMLWordPrintable

    • b15
    • generic
    • linux
    • Verified

      Launch the attached test on linux/solaris (SWT-GTK is required). The test creates an SWT top-level shell and adds three components to it: AWT text area, SWT text field and AWT text field. AWT components are laid to separate SWT_AWT composites (embedded frames).

      The first problem is that in some cases no one of the components is focused when the window is shown. According to the XEmbed log, SWT shell first sends XEMBED_FOCUS_IN to the text area and then to the text field, so I expect the text field to be focused. However, only two cases are possible: focus is nowhere or focus is in the text area - both are wrong.

      Then, when focus is initially in the text area, the second problem appears. If I click the text field with mouse, it doesn't get focused. But if I click the SWT text area first, then focus starts working properly.

            son Oleg Sukhodolsky (Inactive)
            art Artem Ananiev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: