Skip to content

Force title bar redraw on Windows 10 when applying the "dark", "light", or "normal" styles and some tkinter window detection improvements#47

Open
Valer100 wants to merge 1 commit into
Akascape:mainfrom
Valer100:main
Open

Force title bar redraw on Windows 10 when applying the "dark", "light", or "normal" styles and some tkinter window detection improvements#47
Valer100 wants to merge 1 commit into
Akascape:mainfrom
Valer100:main

Conversation

@Valer100

Copy link
Copy Markdown

This PR addresses an issue on Windows 10 when the title bar isn't redrawing after applying the "dark", "light", or "normal" styles without resizing the window, changing its transparency, hiding and showing it again, etc... For fixing this, I'm toggling the window's nonclient area focus by sending the WM_NCACTIVATE message to the window and this forces the title bar to redraw without any problem.

I've also improved the hwnd retrieval process for tkinter windows to just call update() when the window isn't realized yet (after it's realized, calling update() is no longer needed and we can still get it's hwnd).

…", or "normal" style and call `update()` when getting a tkinter window's handle only if the window isn't realized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant