summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-07-24 19:08:31 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-07-24 19:08:31 +0000
commitb1ad1a2f96b8296f51980972331610dac87edae6 (patch)
treeb81dd5a12e03030e7997ae4afa0ffeb9349b720b
parent458d1dc75d75af2535bc533dba21f61f0b9ae8fe (diff)
STR #848, missing xclass support implemented as suggested by Mike.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4455 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-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";