FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-119459: Fix HiDPI blurring of every program window that using tkinter by Wulian233 · Pull Request #119902 · python/cpython · GitHub

/ cpython Public

gh-119459: Fix HiDPI blurring of every program window that using tkinter - #119902

Closed
Wulian233 wants to merge 8 commits into
python:mainfrom
Wulian233:pr
Closed

gh-119459: Fix HiDPI blurring of every program window that using tkinter#119902
Wulian233 wants to merge 8 commits into
python:mainfrom
Wulian233:pr

Conversation

Wulian233 commented Jun 1, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Refer #119459 , we believe this is a tk/tkinter bug that should be fixed in tkinter. In this PR, I added the fix code to tkinter/__init__.py, which fixes the window blurring problem that every program that uses tkinter has. Since I had already committed fix for turtledemo and terryjreedy fix IDLE earlier, I removed them here. Also #119175 was backported to 3.12 3.13 and I think this PR should be as well.

↓Fix

Comment thread Lib/tkinter/__init__.py Outdated
Comment thread Lib/tkinter/__init__.py Outdated
Comment thread Lib/tkinter/__init__.py
# CALL BEFORE ANY TK OPERATIONS!
# URL for arguments for the ...Awareness call below.
# https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx
if sys.platform == 'win32':

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

In my humble opinion, can you guarantee that this code will not be called repeatedly? Maybe it only needs to be called once?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Add a print statement to your code and just try the code below:

from tkinter import messagebox

messagebox.showinfo("info", "test")
messagebox.showinfo("info", "test")

Then you'll find that it runs twice.

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 16, 2026
Wulian233 closed this Aug 15, 2026
Wulian233 deleted the pr branch August 15, 2026 07:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL