> when i call fl_window->show() form timercallback, window is
> apper on top
> but keybord event is another application( i.e. current
> working application) how set keybord event to top window
It might help if you tell us what version you are using, and what
platform you are on.
Note that managing the focus of windows, between different applications,
is dependent on the behaviour of your window manager so, depending on
which WM you are using, it may not be practical to make this work as
you'd like.
This crude demo works as expected on winXP.
------------------------------
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
Fl_Double_Window *main_win=(Fl_Double_Window *)0;
int keep_running = 99;
void pop_win(void *) {
main_win->show();
}
static void cb_Quit(Fl_Button*, void*) {
// quit button
main_win->hide();
keep_running = 0;
}
static void cb_Hide(Fl_Button*, void*) {
// hide button
main_win->hide();
Fl::add_timeout(3, pop_win);
}
int main(int argc, char **argv) {
{ main_win = new Fl_Double_Window(439, 321);
{ Fl_Button* o = new Fl_Button(345, 265, 80, 35, "Quit");
o->callback((Fl_Callback*)cb_Quit);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(25, 25, 64, 20, "Hide");
o->callback((Fl_Callback*)cb_Hide);
} // Fl_Button* o
main_win->end();
} // Fl_Double_Window* main_win
main_win->show(argc, argv);
while (keep_running)
{
Fl::wait(1);
}
} // main
/* end of file */
---------------------------------------
SELEX Sensors and Airborne Systems Limited
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-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev