Hi all,
In the following, I see PUSH events when the mouse is
clicked within the main window or the sub window, but
nowhere else -- not in either window's frame or elsewhere
on the screen. I can't figure out why. Any assistance
appreciated.
TIA,
Stan
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <iostream>
class SubWindow : public Fl_Double_Window {
public:
SubWindow(int w, int h, char const* label = 0)
: Fl_Double_Window(w, h, label)
{
end();
}
int handle(int event)
{
if(event == FL_KEYDOWN && Fl::event_key() == FL_Escape) {
exit(0);
}
if(event == FL_PUSH) {
std::cout << "PUSH\n";
}
return Fl_Window::handle(event);
}
};
int main()
{
Fl_Double_Window win(300, 300, "Main Window");
win.end();
SubWindow sub(200, 200, "Sub");
win.show();
sub.show();
Fl::grab(&sub);
return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk