[Python-checkins] [python/cpython] 778b48: bpo-15786: IDLE: Fix mouse clicks on autocompletet...

GitHub noreply at github.com
Wed Jun 14 11:13:50 EDT 2017


  Branch: refs/heads/master
  Home:   https://github.com/python/cpython
  Commit: 778b484145edfd0d9b65129322d3295bed8eb71a
      https://github.com/python/cpython/commit/778b484145edfd0d9b65129322d3295bed8eb71a
  Author: mlouielu <git at louie.lu>
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
    M Lib/idlelib/autocomplete_w.py

  Log Message:
  -----------
  bpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811)

The root problem was non-check for hide_event. When user clicks
on autocomplete window (acw), root widget gets focusOut event, then triggers hide_window to
close the acw. It should only be hide when acw is active, and acw didn't
get focus at FocusOut event (this event bind on acw and widget), or when
widget get a ButtonPress event (this event only bind on widget).

MacOS  froze after double click on acw because when
doubleclick_event try to hide window at the end, hide_window function
destory whole acw, but tkinter didn't get focus back to widget. So set focus
on widget first, then destory acw.

Windows could not respond on double click event, because of the misbehavior
of Configure event.  When acw was shown, tkinter called winconfig
event multiple times.  That caused tkinter to not response to double
click event.  When on Windows, unbind Configure event first
time get into winconfig_event to prevent multiple call of this event.




More information about the Python-checkins mailing list