4 ms·
>these days, you want to write the code for modal dialogs as if they were not modal, even if to the user they prevent interaction with other parts of the progra
by AlienRobot 2y ago
>these days, you want to write the code for modal dialogs as if they were not modal, even if to the user they prevent interaction with other parts of the program
I'm never going to use a toolkit that can't guarantee a modal is modal.
- bonzini 2y agoIt is modal. https://docs.gtk.org/gtk4/method.Window.set_modal.html https://docs.gtk.org/gtk4/method.Window.set_modal.html The user can't interact with the parent until you close it. The problem with nested event loops is that there can always be timers or idle callbacks that fire while the nested event loop is running. Back in the day where windows were rendered on demand, you could also get expose events just because the user moved another window around. So at the code level, "modal" windows are fiction and have always been. Getting rid of nested event loops is cleaner because it forces you to get to grips with the fact that (for the programmer, not the user) everything is asynchronous in an event-driven architecture. Plus these days programming languages have better tools to deal with the asynchronicity.