From 3f7937ca8940294da00e0d705916b8d6d3f9b993 Mon Sep 17 00:00:00 2001 From: Dan Raffel Date: Sun, 1 Mar 2026 12:16:02 -0800 Subject: [PATCH] Only call setAlwaysOnTop in showWindow when explicitly enabled When always_on_top_ is false (the default), calling setAlwaysOnTop(false) explicitly sets the window to NSNormalWindowLevel on macOS. If the window is hosted inside another application (e.g. an audio plugin running inside a DAW), the host may have placed the window at a higher level. The unconditional call demotes it, causing the window to drop behind the host. Skip the call when always_on_top_ is false so the window stays at whatever level the host assigned. setWindowOnTop(true) still works for windows that need to float above everything. --- visage_app/application_window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/visage_app/application_window.cpp b/visage_app/application_window.cpp index 7830154..1ff8779 100644 --- a/visage_app/application_window.cpp +++ b/visage_app/application_window.cpp @@ -118,7 +118,8 @@ namespace visage { void ApplicationWindow::showWindow(bool maximized) { if (!title_.empty()) window_->setWindowTitle(title_); - window_->setAlwaysOnTop(always_on_top_); + if (always_on_top_) + window_->setAlwaysOnTop(true); addToWindow(window_.get()); if (maximized)