Skip to content

Commit a565cae

Browse files
committed
Fix clap resize hints for hosts that ask before creating the UI
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 5d2c29f commit a565cae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

distrho/src/DistrhoPluginCLAP.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* DISTRHO Plugin Framework (DPF)
3-
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com>
3+
* Copyright (C) 2012-2025 Filipe Coelho <falktx@falktx.com>
44
*
55
* Permission to use, copy, modify, and/or distribute this software for any purpose with
66
* or without fee is hereby granted, provided that the above copyright notice and this
@@ -314,7 +314,7 @@ class ClapUI : public DGL_NAMESPACE::IdleCallback
314314

315315
bool getResizeHints(clap_gui_resize_hints_t* const hints) const
316316
{
317-
if (canResize())
317+
if (fUI != nullptr && fUI->isResizable())
318318
{
319319
uint minimumWidth, minimumHeight;
320320
bool keepAspectRatio;
@@ -346,7 +346,7 @@ class ClapUI : public DGL_NAMESPACE::IdleCallback
346346

347347
bool adjustSize(uint32_t* const width, uint32_t* const height) const
348348
{
349-
if (canResize())
349+
if (fUI != nullptr && fUI->isResizable())
350350
{
351351
uint minimumWidth, minimumHeight;
352352
bool keepAspectRatio;

0 commit comments

Comments
 (0)