I think I've found the solution. Having

if (event == FL_UNFOCUS)
{
  take_focus();
  return 1;
}

in my window's handle function solves the problem.

Thanks,
Oguz

> > On 27 Jan 2008, at 16:05, Oguz Akyuz wrote:
> > > I would appreciate any help on this problem.
> > >
> > > PS: If I click the new window, the events seems to go to the new
> > > window as I want. But I believe it must be possible to achieve that
> > > without clicking the window first.
> >
> >
> > Calling Fl::focus(Fl_Widget*); on your new window doesn't help?
>
> I tried,
>
> window->show();
> Fl::focus(window);
>
> but it still requires me to click once on the window for it to receive the 
> keyboard events.
>
> Thanks for the help,
> Oguz
>

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to