Tkinter text widget scrolling uncontrollably under Wayland
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se indica ningún archivo ni prueba del repositorio. Empieza ejecutando el ejemplo mínimo de Tkinter en GNOME con Wayland y, después, compara el redimensionamiento y el desplazamiento bajo X siguiendo los pasos de reproducción indicados. Se considera terminado cuando el redimensionamiento ya no fuerza el widget Text hasta la parte inferior ni anula el desplazamiento del usuario en Wayland.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- desktop
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100