Some users have noted that the Mixer gets in the way of FX and other windows:
Quote:
Originally Posted by D Rocks
... For now I only noticed the Mixer Window getting in front of floating FX that I dont automatically think of putting "always on top". I could develop the habit to click always on top each time a new FX window is openned but I'll find a solution that does it automatically somehow until it becomes built-in.
What do you think could be done with the script you mentionned? It would be Lua?
|
This problem can serve as an example of using Win32/SWELL functions in ReaScripts. Here are two alternatives:
* A script that moves the mixer to the back when you press a shortcut.
* A script that runs in the background a automatically moves the mixer to the back when you click on another window.
(A
test build of SWS for Windows x64 is required.)
Code:
-- Move Mixer window (docker or undocked) to the back when shortcut is pressed
m = reaper.Window_Find("Mixer (docked)", true)
if m then reaper.Window_SetZOrder(m, "INSERT_AFTER", reaper.GetMainHwnd(), 0x0010) end
m = reaper.Window_Find("Mixer", true)
if m then reaper.Window_SetZOrder(m, "INSERT_AFTER", reaper.GetMainHwnd(), 0x0010) end
reaper.defer(function() end)
Code:
-- This script runs the background, automatically moving Mixer window to the back when it loses focus.
function loop()
w = reaper.Window_GetForeground()
if w and w ~= prevW then -- Has foreground window been changed?
prevW = w
-- Check if new foreground window is Mixer. If not, try to find Mixer and and if it exists, move it back
t = reaper.Window_GetTitle(w, "")
if not t:match("Mixer") then
m = reaper.Window_Find("Mixer (docked)", true)
if m then reaper.Window_SetZOrder(m, "INSERT_AFTER", reaper.GetMainHwnd(), 0x0010) end
m = reaper.Window_Find("Mixer", true)
if m then reaper.Window_SetZOrder(m, "INSERT_AFTER", reaper.GetMainHwnd(), 0x0010) end
end end
reaper.defer(loop)
end
reaper.atexit()
loop()