hoffstadt / hoffstadt/DearPyGui

destroy_context doesn't clean up the window

Open
#2,173 19 comments 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 1.9.1
Operating System: Ubuntu 22.04 (KDE Plasma 5.27.7)

## My Issue

Calling `dpg.destroy_context()` doesn't close the window, but just makes it unresponsive.
This seems like a very basic thing, so maybe there's something wrong with my OS or window manager? It works as expected on my Windows 11 system.
I also tried a range of DPG versions, all of them have the same issue on my Linux system.

## To Reproduce

Run the code below and simply close the window by clicking on the x. The window doesn't close but just becomes unresponsive. It does unblock `dpg.start_dearpygui()`, calls `destroy_context` and goes into the while True loop as expected.

![image](https://github.com/hoffstadt/DearPyGui/assets/36135990/ba583068-24f5-4d12-8de5-c22fab301da1)

## Expected behavior

The window should close properly.

## Standalone, minimal, complete and verifiable example

```python
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="tutorial"):
dpg.add_text("Hello world")

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

print("window closed")

while True:
pass
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.