Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU4 Issue] Master Palette disappears when MS window is not in focus (Mac) #19975

Open
avvvvve opened this issue Nov 8, 2023 · 1 comment · May be fixed by #20779
Open

[MU4 Issue] Master Palette disappears when MS window is not in focus (Mac) #19975

avvvvve opened this issue Nov 8, 2023 · 1 comment · May be fixed by #20779
Assignees
Labels
os: macOS Potentially specific to the macOS operating system P2 Priority: Medium UI Visual issues affecting the UI (not notation) UX/interaction

Comments

@avvvvve
Copy link

avvvvve commented Nov 8, 2023

Issue type

UI bug

Bug description

If the Master palette is open, when a user focuses outside of the MS app (i.e. by switching to another app, switching desktops on Mac, or clicking outside of the window), the Master palette closes.

Like other dialogs, the Master palette window should remain open until the user chooses to close it.

Steps to reproduce

  1. Open the Master palette (F9)
  2. Click outside the MuseScore window
  3. See that the Master palette disappears

Screenshots/Screen recordings

master-palette-unfocus.mov

MuseScore Version

MuseScore version (64-bit): 4.1.1-232071203, revision: github-musescore-musescore-e4d1ddf

Regression

I don't know

Operating system

OS: macOS 13.6, Arch.: x86_64

Additional context

No response

@muse-bot muse-bot added the UI Visual issues affecting the UI (not notation) label Nov 8, 2023
@cbjeukendrup
Copy link
Contributor

I believe the same goes for VST windows, and that this has been broken for quite a while. It seems that my "stay-on-top-of-MuseScore-but-not-on-top-of-whole-OS" hack has stopped working after some macOS update.

// We want some windows to be on top of the main window.
// But not on top of all other applications when MuseScore isn't active.
// On Windows, we achieve this by setting the transient parent.
// On macOS, we have to use a workaround:
// When the application becomes active, the windows will get the StayOnTop hint.
// and when the application becomes inactive, the hint will be removed.
#ifdef Q_OS_MAC
auto updateStayOnTopHint = [this]() {
bool stay = qApp->applicationState() == Qt::ApplicationActive;
bool wasShown = isVisible();
bool wasActive = isActiveWindow();
setWindowFlag(Qt::WindowStaysOnTopHint, stay);
if (wasShown) {
if (!wasActive) {
setAttribute(Qt::WA_ShowWithoutActivating, true);
}
show();
setAttribute(Qt::WA_ShowWithoutActivating, false);
}
};
updateStayOnTopHint();
connect(qApp, &QApplication::applicationStateChanged, this, updateStayOnTopHint);
#endif

@bkunda bkunda added this to To do in 4.x SHORTLIST via automation Nov 10, 2023
@bkunda bkunda added the P2 Priority: Medium label Nov 10, 2023
@cbjeukendrup cbjeukendrup added the os: macOS Potentially specific to the macOS operating system label Dec 17, 2023
@sarietta sarietta linked a pull request Dec 31, 2023 that will close this issue
8 tasks
@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] Master Palette disappears when MS window is not in focus [MU4 Issue] Master Palette disappears when MS window is not in focus (Mac) Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macOS Potentially specific to the macOS operating system P2 Priority: Medium UI Visual issues affecting the UI (not notation) UX/interaction
Projects
Status: One of the next releases
4.x SHORTLIST
  
To do
Development

Successfully merging a pull request may close this issue.

5 participants