26.03.2007 matthiasm <[EMAIL PROTECTED]> wrote: > > On Mar 26, 2007, at 1:26 PM, gga wrote: > > > Milan wrote: > >> > >> Can someone please tell, me is this a bug in FLTK 2.x branch, > >> since people > >> who use FLTK 1.1.x seem to have no problem with this, so I can > >> start looking > >> for some other possible (?) means to do this, or if it's not a bug > >> then what > >> is wrong with it!? > >> > > > > The only way I have found to refocus the widget is to do a hide/ > > show on > > the main window. > > Try to do a "show()" before the "take_focus()". Don't do the "hide > ()". This should make the main window the first one again. > Graphically, the popup (or non_modal) would still stay on top of the > main window.
I've tried this, as I've already said in my previous message it didn't worked. Also aside from my last attempts, I've tried something more with flags (Widget->flags()) but again with no positive results. I solved this issue partially, by calling "browserWindow->resize(0, 0)" in main window's constructor, followed by "browserWindow->show()", because I think that "browserWindow" no matter what, gains focus after first "browserWindow->show()" call, which is executed after first character is entered in input box. When there's no characters in input "input->size() < 1", then "browserWindow->hide()" was called. This way "browserWindow" doesn't get hidden and then showed again, instead, when I need to show it I call something like "browserWindow->resize(someX, someY, someWidth, someHeight)", and when I need to hide it I call again "browserWindow->resize(0, 0)", and as I've said this seems to work but only as long as showing the window for the first time in question. That is when I start typing, "browserWindow" gets shown as expected, and focus remains in input box, but when I delete (with BACKSPACE) all the characters in input box so "input->value() == 0", and "browserWindow" need to be hidden again, it does go off, but then I get in terminal: X_CreatePixmap: BadValue (integer parameter out of range for operation) 0x0 X_CopyArea: BadDrawable (invalid Pixmap or Window parameter) 0x3400020 and when I type something again in input and "browserWindow" needs to be shown again it doesn't!!? I doesn't gets shown even If I remove function call "browserWindow->resize(0, 0)" which should be executed if "input-value() == 0" in which case "windowBrowser" should remain visible, but this has not effect on error, so I assume there's something else what's causing this error. I'll try to dig further more, but if someone finds this error message familiar, please tell me. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk