Skip to content

Commit

Permalink
Can close Window with middle mouse mouse on window tab
Browse files Browse the repository at this point in the history
  • Loading branch information
thennequin committed Dec 18, 2015
1 parent b91c1a5 commit 9bfbaf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ImWindow/ImwContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,10 @@ namespace ImWindow
pWindowManager->StartDragWindow(*it, oOffset);
}
}
else if (ImGui::IsItemHovered() && (*it)->IsClosable() && ImGui::GetIO().MouseClicked[2])
{
(*it)->Destroy();
}

if (ImGui::BeginPopupContextItem("TabMenu"))
{
Expand Down

0 comments on commit 9bfbaf7

Please sign in to comment.