Menu

Mac - Window Hidden

Eric Lentz
2025-03-20
2025-05-04
  • Eric Lentz

    Eric Lentz - 2025-03-20

    When I click "Show Keepboard" on Mac, it is usually hidden behind a window and not visible.

    I find this code inside MainFrame to work really well:

        public void showFrame() {
            setVisible(false);
            clearFilters();
            setVisible(true);
            if (Platform.isMac()) {
                SwingUtilities.invokeLater(() -> {
                    try {
                        if (Desktop.isDesktopSupported()) {
                            Desktop desktop = Desktop.getDesktop();
                            desktop.getClass().getMethod("requestForeground", boolean.class)
                                    .invoke(desktop, false);
                        }
                    } catch (Exception ex) {
                        System.err.println("Failed to bring to front: " + ex.getMessage());
                    }
                });
            }
    
            selectedPanel.panelDisplayed();
        }
    

    Love Keepboard, by the way. It is a must-have for productivity as a programmer. I really love it on Linux because it will immediately paste in the last application when I select something from it. This makes me super fast when I paste and then want the previous item: I hit Ctrl-V, then my hotkey for Keepboard and then enter (because it defaults to the previous entry), all without lifting my eyes from my work. Just blazing speed, and I love it!

     
  • Bozanovic

    Bozanovic - 2025-05-04

    Hi Eric, thanks! I think I fixed it now (in a cross-platform way) in version 5.8.

     

Log in to post a comment.

MongoDB Logo MongoDB