Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE bindings for scrolling using buttons 4 and 5 should only apply to X11 #103820

Closed
chrstphrchvz opened this issue Apr 25, 2023 · 2 comments
Closed
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@chrstphrchvz
Copy link
Contributor

chrstphrchvz commented Apr 25, 2023

Bug report

On X11, vertical scrolling is conventionally done using events for mouse “buttons” 4 and 5. But on Win32 and Aqua, which have a dedicated event for scrolling (<MouseWheel> in Tk), buttons 4 and 5 correspond to additional hardware buttons present on some mice. Tk 8.6 and earlier do not abstract away these platform differences, so bindings in IDLE for scrolling should ignore buttons 4 and 5 on non-X11.

Accordingly, idlelib.idle_test.test_sidebar.ShellSidebarTest.test_mousewheel should be revised to check the windowing system, so that it correctly distinguishes between Aqua and XQuartz (which sys.platform == 'darwin' does not do), sends button 4/5 events on X11 only, and sends <MouseWheel> with the correct sign for delta on Aqua.

Tk 8.7 (TIP 474) will change mouse events to be consistent across windowing systems. This requires further revisions, but I imagine it is better to separately address issues for Tk ≤ 8.6 first.

Linked PRs

@terryjreedy
Copy link
Member

The topic-IDLE label makes sure I get notified.

serhiy-storchaka pushed a commit that referenced this issue Feb 2, 2024
…GH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 2, 2024
…on-X11 (pythonGH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
(cherry picked from commit d25d4ee)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 2, 2024
…on-X11 (pythonGH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
(cherry picked from commit d25d4ee)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
serhiy-storchaka pushed a commit that referenced this issue Feb 2, 2024
…non-X11 (GH-103821) (GH-114901)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
(cherry picked from commit d25d4ee)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
serhiy-storchaka pushed a commit that referenced this issue Feb 2, 2024
…non-X11 (GH-103821) (GH-114902)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
(cherry picked from commit d25d4ee)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
@serhiy-storchaka
Copy link
Member

Thank you for your contribution @chrstphrchvz. For this issue and for others, whose turn has not yet come to me.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…on-X11 (pythonGH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this issue Feb 14, 2024
…on-X11 (pythonGH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

3 participants