Skip to content

Commit

Permalink
Don't create Window handle when destroyed or without a parent.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Jun 15, 2024
1 parent 9043952 commit 20fc069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ywindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void YWindow::readAttributes() {
}

Window YWindow::create() {
if (flags & wfCreated)
if (flags & (wfCreated | wfDestroyed) || fParent == nullptr)
return fHandle;

XSetWindowAttributes attributes = { 0, };
Expand Down

0 comments on commit 20fc069

Please sign in to comment.