Allow ESC to close window and don't transmit CTRL character to fl_draw()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12167 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2017-01-26 08:13:19 +00:00
parent 782d34fc8f
commit e7356529bb
1 changed files with 1 additions and 0 deletions

View File

@ -94,6 +94,7 @@ int testwindow::handle(int e) {
if (e == FL_FOCUS) return 1;
if (e == FL_PUSH) {Fl::focus(this); return 1;}
if (e == FL_KEYBOARD && Fl::event_text()[0]) {
if (Fl::event_key() == FL_Escape || Fl::event_ctrl()) return 0;
key = Fl::event_text()[0];
cx = Fl::event_x();
cy = Fl::event_y();