From 3afbfcc84c2b2c8d89ab016ec1d2c7cdafa40a19 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 11 Apr 2013 20:56:52 -0700 Subject: [PATCH] Don't mangle xclass names containing '-' or ' '. --- src/Fl_x.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 040830c..93e5dd9 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2053,7 +2053,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) char *p; const char *q; // replace punctuation with underscores, because it breaks XResource lookup for (p = buffer, q = win->xclass(); *q || (*q&128); q++) - *p++ = isalnum(*q) ? *q : '_'; + *p++ = isalnum(*q) || *q == '-' || *q == ' ' ? *q : '_'; *p++ = 0; // create the capitalized version: q = buffer;