-
Notifications
You must be signed in to change notification settings - Fork 290
Remove event filter when owner window is hiding #1443
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
Remove event filter when owner window is hiding #1443
Conversation
|
Hi rhabarberbarberah, Welcome to ControlsFX and thank you for taking time to contribute to this project. We do not recognise you as a contributor. Can you please sign ControlsFX Individual Contributor Agreement: https://cla.controlsfx.org ? |
|
I did the CLA-Thing, let me know, if anything is missing |
|
PopOver already adds event filter on owner window to hide without delay on |
|
Hi @abhinayagarwal, |
|
Taking a closer look it seems to make a difference, if you close the Window using "alt+F4", in that case the error doesn't seem to happen. |
|
further investigating the ownerWindowClosing()-method doesn't seem to be executed, when you close the Window via the "x"-button |
|
using the workaround I posted in the PR the error goes away. |
|
Using just one Stage it might not seem that relevant to fix the error. |
|
Hi rhabarberbarberah, Welcome to ControlsFX and thank you for taking time to contribute to this project. We do not recognise you as a contributor. Can you please sign ControlsFX Individual Contributor Agreement: https://cla.controlsfx.org ? |
|
I dug a little deeper, refactored the Case in parallel to my personal usecase.
also did some refactoring and cleanup Important to note: |
|
do you have a SSCCE to test this PR? |
|
Sure, not quite at hand, but I'm sure I can extract it off my project to reduce it to the essential part. |
|
Hi @abhinayagarwal, |
|
@abhinayagarwal Does the example help? |
|
The example did help. I was trying to find the reason why it works with this fix and not with the old fix but haven't been able to. I am missing something. Nevertheless, this approach works and I am OK to go forward with it. I have the following recommendations:
|
|
yes, you're right. |
|
Hi rhabarberbarberah, Welcome to ControlsFX and thank you for taking time to contribute to this project. We do not recognise you as a contributor. Can you please sign ControlsFX Individual Contributor Agreement: https://cla.controlsfx.org ? |
|
Hi, |
|
Ah, this bot needs fixing :p Thank you for the changes. I will test and merge them sometime soon. |
|
Yea, was just gona ask about that. still seems to run without exceptions. While I removed the redundant lines from the show()-methods i noticed, that the ownerWindow field is reassigned in the process. |
|
You are absolutely right about Weak listeners are notorious in JavaFX and could also be a reason, so I got rid of them and used the listener |
|
When parent is closed, The fix is quite simple, remove the following lines from I have made a commit with the fix. Please test it out and let me know if it works. |
|
Hi @rhabarberbarberah , did you get a chance to test it? |
|
Hey @abhinayagarwal, just tested it with the sampler and my test application. greetings |
|
Hi @rhabarberbarberah , Thank you for the test. I have simplified the fix and pushed it to this PR. This was a long standing issue. Thank you for helping us to finally fix it 👍 |
|
Hi @abhinayagarwal, |
As Described under #1441
The Error on Window closing while a PopOver is open is caused by the fadeout time.
Can be fixed by adding a OnCloseRequest-listener to the OwnerWindow which then closes the PopOver without delay.