Skip to content

Commit

Permalink
Traktor: Restore maximized window when dragging caption bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed Jun 4, 2024
1 parent 44c729f commit 12ff9b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/Ui/CaptionBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ void CaptionBar::eventMouseButtonDown(MouseButtonDownEvent* event)
if (item != nullptr)
return;

Form* parentForm = dynamic_type_cast< Form* >(getAncestor());
if (!parentForm)
return;

if (parentForm->isMaximized())
parentForm->restore();

m_mousePosition = getParent()->clientToScreen(event->getPosition());
m_parentRect = getParent()->getRect();
m_haveCapture = true;
Expand Down

0 comments on commit 12ff9b4

Please sign in to comment.