bpo-15786: IDLE: Fix autocomletetion mouse click and freeze behavior#1517
bpo-15786: IDLE: Fix autocomletetion mouse click and freeze behavior#1517louisom wants to merge 6 commits into
Conversation
|
@lulouie, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kbkaiser, @terryjreedy and @Yhg1s to be potential reviewers. |
The root cause is we destory autocompletewindow to fast, thus tk can't focusOn widget, we should re-focus on widget first, then destory autocompletewindow.
|
@terryjreedy This fixed the MacOS freeze and double click disappear problem, please help to take a review |
terryjreedy
left a comment
There was a problem hiding this comment.
Trivial formatting change.
Does not solve issue on Windows.
| # This will be trigger when focus on widget or autocompletewindow | ||
| if self.is_active(): | ||
| self.hide_window() | ||
| if self.widget == self.widget.focus_get() or not self.widget.focus_get(): |
There was a problem hiding this comment.
2nd if is equivalent to 'and', and line is too long. This works and conforms to PEP8.
if (self.is_active() and
(self.widget == self.widget.focus_get()
or not self.widget.focus_get())):
self.hide_window()
| acw.wm_geometry("+%d+%d" % (new_x, new_y)) | ||
|
|
||
| def hide_event(self, event): | ||
| # This will be trigger when focus on widget or autocompletewindow |
There was a problem hiding this comment.
Make proper docstring, which I believe
"Hide autocomplete list if it exists and does not have focus."
|
I must admire your work in IDLE, terry. Tk has bunch of cross-platform holes. On windows it can't work is because somehow winconfig will be trigger multiple time (just like a infinity loop), and let Tk can't respond to Double-ButtonRelease. The fix will unbind winconfig_event when we are in the windows platform to prevent this problem. |
|
Close this issue and transfer to #1811 |
No description provided.