Skip to content
Permalink
Browse files

Fix bug with dialog focus on macOS

  • Loading branch information...
tresf committed Feb 2, 2019
1 parent fecdce3 commit 745c610c07a0684230d127c170e94280b242906f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/qz/ui/BasicDialog.java
@@ -160,8 +160,8 @@ public ImageIcon getIcon(IconCache.Icon icon) {
public void setVisible(boolean b) {
// fix window focus on macOS
if (SystemUtilities.isMac() && !GraphicsEnvironment.isHeadless()) {
ShellUtilities.executeAppleScript("tell application \"System Events\" " +
"set frontmost of every process whose unix id is " + MacUtilities.getProcessID() + " to true " +
ShellUtilities.executeAppleScript("tell application \"System Events\" \n" +
"set frontmost of every process whose unix id is " + MacUtilities.getProcessID() + " to true \n" +
"end tell");
}
super.setVisible(b);

0 comments on commit 745c610

Please sign in to comment.
You can’t perform that action at this time.