Mixer Board - Always on top

Is there any chance you could provide a ‘Always on top’ feature to the Mixer Board window to stop it disappearing behind when clicking on anything in the main window?

Thanks

I’m not sure if that is possible on Windows. On Linux I can just right click on the title bar and select “Always on top”.

Update: Perhaps something in this article will help: https://www.techjunkie.com/how-to-pin-windows-in-windows-10/
(Caution: lots of adverts on that page)

It is possible in Windows. In my previous existence (before retirement) I was a software engineer and used the feature regularly. I worked mainly in Delphi and it was a simple matter of setting a forms ‘FormStyle’ property to ‘fsStayOnTop’ to keep the form on top or ‘fsNormal’ to reset it, I’m sure there must be the equivalent in C/C++/C#

I had to look this up as I rarely use Windows.

It appears that the initial intention was that the Mixer Board should float above the main Audacity window, but at the time the code was written there was a problem in the WxWidgets library that prevented that from working.

From MixerBoard.cpp:

//vvv Bug in wxFRAME_FLOAT_ON_PARENT:
// If both the project frame and MixerBoardFrame are minimized and you restore MixerBoardFrame,
// you can't restore project frame until you close MixerBoardFrame, but then project frame and
// MixerBoardFrame are restored but MixerBoardFrame is unresponsive because it thinks it's not shown.
//    wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT)

So “wxFRAME_FLOAT_ON_PARENT” was changed to “wxDEFAULT_FRAME_STYLE” to work around that problem.

That code was written a long time ago and we are now using a later version of WxWidgets, so it’s possible that the underlying problem may have been fixed so it may now be possible to achieve the behaviour that was initially intended.

As the developer’s intention is unambiguous and the behaviour does not match that intention, I’ll log this as a bug on the Audacity issue tracker. Thanks for bringing it to our attention.

Okay, great stuff thanks, I hope it gets implemented it would be so useful.

I’ve logged it.

We’re getting quite late in the release cycle for the next version of Audacity, and I don’t know if the problem in WxWidgets still exists, so no guarantees. On the positive side, if the problem in WxWidgets has been fixed, then this looks like a very easy change.

Update:

I’ve tried setting the Mixer Board frame style to “wxFRAME_FLOAT_ON_PARENT”.
This works as expected on Linux, but unfortunately not on Windows. On Windows the Mixer Board is created without a title bar, so it is suck positioned in the middle of the main Audacity window and cannot be moved.

I’ve not tested on macOS.

I shall leave the bug on the issue tracker, but it looks like someone will have to dive deep into the WxWidgets library to fix it, so I think it’s unlikely to be resolved any time soon.

That’s strange, on my Windows 10 PC the Mixer has a title bar and can be moved as one would expect:
Audacity Mixer.jpg

Yes, it is with the 2.4.2 release build.
Did you try rebuilding with wxFRAME_FLOAT_ON_PARENT? That’s when I see the missing title bar.

Ah, okay, I understand what you’re getting at. No I haven’t tried rebuilding it, I don’t have the tools.

Thanks for your time Steve, maybe as you said someone will be able to take a deeper look.

On W10 I can move the Mixer Board with 2.4.2 and with the latest alpha test build I have for the upcoming 3.0.0

Peter.

Peter, do you still have an always on top issue ?

steve, is this what you tried?:

diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp
index 9dfd887..ce5de7a 100644
--- a/src/MixerBoard.cpp
+++ b/src/MixerBoard.cpp
@@ -1418,7 +1418,7 @@ MixerBoardFrame::MixerBoardFrame(AudacityProject* parent)
             // you can't restore project frame until you close MixerBoardFrame, but then project frame and
             // MixerBoardFrame are restored but MixerBoardFrame is unresponsive because it thinks it's not shown.
             //    wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT)
-            wxDEFAULT_FRAME_STYLE)
+            wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT)
 {
    mMixerBoard = safenew MixerBoard(parent, this, wxDefaultPosition, kDefaultSize);

Yes - but that’s the way it’s always been.

I did try an experimental fix that Steve made - but it was buggy.

Peter

and steve ?

I think that was it.
If you’re building on Windows it may be worth playing with the options to see if you can persuade it to work.

Patch above seems to work just fine on 3.0.0 alpha! TItle bar is OK. Stays on top OK. Both screens minimizes and restore OK. I think you found the solution. :smiley: I wonder if there was a typo first time around… :open_mouth:

It would be highly unexpected for it to work on Linux if there was a typo. :confused:

Do you have a GitHub artifact or did you only build it locally?

Yes. My test was probably flawed in some way - but I don’t know how. That’s why I’m sending it back to you. Hopefully, you can tell me what I did wrong. Or maybe Paul did something else in the interim. Either way I think you fixed it. :smiley:

Yes, no, I mean no, yes - Asychronous tesing, no artifact. I just used the command line git clone. Then git diff. :smiley:

That looks like good news, thanks all. I look forward to getting the new release.

Well, we’ll just keep after steve… :smiley: