summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--src/Fl_win32.cxx9
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 6dadf2316..1bad6e85c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745, STR #942)
+ - Added Windows support for Fl_Window::xclass() (STR #848)
- Floating point input field allows characters from
current locale (STR #903)
- Fixed integration of Fl_Input_Choice into Fluid (STR #879)
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index ab9f1d5e5..723f76297 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1042,8 +1042,13 @@ int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
Fl_X* Fl_X::make(Fl_Window* w) {
Fl_Group::current(0); // get rid of very common user bug: forgot end()
- const char* class_name = /*w->xclass();
- if (!class_name) class_name =*/ "FLTK"; // create a "FLTK" WNDCLASS
+ static const char *first_class_name = 0L;
+ const char *class_name = w->xclass();
+ if (!class_name) class_name = first_class_name; // reuse first class name used
+ if (!class_name) class_name = "FLTK"; // default to create a "FLTK" WNDCLASS
+ if (!first_class_name) {
+ first_class_name = class_name;
+ }
const char* message_name = "FLTK::ThreadWakeup";