What exactly is a floating window in clap? #142
-
Is it the plugin that just makes it own independent window? I would say that 99% percent of all crashes is that you don't make your own independent window. As the plugin creator doesn't know what the host does. And the host don't know what the plugin will do. And that's probably the one reason that audio plugins is related to the most caches in a modern computer without exception. And to not have example code in C code for is like begging for problems. As C++ hides away what code actually does in layer upon layers in class definitions. So no one has a clear understanding of what thing is supposed to actually do. That's why all libraries with more installations than humans in the world is C only, and with C example code, and that's why for example the Linux kernel is C only. And that gives people the freedom to use any language, and not just a subset of languages that is heavily reliant on C++. C code and C code examples, is the best way to kill of ambiguities that comes from reliance in hiding away the truth with C++. And with C++ examples only, people with end up in superstition about what things should be interpreted as, when different hosts and plugins start to crash each other. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
the documentation in include/clap/ext/gui.h answer your question but as you surmised, floating means the plugin makes its own window and set parent is never called, and non floating means the host makes a window and set parent is called. In the floating case set_transient may be called for window ordering hints. |
Beta Was this translation helpful? Give feedback.
-
An example use case for these floating windows is Wine plugin bridging. Wine windows don't like being embedded in other windows and you need a ton of hacks to make it work, so if both the host and the plugin supports these freestanding windows then you can skip the whole embedding part altogether for those plugins. Of course, hosts like REAPER that embed the plugin's editor inside of a window with more controls are unlikely to support these freestanding windows. |
Beta Was this translation helpful? Give feedback.
-
Do you know if any hosts support floating right now @robbert-vdh ? (I know none of the juce plugins implement it, nor does the clap saw demo). |
Beta Was this translation helpful? Give feedback.
the documentation in include/clap/ext/gui.h answer your question but as you surmised, floating means the plugin makes its own window and set parent is never called, and non floating means the host makes a window and set parent is called. In the floating case set_transient may be called for window ordering hints.