Skip to content

destroy_context doesn't clean up the window #2173

Description

@dav0dea

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

Expected behavior

The window should close properly.

Standalone, minimal, complete and verifiable example

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions