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

Notification: nullpointer exception if window not focused #66

Closed
Codiction opened this issue Dec 18, 2013 · 3 comments
Closed

Notification: nullpointer exception if window not focused #66

Codiction opened this issue Dec 18, 2013 · 3 comments
Assignees

Comments

@Codiction
Copy link

When triggering any notification, even the most basic one:

NotificationManager.showNotification("Text").setDisplayTime(4000);

it will throw an nullpointerException when the window isn't focused or when Teamviewer is open (for some reason)
This is really strange.

Could this be fixed?

@Codiction
Copy link
Author

I've fixed it with this.toFront() before I call the showNotification method but the teamviewer error is still there.

@mgarin
Copy link
Owner

mgarin commented Dec 19, 2013

Sorry for the delay with an answer, there is indeed such an issue.
Exception appeared due to null returned from SwingUtils.getActiveWindow () method.

I have committed the fix for it and it will be available in v1.26 update in a few days.
Still be aware that runtime exception will be thrown in case there is no visible windows in your application.

@mgarin
Copy link
Owner

mgarin commented Dec 19, 2013

I am also working under notifications separated from the any windows, they will be available pretty soon.

@mgarin mgarin closed this as completed Dec 19, 2013
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

2 participants