>>>>> "Joost" == Joost Verburg <[EMAIL PROTECTED]> writes:
Joost> Jean-Marc Lasgouttes wrote: >> Here is a different idea: it may be that no windows is active >> (dialog closed, but not yet focus to the main window). >> >> Does this patch do something useful? Joost> The main window has focus when a dialog is closed, only the Joost> toolbar is disabled. The toolbar is not really disabled. It is in the same state as if there was no buffer loaded, right? Here is the relevant explanation in the code: /* In LyX/Mac, when a dialog is open, the menus of the application can still be accessed without giving focus to the main window. In this case, we want to disable the menu entries that are buffer-related. Note that this code is not perfect, as bug 1941 attests: http://bugzilla.lyx.org/show_bug.cgi?id=1941#c4 */ Buffer * buf; if (cmd.origin == FuncRequest::UI && !owner->hasFocus()) buf = 0; else buf = owner->buffer(); The problem comes from the fact that the Dialog controller invokes BufferView::update() at some points I have no control on and at these points the code guesses wrong. This explanation is not clear, but if it was, I would probably be able to fix the bug. JMarc