hi,
i've been having problems with the lazarus dialogs, in particular TFontDialog.
my application is quite big, a graphical terminal emulator that can have quite a bit going on in the background. when pushing things to the absolute limit, with both an animated graphics screen and a fast scrolling text screen (the graphics overlay the text, each on separate canvases), if i call up a FontDialog object the dialog appears but does not respond to clicking either of the 'Cancel' or 'OK' buttons. the FontDialog does, however, usually close when the top-right-corner 'X' button is clicked.
if i click on the 'OK' button, then wait for a while (10's of seconds to a couple of minutes) the dialog sometimes does eventually respond. if i reduce the background CPU load, thing work as normal.
my feeling is that the large quantity of visual activity going on while the FontDialog is displayed is impeding the LCL's handling of the 'OK' and 'Cancel' buttons. has anyone encountered similar issues before?
i have variously looked into the lazarus source code to find the source behind TFontDialog, but never managed to locate it. it seems that one possible solution (if it is simply the dialog being starved of CPU resources) would be to somehow hook the initial click events for the dialog's 'OK' and 'Cancel' buttons, and to there set a flag that briefly pauses other screen activity until the dialog has successfully closed.
i was also experiencing similar (bot not so severe) problems with TOpenDialog and TSaveDialog, but was able to track this down to a race-condition between two threads elsewhere in my application. with that fixed the problems with open and save went away, but the problem with font is not fully cured.
any help or suggestions much appreciated!
cheers,
rob :-)