Tkinter text widget scrolling uncontrollably under Wayland
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Nenhum arquivo ou teste do repositório foi especificado. Comece executando o exemplo mínimo de Tkinter no GNOME com Wayland e, em seguida, compare o redimensionamento e a rolagem no X usando as etapas de reprodução relatadas. Está concluído quando o redimensionamento não força mais o widget Text para a parte inferior nem sobrescreve a rolagem do usuário no Wayland.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- desktop
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100