diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-07-27 17:24:14 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-07-27 17:24:14 +0000 |
| commit | f7e0e7627f94f98d4a8955ceb6f84106dc0b12a2 (patch) | |
| tree | ac724296423a36c80db8fd539988868e63984a21 /src | |
| parent | df045b0e36f08c7d6ae4884667744203057d95c8 (diff) | |
Can draw xpm pixmaps with spaces in the color names (such as the ones in
/usr/X11/include/X11/icons).
Esc closes the modal window, not the window the cursor is in, if a modal
window is up.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 7 | ||||
| -rw-r--r-- | src/fl_draw_pixmap.cxx | 11 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index caf418e20..1579d5ac4 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.10 1999/07/22 21:37:03 bill Exp $" +// "$Id: Fl.cxx,v 1.24.2.11 1999/07/27 17:24:13 bill Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -508,7 +508,8 @@ int Fl::handle(int event, Fl_Window* window) // make Escape key close windows: if (event_key()==FL_Escape) { - window->do_callback(); + w = modal(); if (!w) w = window; + w->do_callback(); return 1; } @@ -694,5 +695,5 @@ int fl_old_shortcut(const char* s) { } // -// End of "$Id: Fl.cxx,v 1.24.2.10 1999/07/22 21:37:03 bill Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.11 1999/07/27 17:24:13 bill Exp $". // diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index 167b7f182..062a0fbe8 100644 --- a/src/fl_draw_pixmap.cxx +++ b/src/fl_draw_pixmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_draw_pixmap.cxx,v 1.4 1999/01/07 19:17:38 mike Exp $" +// "$Id: fl_draw_pixmap.cxx,v 1.4.2.1 1999/07/27 17:24:13 bill Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -181,9 +181,6 @@ int fl_draw_pixmap(/*const*/char*const* data, int x, int y, Fl_Color bg) { previous_word = p; while (*p && !isspace(*p)) p++; } - // copy the color name and look it up: - char name[256]; - char *q; for (q = name; *p && !isspace(*p); *q++ = *p++); *q++ = 0; uchar *c = (uchar *)&d.colors[index&255]; #ifdef U64 *(U64*)c = 0; @@ -192,10 +189,10 @@ int fl_draw_pixmap(/*const*/char*const* data, int x, int y, Fl_Color bg) { #endif #endif #ifdef WIN32 - if (fl_parse_color(name, c[0], c[1], c[2])) {; + if (fl_parse_color(p, c[0], c[1], c[2])) {; #else XColor x; - if (XParseColor(fl_display, fl_colormap, name, &x)) { + if (XParseColor(fl_display, fl_colormap, p, &x)) { c[0] = x.red>>8; c[1] = x.green>>8; c[2] = x.blue>>8; #endif } else { // assumme "None" or "#transparent" for any errors @@ -244,5 +241,5 @@ int fl_draw_pixmap(/*const*/char*const* data, int x, int y, Fl_Color bg) { } // -// End of "$Id: fl_draw_pixmap.cxx,v 1.4 1999/01/07 19:17:38 mike Exp $". +// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.1 1999/07/27 17:24:13 bill Exp $". // |
