gh-154511: IDLE - Update mousewheel event handling #154512
Conversation
Move x11_buttons boolean and wheel_event function to util.py. Move test to test_util.
|
Quick manual checks on linux and macOS would be nice: load a non-trivial file such as editor.py and scroll up and down. Scrolling in a sidebar should not be affected by this PR. Open a module browser and expand enough to scroll both over the items and in the blank space. @StanFromIreland I forget whether you have mac or only linux. EDIT: I have done the above on Windows and the unittest is system independent, as it patches the x11 indicator (which Serhiy wrote and tested on x11.) |
Only Linux, maybe ask a Mac expert to test it on a Mac. |
| # On X11, Tk 8.6- signals mouse wheel rotations with <Button-4> and | ||
| # <Button-5> events. With 8.7+, it generates <Mousewheel events | ||
| # as on other systems. Used here, editor, tree, and test_sidebar. | ||
| x11_buttons = (tkinter.BaseWidget._windowingsystem == 'x11' and |
There was a problem hiding this comment.
Bug: x11_buttons is always false.
_windowingsystem is a property, and it's accessed here on the class, not an instance.
Uh oh!
There was an error while loading. Please reload this page.