Jean-Marc Lasgouttes wrote: >>>>>> "Georg" == Georg Baum >>>>>> <[EMAIL PROTECTED]> >>>>>> writes: > > Georg> I tried to understand where in the code that happens, but > Georg> failed. Could you please tell me the place where the main > Georg> window without focus prevents the icons from being enabled? > > In LyXFunc::getStatus, you will find:
Thanks, now I see it (I was searching in frontends/qt2) > It is not really qt-only. The same code would trigger for a Cocoa > port, or a Gtk/osx. I see. Because XFormsView::hasFocus() and GView::hasFocus() are too stupid we don't see the bug there. > Georg> The right fix is IMHO to fix the focus problem. Why is it not > Georg> possible to give the focus to the main window after a dialog is > Georg> closed? > > This is what I tried first, actually: updating the tool/menu bars after > the window has been hidden in Dialog::hide. It did not work, and I do > not understand why. The problem is that the main window still has no focus when Dialog::hide is called. I tried to activate it with QMainWindow::setFocus() and QMainWindow::show(), but neither worked. I'll investigate further. Georg