Skip to content

Commit 4866603

Browse files
Make pinned windows not close on right-click
1 parent afae67c commit 4866603

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

libs/s25main/WindowManager.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,12 @@ void WindowManager::Msg_RightDown(const MouseCoords& mc)
421421
}
422422
if(foundWindow)
423423
{
424-
// Close it if requested
424+
// Close it if requested (unless pinned)
425425
if(foundWindow->getCloseBehavior() == CloseBehavior::Regular)
426-
foundWindow->Close();
427-
else
426+
{
427+
if(!foundWindow->IsPinned())
428+
foundWindow->Close();
429+
} else
428430
{
429431
SetActiveWindow(*foundWindow);
430432
foundWindow->Msg_RightDown(mc);

0 commit comments

Comments
 (0)