Tkinter text widget scrolling uncontrollably under Wayland
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 77.2k
- Forks
- 35.9k
- Métriques de merge des PR
- Métriques de PR en attente
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Aucun fichier ni test du dépôt n’est indiqué. Commencez par exécuter l’exemple Tkinter minimal sous GNOME avec Wayland, puis comparez le redimensionnement et le défilement sous X en suivant les étapes de reproduction fournies. C’est terminé lorsque le redimensionnement ne force plus le widget Text jusqu’en bas et n’écrase plus le défilement de l’utilisateur sous Wayland.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- desktop
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100