> I hope now its clear that how I am creating OpenGL display inside the
> Fl_Double_Window. The code is...
>
> MainWindow = new Fl_Double_Window(WINDOW_SIZE_W, WINDOW_SIZE_H, "3DRACS
> (v1.1.0)");
> .
> .
> MainMenuBar = new Fl_Menu_Bar(0, 0, WINDOW_SIZE_W, 25);
> .
> .
> MainWindow->show(argc, argv);
> MainWindow->begin();
> glutInitWindowSize (WINDOW_SIZE_W, WINDOW_SIZE_H-45);
> glutInitWindowPosition (0, 25);
> glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH |
> GLUT_MULTISAMPLE);
> GLUT_MAIN_WINDOW = glutCreateWindow("3DRACS (v1.1.0)");
> MainWindow->end();
> .
> .
> Fl::run();
>
>
>
> now could you tell me, why shortcut keys only work when I open that
> specific menu.
Without seeing more of your code it is hard to be certain, but the most likely
explanation is that the GL context is "eating" the key events so they never
even get to fltk.
When the menu is open, then fltk has the focus and the events are handled
correctly.
You need to put your GL context inside an Fl_Gl_Window, to ensure that the
events propagate to the fltk event loop correctly.
It is possible that you can make things work the way you are going, but it will
probably be harder than just doing things in "The Fltk Way". It would not take
much to tweak your code to be more "conventional" and then I think everything
will then work fine.
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk