Community
Participate
Working Groups
When you use the tab key to traverse the widgets, the CCombo fires two focusIn events when it has focus.
This also happens on Linux gtk. You must hook both the key listener and the focus listener to see the multiple focus-in.
Praveen, try to understand why there are two events coming in here.
Created attachment 131629 [details] Proposed patch During the tab traversal, the method traverseGroup() is responsible for traversing the focus to the next widget in the order. During this function, it checks whether key listeners are hooked to that widget and if so, focus is traversed to that widget. As CCombo is hooked with key listeners, we request to set the focus onto CCombo. Further, CCombo receives a FocusIn event(FocusGained is called on CCombo). While handling this event by CCombo, it actually assigns the focus to the Text widget contained in it(FocusLost is called on CCombo and FocusGained on Text widget contained by CCombo). Thus, extra FocusIn and FocusOut events are received by CCombo. The fix is to make sure that focus should not be set directly on CCombo when key listeners are hooked on it, rather the focus should be set on the text widget contained by CCombo.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.