Tkinter text widget scrolling uncontrollably under Wayland
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
Bug description:
On Gnome with Wayland (current Debian testing), resizing a Tk root window to increase the height causes a contained Text widget to scroll uncontrollably to the bottom of the widget. If the widget is scrolled while this is happening, it keeps scrolling back to the bottom.
Resizing the window again by decreasing the height or changing the width, or clicking inside the text widget, usually stops the issue.
This happens with both the mouse scrollwheel and the tkinter scrollbar.
This doesn't happen on Gnome using X, or on Windows 10. I haven't tested on any other systems.
Minimal example:
from tkinter import *
from random import choice
from string import ascii_letters
root = Tk()
textwidget = Text(root)
for i in range(1000):
textwidget.insert(END, f'{choice(ascii_letters)} ')
textwidget.pack(fill=BOTH, expand=True)
mainloop()
A screen-recording is attached using the above code and showing the issue, which occurs the third time the window is resized.
https://github.com/user-attachments/assets/964159fa-afdf-4885-ac74-d39ae003302c
I have no idea how to debug this in more depth, any suggestions welcomed.
CPython versions tested on:
3.13
Operating systems tested on:
Linux, Windows
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp hoặc bài kiểm thử nào trong repository được nêu. Trước tiên, hãy chạy ví dụ Tkinter tối thiểu trên GNOME với Wayland, sau đó so sánh việc thay đổi kích thước và cuộn trên X theo các bước tái hiện đã được báo cáo. Được xem là hoàn tất khi việc thay đổi kích thước không còn buộc widget Text xuống cuối hoặc ghi đè thao tác cuộn của người dùng trên Wayland.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- desktop
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100