Skip to content

Commit 98c2222

Browse files
committed
Update CHOC-based win32 webview
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 12694ee commit 98c2222

File tree

6 files changed

+867
-562
lines changed

6 files changed

+867
-562
lines changed

distrho/extra/WebViewWin32.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* DISTRHO Plugin Framework (DPF)
3-
* Copyright (C) 2012-2025 Filipe Coelho <falktx@falktx.com>
3+
* Copyright (C) 2012-2026 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
@@ -63,8 +63,8 @@ START_NAMESPACE_DISTRHO
6363
WebView* webview_choc_create(const WEB_VIEW_NAMESPACE::WebViewOptions& opts)
6464
{
6565
WebView::Options wopts;
66-
wopts.acceptsFirstMouseClick = true;
6766
wopts.enableDebugMode = true;
67+
wopts.transparentBackground = true;
6868

6969
std::unique_ptr<WebView> webview = std::make_unique<WebView>(wopts);
7070
DISTRHO_SAFE_ASSERT_RETURN(webview->loadedOK(), nullptr);
@@ -74,10 +74,8 @@ WebView* webview_choc_create(const WEB_VIEW_NAMESPACE::WebViewOptions& opts)
7474
webview->addInitScript("function postMessage(m){window.chrome.webview.postMessage(m);}");
7575

7676
void* const callbackPtr = opts.callbackPtr;
77-
webview->bind([callback, callbackPtr](const std::string& value) {
78-
char* const data = strdup(value.data());
79-
callback(callbackPtr, data);
80-
std::free(data);
77+
webview->bind([callback, callbackPtr](std::string& value) {
78+
callback(callbackPtr, value.data());
8179
});
8280
}
8381
else

distrho/extra/choc/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Taken from https://github.com/Tracktion/choc
22

33
```
4-
commit 2512542b2d65f3e92df7f2f1f7eeb712fa41a0de (HEAD -> main, origin/main, origin/HEAD)
5-
Author: Cesare Ferrari <cesare.ferrari@gmail.com>
6-
Date: Sun Apr 28 12:53:17 2024 +0100
4+
commit ae4c54d22b53a599222c1dfaa4b4007d0ec310c7 (HEAD -> main, origin/main, origin/HEAD)
5+
Author: Julian Storer <julianstorer@gmail.com>
6+
Date: Thu Jan 15 08:56:50 2026 +0000
77
8-
Disable additional gcc warnin
8+
Added a zip file creation class, ZipWriter
99
```
1010

1111
With the big [choc.patch](./choc.patch) patch applied to top for:
@@ -16,7 +16,3 @@ With the big [choc.patch](./choc.patch) patch applied to top for:
1616
- remove even more stuff (json no longer needed)
1717
- convert choc asserts into distrho ones
1818
- put everything inside distrho namespace
19-
20-
And then backported:
21-
22-
- https://github.com/Tracktion/choc/commit/792e4bd9bedf38b9a28f12be0535c90649d5616b

0 commit comments

Comments
 (0)