On 4/11/2016 2:12 AM, Lorenzo Marcantonio wrote: > On Fri, Apr 08, 2016 at 04:39:24PM -0400, Wayne Stambaugh wrote: >> I've known for a while that the quasi-modal mode provided by DIALOG_SHIM >> was broken. The only reason it hasn't reared it's head is because of > > Congratz for finding the issue, I lost a lot of time in vain looking for > the cause for that 'stuck' processes!
The quasi-modal event loop keeps running if EndQuasiModal is not called when closing the dialog. wxDialog handles default button command IDs like wxID_OK and wxID_CANCEL internally so if you inadvertently show a dialog as quasi-modal and click the OK button, the wxDialog default handing will close the dialog but not the quasi-modal event loop. Once that happens, the app is stuck in a hidden event loop with no way to send events to it. The only reason this hasn't been a huge problem is our poor habit of creating dialogs where we specifically call EndQuasiModal (or EndModal) directly in OK and cancel button event handlers. The problem with doing this is that now your dialogs have to be shown in the correct mode or there will be issues. With my patch, you will be able to open the dialog in any mode and let the default handlers do their job. > > The quasimodal idea is broken in itself since it cross-lock different > main windows. Still using different processes for eeschema and pcbnew to > avoid it... This is one of the unfortunate side effects of running everything in a single process. With out the quasi-modal mode, every time a modal dialog is shown all of the main windows will get blocked. The quasi-mode solves this problem it just didn't take into account the default wxDialog event handling behavior. > > Libre/OpenOffice however seems to have similar problems so it's not > entirely kicad's fault :P It's nice to know we are not the only one's with this issue. :) > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

