fix(vst-gui): borderless fx-gui window + anchored re-show (mouse stable)
- RenderFxJob: offscreen fx-gui window now WS_POPUP (borderless) so GetWindowRect == client rect; anchored placement over the embed panel is exact. WS_OVERLAPPEDWINDOW put the client ~31px lower/right -> cursor jumped on hover and clicks hit the webview (relay rejected). - AdjustWindowRect sizes to the window's own style (no caption for POPUP). - FxGuiServer: mousemove only SetCursorPos while dragging (buttons!=0); hover no longer teleports the cursor. - FxGuiServer /show: skip SetWindowPos/resize when rect unchanged (frontend now re-POSTs /show every ~500ms to re-anchor on scroll/resize). - app.jsx VstGuiEmbed: drop shownRef one-shot; re-POST /show each refresh. - Rebuilt bridge (6 locations) + Tauri release (embedded sidecar) + v=202608190002.
This commit is contained in:
@@ -667,7 +667,9 @@ public:
|
||||
int w = rect.right - rect.left;
|
||||
int h = rect.bottom - rect.top;
|
||||
RECT r = { 0, 0, w, h };
|
||||
AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW, FALSE);
|
||||
// Size to the window's own style: borderless (WS_POPUP) needs no
|
||||
// caption/border adjustment.
|
||||
AdjustWindowRect(&r, GetWindowLongPtrA(hwnd, GWL_STYLE), FALSE);
|
||||
SetWindowPos(hwnd, nullptr, 0, 0, r.right - r.left, r.bottom - r.top,
|
||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
view->onSize(&rect); // some Skia/OpenGL editors skip first paint
|
||||
@@ -1192,7 +1194,11 @@ static int fxGuiCreateWindow(const std::string& name, bool offscreen,
|
||||
const int x = offscreen ? -20000 : CW_USEDEFAULT;
|
||||
const int y = offscreen ? -20000 : CW_USEDEFAULT;
|
||||
const DWORD exStyle = offscreen ? WS_EX_TOOLWINDOW : 0;
|
||||
const DWORD style = (offscreen ? (WS_OVERLAPPEDWINDOW & ~WS_MINIMIZEBOX) : WS_OVERLAPPEDWINDOW)
|
||||
// Borderless (WS_POPUP): GetWindowRect == client rect, so anchored
|
||||
// placement over the embed panel is exact. A captioned/bordered window
|
||||
// (WS_OVERLAPPEDWINDOW) put the client area ~31px lower/right of the
|
||||
// requested rect -> cursor jumped on hover and clicks landed on the webview.
|
||||
const DWORD style = (offscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW)
|
||||
| WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||
HWND hwnd = CreateWindowExA(exStyle, kFxGuiWndClass,
|
||||
(name.empty() ? "VST FX" : name).c_str(),
|
||||
|
||||
Reference in New Issue
Block a user