Skip to content
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

Fix: Exception when closing native mode window on Windows #602

Merged
merged 2 commits into from
Mar 22, 2023
Merged

Fix: Exception when closing native mode window on Windows #602

merged 2 commits into from
Mar 22, 2023

Conversation

al-eax
Copy link
Contributor

@al-eax al-eax commented Mar 22, 2023

As described in #584 closing the webview window throws an AttributeError exception on Windows OS. This is caused by os.getpgid() which only exists on unix systems.

I replace the os.kill(os.getpgid(os.getpid()), signal.SIGTERM) method by _thread.interrupt_main().

To avoid polling is_set, the blocking method wait is used to wait until the shutdown event is triggered.

@falkoschindler falkoschindler added this to the v1.2.1 milestone Mar 22, 2023
Copy link
Member

@rodja rodja left a comment

Choose a reason for hiding this comment

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

Wow. Thanks for the pull request. Works as expected and is much simpler than my hack with process ids.

@rodja rodja linked an issue Mar 22, 2023 that may be closed by this pull request
@rodja rodja merged commit acafb58 into zauberzeug:main Mar 22, 2023
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.

Exception: close window in desktop mode on Windows
3 participants