Skip to content

Commit

Permalink
Sync clipboard in Netbeans IDE
Browse files Browse the repository at this point in the history
Fixes #879
  • Loading branch information
p0deje committed Nov 22, 2024
1 parent ef40d5d commit a16107f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Maccy/Clipboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,13 @@ class Clipboard {
return false
}

// Chrome Remote Desktop requires window be unfocused and focused back to sync the clipboard.
// Some applications requires window be unfocused and focused back to sync the clipboard.
// - Chrome Remote Desktop (https://github.com/p0deje/Maccy/issues/948)
// - Netbeans (https://github.com/p0deje/Maccy/issues/879)
private func sync() {
guard let url = sourceApp?.bundleURL,
url.lastPathComponent == "Chrome Remote Desktop.app" else {
guard let app = sourceApp,
app.bundleURL?.lastPathComponent == "Chrome Remote Desktop.app" ||
app.localizedName == "NetBeans" else {
return
}

Expand Down

5 comments on commit a16107f

@Maczinger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not working here. Perhaps , because NetBeans, nowadays, it's named "Apache NetBeans.app".
Wouldn't it be better to use "contains" instead of == ?

@p0deje
Copy link
Owner Author

@p0deje p0deje commented on a16107f Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was a better way to identify NetBeans, pushed c87c1f8

@weisJ
Copy link
Contributor

@weisJ weisJ commented on a16107f Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the bundle identifier? For Netbeans it should start with org.netbeans.ide.nbide

@p0deje
Copy link
Owner Author

@p0deje p0deje commented on a16107f Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was generic jdk something when I downloaded NetBeans and ran it myself.

@weisJ
Copy link
Contributor

@weisJ weisJ commented on a16107f Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is unfortunate. Judging from their repository I thought they might have their own bundle id. Obviously I didn't check this though.

Please sign in to comment.