Message293305
The reason why click on listbox will disappear is because we bind HIDE_VIRTUAL_EVENT with <focusOut> on widget.text. When click on listbox, it will focusOut the widget.text then focusOn listbox, thus trigger the hide process.
The reason why click on listbox and move the cursor out of box, then click will freeze IDLE cursor, it because tk will generate three event: FocusOut, FocusOut, and ButtonPress:
hidell <FocusOut event> generated by: .!listedtoplevel.!frame.text.!toplevel2.!listbox focus on: None
hidell <FocusOut event> generated by: .!listedtoplevel.!frame.text.!toplevel2 focus on: None
prove <ButtonPress event num=1 x=130 y=390> generated by: .!listedtoplevel.!frame.text focus on: .!listedtoplevel.!frame.text
Becase we bind HIDE process on widget.text, it will then trigger hide_window, and at the same time, FoucsOut event is still on the half-way, and then the listbox is destory and reset to None, I think this is why it will freeze until re-focus on IDEL.
Attach PR solve this problem, it re-bind the HIDE process from widget.text to listbox, thus it will not trigger some race-contidion when destroying autocompletewindow. |
|
Date |
User |
Action |
Args |
2017-05-09 13:05:22 | louielu | set | recipients:
+ louielu, terry.reedy, taleinat, ned.deily, roger.serwy, markroseman, Al.Sweigart, serhiy.storchaka, littleq0903, suddha.sourav, paulsfo |
2017-05-09 13:05:22 | louielu | set | messageid: <1494335122.37.0.945221406107.issue15786@psf.upfronthosting.co.za> |
2017-05-09 13:05:22 | louielu | link | issue15786 messages |
2017-05-09 13:05:22 | louielu | create | |
|