I made this simple application and made it so that the window position and size is saved on closing the app, so that the next time the user opens the app, he can resume his work directly.


This is the link to the source code of my app.

Can anyone review the code and point out my mistake?

1 Answer 1


You seem to be missing one last step, actually calling the function that is supposed to save the new values in the gsettings schema. To do this, you need to connect the delete_event signal to your before_destroy () function. I like to place that right before calling show_all ():

enter image description here

Also, the before_destroy () function must return false for the window to actually close.

enter image description here

EDIT: Please look into using a github repository, sharing google drive links is not recommended.

  • Thanks a lot for your help. Nov 30, 2020 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.