-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
python3.11 macOS Sonoma tkinter window elements not responding when mouse cursor was inside of tkinter during it's startup #110218
Comments
I cannot reproduce on Windows with 3.11 or 3.12. The window opens in one place and slides diagonally up left to its final position, which varies. I put cursor both at initial window position and within final position and clicks work either way. |
I suspect that this is a bug in tcl/tk in relation to macOS 14 and that we can do nothing here, other than for someone to check tk bug issues. |
@terryjreedy Thanks for testing. Done a quick lookup on tcltk bug tracker, no similar reported bug. I have tested with calling tcl directly. Since macOS builtin tcltk is not working (https://stackoverflow.com/a/57750910), I installed
This would increase the button text by 1 each time I click it. I cannot reproduce the problem using this method. This means it's probably problem with python binding to tcltk ( btw the brew version of python3 is also affected |
@terryjreedy turns out it only affects python3.11. Confirmed that this bug does not exist in 3.8, 3.9, 3.10 (Installed from brew with |
3.11 on Windows with PSF installer is fine. |
I've had this bug since updating to Mac OS 14.0 Sonoma. Sadly, it crops up for me even with python 3.10. I tried uninstalling and reinstalling Anaconda, creating new environments with python 3.10 and 3.11, but selecting elements in a list box or clicking on a button is hit-or-miss ever since the upgrade. |
I can reproduce this issue with Tcl/Tk 8.6.12 from the Python 3.11.6 installer, but not Tcl/Tk 8.6.13 from e.g. Homebrew. This issue sounds possibly related to https://core.tcl-lang.org/tk/info/10026855b7 whose reporter confirmed was no longer present in Tcl/Tk 8.6.13. I have not identified the upstream change which likely fixed this. |
Can confirm that this bug also occurs on arm64 Sonoma |
Is updating the Python 3.11 macOS installers to Tcl/Tk 8.6.13 an option? There were numerous changes to the Tk Aqua mouse event code between 8.6.12 and 8.6.13, so even if a specific change which fixed this issue is identified, it might not be something that can be directly patched in 8.6.12. |
It does seem that 8.6.13 fixes some issues like this one on macOS so, yes, updating the macOS 3.11 installers seems like a good idea. #110710 has been merged for release in 3.11.7. |
I have a user reporting this problem after upgrading to Sonoma. My app uses Python 3.10.11. |
Tkinter from Homebrew ( |
I also have this issue. I have been developing a very simple professional application for a client for some time now. Never had issues with unresponsive clicks or mouse events until I updated to sonoma a few weeks ago. I have an m1 macbook air and use python 3.11 installed thorugh homebrew. I also get a new error any time I run python code after updating my OS that says
however I think these are unrelated. I run windows through parallels on my mac and tkinter seems to work fine with the windows shell, only a mac sonoma problem. |
I had the same issue while running Sonoma/Python 3.10, updating to Python 3.12 using pyenv helped to solve the puzzle with unresponsive buttons. |
on macos 14.3.1, Python 3.9.6 tkinter demo working (responsive button), and 3.11 not working |
I believe it has to be 3.11.7 or greater
…On Sun, Sep 8, 2024, 12:54 AM Michael Sjöberg ***@***.***> wrote:
on macos 14.3.1, Python 3.9.6 tkinter demo working (responsive button),
and 3.11 not working
—
Reply to this email directly, view it on GitHub
<#110218 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIYO73GUDYKLGVG5GZLX3DZVP7EFAVCNFSM6AAAAAA5PLABCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGU4DMNJWGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I noticed that if you click at the window title while the buttons are not responding to mouse clicks, that after doing so they respond again on mouse clicks. It doesn't fix the problem but at least you can continue using Tk or CTk UI´s My system runs with macOS Sonoma 14.6.1 (M1) and Python 3.12.3 |
Bug report
Bug description:
If mouse cursor was inside of tkinter window when tkinter window is opening up, the widgets inside the window become unresponsive (e.g. Click on button not registered). This weird state is resolved when user drag the window, or leaving the tkinter window region for a while.
I discovered this bug in x86_64 macOS 14. I could not reproduce this behavior on arm64 macOS 13 (M1 mac mini)
Any tkinter GUI is affected, even for the demo
python3 -m tkinter
To reproduce:
python3 -m tkinter
CPython versions tested on:
3.11
Operating systems tested on:
macOS
The text was updated successfully, but these errors were encountered: