mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
macOS fixes
This commit is contained in:
parent
9932895ff5
commit
3b92f7d093
3 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,7 @@ import java.awt.*;
|
|||
import java.lang.reflect.Field;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class AppTray {
|
||||
|
||||
|
@ -76,9 +77,13 @@ public class AppTray {
|
|||
|
||||
// Remove functionality to show stage when primary clicked and replace it with our own
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
privateTrayIcon.removeActionListener(privateTrayIcon.getActionListeners()[0]);
|
||||
for (var l : Arrays.stream(privateTrayIcon.getActionListeners()).toList()) {
|
||||
privateTrayIcon.removeActionListener(l);
|
||||
}
|
||||
privateTrayIcon.addActionListener(e -> {
|
||||
OperationMode.switchToAsync(OperationMode.GUI);
|
||||
if (OsType.getLocal() != OsType.MACOS) {
|
||||
OperationMode.switchToAsync(OperationMode.GUI);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 665 B |
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 665 B |
Loading…
Reference in a new issue