diff --git a/dgl/src/TopLevelWidgetPrivateData.cpp b/dgl/src/TopLevelWidgetPrivateData.cpp index 02c2a0b8a..ebdce51fa 100644 --- a/dgl/src/TopLevelWidgetPrivateData.cpp +++ b/dgl/src/TopLevelWidgetPrivateData.cpp @@ -135,9 +135,9 @@ bool TopLevelWidget::PrivateData::scrollEvent(const ScrollEvent& ev) return selfw->pData->giveScrollEventForSubWidgets(rev); } -void TopLevelWidget::PrivateData::fallbackOnResize() +void TopLevelWidget::PrivateData::fallbackOnResize(const uint width, const uint height) { - puglFallbackOnResize(window.pData->view); + puglFallbackOnResize(window.pData->view, width, height); } // ----------------------------------------------------------------------- diff --git a/dgl/src/TopLevelWidgetPrivateData.hpp b/dgl/src/TopLevelWidgetPrivateData.hpp index fb4e77b2f..21060d2f4 100644 --- a/dgl/src/TopLevelWidgetPrivateData.hpp +++ b/dgl/src/TopLevelWidgetPrivateData.hpp @@ -38,7 +38,7 @@ struct TopLevelWidget::PrivateData { bool mouseEvent(const MouseEvent& ev); bool motionEvent(const MotionEvent& ev); bool scrollEvent(const ScrollEvent& ev); - void fallbackOnResize(); + void fallbackOnResize(uint width, uint height); DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PrivateData) }; diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index b0d5f8238..b30ffdddb 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2022 Filipe Coelho + * Copyright (C) 2012-2023 Filipe Coelho * * 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 @@ -537,10 +537,10 @@ void Window::onFocus(bool, CrossingMode) { } -void Window::onReshape(uint, uint) +void Window::onReshape(const uint width, const uint height) { if (pData->view != nullptr) - puglFallbackOnResize(pData->view); + puglFallbackOnResize(pData->view, width, height); } void Window::onScaleFactorChanged(double) diff --git a/dgl/src/pugl.cpp b/dgl/src/pugl.cpp index 4c84b97f4..cc26bebd8 100644 --- a/dgl/src/pugl.cpp +++ b/dgl/src/pugl.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2022 Filipe Coelho + * Copyright (C) 2012-2023 Filipe Coelho * * 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 @@ -452,7 +452,7 @@ void puglOnDisplayPrepare(PuglView*) // -------------------------------------------------------------------------------------------------------------------- // DGL specific, build-specific fallback resize -void puglFallbackOnResize(PuglView* const view) +void puglFallbackOnResize(PuglView* const view, uint, uint) { #ifdef DGL_OPENGL glEnable(GL_BLEND); @@ -624,6 +624,9 @@ void puglWin32ShowCentered(PuglView* const view) #elif defined(HAVE_X11) +// -------------------------------------------------------------------------------------------------------------------- +// X11 specific, update world without triggering exposure events + PuglStatus puglX11UpdateWithoutExposures(PuglWorld* const world) { const bool wasDispatchingEvents = world->impl->dispatchingEvents; diff --git a/dgl/src/pugl.hpp b/dgl/src/pugl.hpp index 244adc5d2..b7e8e5a36 100644 --- a/dgl/src/pugl.hpp +++ b/dgl/src/pugl.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2022 Filipe Coelho + * Copyright (C) 2012-2023 Filipe Coelho * * 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 @@ -19,7 +19,7 @@ #include "../Base.hpp" -/* we will include all header files used in pugl.h in their C++ friendly form, then pugl stuff in custom namespace */ +// we will include all header files used in pugl.h in their C++ friendly form, then pugl stuff in custom namespace #include #ifdef DISTRHO_PROPER_CPP11_SUPPORT # include @@ -71,7 +71,7 @@ PuglStatus puglSetSizeAndDefault(PuglView* view, uint width, uint height); void puglOnDisplayPrepare(PuglView* view); // DGL specific, build-specific fallback resize -void puglFallbackOnResize(PuglView* view); +void puglFallbackOnResize(PuglView* view, uint width, uint height); #if defined(DISTRHO_OS_HAIKU) @@ -104,7 +104,7 @@ void puglWin32ShowCentered(PuglView* view); #define DGL_USING_X11 -// X11 specific, update world without triggering exposure evente +// X11 specific, update world without triggering exposure events PuglStatus puglX11UpdateWithoutExposures(PuglWorld* world); // X11 specific, set dialog window type and pid hints diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp index 6b436e692..5f0527cc6 100644 --- a/distrho/src/DistrhoUI.cpp +++ b/distrho/src/DistrhoUI.cpp @@ -404,10 +404,10 @@ void UI::uiFocus(bool, DGL_NAMESPACE::CrossingMode) { } -void UI::uiReshape(uint, uint) +void UI::uiReshape(const uint width, const uint height) { // NOTE this must be the same as Window::onReshape - pData->fallbackOnResize(); + pData->fallbackOnResize(width, height); } #endif // !DISTRHO_PLUGIN_HAS_EXTERNAL_UI