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

"Hide QuPath" on macOS opens "About" window instead of hiding window #1436

Open
tbedau opened this issue Dec 2, 2023 · 3 comments
Open

"Hide QuPath" on macOS opens "About" window instead of hiding window #1436

tbedau opened this issue Dec 2, 2023 · 3 comments

Comments

@tbedau
Copy link

tbedau commented Dec 2, 2023

Describe the bug
When trying to hide QuPath via the menu bar or by pressing cmd + h, the "About" window is opened instead of QuPath being hidden.

To Reproduce
Steps to reproduce the behavior:

  1. Click on app name ("QuPath-0.5.0-arm64") in menu bar.
  2. Click on "Hide QuPath-0.5.0-arm64" (alternatively: press cmd + h).
  3. See error.

Expected behavior
QuPath window being hidden.

Screenshots
qupath-bug

Desktop (please complete the following information):

  • OS: macOS 14.1.2
  • QuPath Version: 0.5.0-arm64
@tbedau tbedau added the bug label Dec 2, 2023
@petebankhead
Copy link
Member

I can replicate the problem, but I can't explain it and have no idea where it could be influenced in the QuPath code :/
I'd think it's a JavaFX bug, except I see it didn't occur in QuPath v0.4.x. But since we don't populate that system menu explicitly in QuPath, I don't know how we can change its behavior.

@tbedau
Copy link
Author

tbedau commented Dec 8, 2023

That is very strange indeed. Unfortunately I don't have the needed knowledge to dive into this, but I guess a lot of heavy cmd+h users like me would be extremely grateful if someone found a solution!

@Rylern
Copy link
Contributor

Rylern commented Feb 12, 2024

This bug is not specific to QuPath (see here) so I also think it's a JavaFX bug.

A workaround would be to disable this "About" window and handle explicitly the "cmd+h" combination with something like:

// Disable about window
Desktop.getDesktop().setAboutHandler(e -> {});

// Handle cmd + h
scene.getAccelerators().put(
  new KeyCodeCombination(KeyCode.H, KeyCombination.META_DOWN), () -> {
    stage.setIconified(true);
  }
);

inserted in the constructor of QuPathGui.

However, this would still make impossible to hide QuPath via the menu bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants