Skip to content

Commit

Permalink
Fix rendering of subwidgets
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Aug 4, 2018
1 parent 5f3b6e5 commit d49366d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dgl/src/WidgetPrivateData.hpp
@@ -1,6 +1,6 @@
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
Expand Down Expand Up @@ -63,9 +63,9 @@ struct Widget::PrivateData {
subWidgets.clear();
}

void display(const uint width, const uint height)
void display(const uint width, const uint height, const bool renderingSubWidget)
{
if (skipDisplay || size.isInvalid() || ! visible)
if ((skipDisplay && ! renderingSubWidget) || size.isInvalid() || ! visible)
return;

bool needsDisableScissor = false;
Expand Down Expand Up @@ -123,7 +123,7 @@ struct Widget::PrivateData {
Widget* const widget(*it);
DISTRHO_SAFE_ASSERT_CONTINUE(widget->pData != this);

widget->pData->display(width, height);
widget->pData->display(width, height, true);
}
}

Expand Down
2 changes: 1 addition & 1 deletion dgl/src/Window.cpp
Expand Up @@ -723,7 +723,7 @@ struct Window::PrivateData {
FOR_EACH_WIDGET(it)
{
Widget* const widget(*it);
widget->pData->display(fWidth, fHeight);
widget->pData->display(fWidth, fHeight, false);
}

fSelf->onDisplayAfter();
Expand Down

0 comments on commit d49366d

Please sign in to comment.