Community
Participate
Working Groups
20030114 i cannot select anything from any comboboxcelleditor on gtk - it either does not expand at all or expands and hides the list right away this affects the task list as well as java editor hovers pref page
Eclipse 20030120: The UI propertySheet example appears to be working correctly. I tried an SWT standalone example, it also worked. The hover preference page did not work, in my case the list was displayed, and I could select an entry but the property sheet did not reflect the change. Motif was fine. What version of linux and GTK are you using?
i think linux is RH 7.2 how do i check gtk version?
Using I20030121 I have verified the correct behaviour on both Windows XP and Motif. I have verified the incorrect behaviour on GTK. Not all ComboBoxCellEditor usage is broken. For example the use in the UI propertySheet example is correct, yet the two example mentioned by Adam are not working. Both Adam and I are using RH 7.2, I believe we are both using GTK 2.0.0. I have seen the same behavious on RH 8.0 (Grant's machine), not sure which release of Eclipse was running. Routing to SWT for further investigation.
RH 8.0 comes with GTK 2.0.6 which is the minimum requirement for SWT. Adam, what event are you detecting for hiding the cell editor? There is a bug on GTK that the focus lost event is sent from the CCOmbo when the list is popped down. I thought there was already a bug report about this but I can not find it now. Reminder to me - on GTK when the FocusLost event is sent, getFocusControl still returns the old focus widget not the widget that now has focus.
>Adam, what event are you detecting for hiding the cell editor? no idea, i don't do that from code - it's a 'user' bug report :)
Investigated differences between FocusIn and FocusOut on different platforms. Test Case: import org.eclipse.swt.*; import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class Bug29607 { public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display, SWT.SHELL_TRIM); shell.setLayout(new RowLayout()); Text b = new Text(shell, SWT.BORDER); b.setText("text 1"); b.addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent e) { System.out.println("Focus Gained "+e.widget+" control = "+display.getFocusControl()); } public void focusLost(FocusEvent e) { System.out.println("Focus Lost "+e.widget+" control = "+display.getFocusControl()); } }); b = new Text(shell, SWT.BORDER); b.setText("text 2"); b.addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent e) { System.out.println("Focus Gained "+e.widget+" control = "+display.getFocusControl()); } public void focusLost(FocusEvent e) { System.out.println("Focus Lost "+e.widget+" control = "+display.getFocusControl()); } }); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } Results: GTK Send: GTK Post: FocusGained T1 control = T1 FocusGained T1 control = T1 FocusLost T1 control = T1 FocusLost T1 control = T2 FocusGained T2 control = T2 FocusGained T2 control = T2 Motif Send: Motif Post: FocusGained T1 control = T1 FocusGained T1 control = T1 FocusLost T1 control = T1 FocusLost T1 control = T2 FocusGained T2 control = T2 FocusGained T2 control = T2 Windows Send: Windows Post: FocusGained T1 control = T1 FocusGained T1 control = T1 FocusLost T1 control = T2 FocusLost T1 control = T2 FocusGained T2 control = T2 FocusGained T2 control = T2 Mac Send: Mac Post: (no widget has focus to start with) (no widget has focus to start with) FocusGained T1 control = null FocusGained T1 control = T1 FocusLost T1 control = T1 FocusLost T1 control = T2 FocusGained T2 control = null FocusGained T2 control = T2
Fixed. Ran the getFocusControl in CCombo asynchronously. The issues with getFocusControl are discussed in bug report 4479.