-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Window closing event fired after closing confirmation #1178
Comments
I'd like to add that I found this bug while doing some tests because I wanted to be able to issue a specific confirmation dialog (something like "you have unsaved work, do you wish to save it before you quit?"), but trying to create a confirmation dialog while the window is closing does not work and makes the program hang indefinitely. I tried create a new window to open the confirmation dialog from it but it still has the same behavior (even without the confirmation dialog, just creating a new window dring the closing event makes the whole program hand indefinitely). I also tried to change the confirmation dialog's text using the UPDATE: Okay I cannot do that because I use GTK and that the choice is made at init time, it would have worked is I was using Qt because the check is done at event time. |
Fixed this part in #1179 for GTK (I don't know if other GUI lib are affected). |
#1180 fixes this issue. |
With #1181 merged I believe this issue can be closed. |
Specification
Description
The
events.closing
documentation says :This does not seem to be the case:
Expected behavior: when closing the window, see
hey
printed on stdout then see the confirmation dialog.Actual behavior: when closing the window, the confirmation dialog appears and if canceled, nothing happens, if confirmed, the window gets closed and
hey
is printed on stdout.The behavior is the same with
events.closed
.Note that if the
bug
function returnsFalse
however, the behavior does not change using theclosed
event but it prevents the window from being closed using theclosing
event, so at least this works as expected.However, if
confirm_close
is not set then returningFalse
from the closing-event handler does not prevent the window from being closed, and that's probably a bug too.The text was updated successfully, but these errors were encountered: