DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2053
Version: 1.3-feature





Link: http://www.fltk.org/str.php?L2053
Version: 1.3-feature
Index: src/Fl_Window.cxx
===================================================================
--- src/Fl_Window.cxx   (revision 7168)
+++ src/Fl_Window.cxx   (working copy)
@@ -40,6 +40,8 @@
 #include <FL/fl_draw.H>
 #endif
 
+const char* Fl_Window::default_xclass_ = 0;
+
 void Fl_Window::_Fl_Window() {
   type(FL_WINDOW);
   box(FL_FLAT_BOX);
@@ -154,6 +156,10 @@
   set_flag(COPIED_LABEL);
 }
 
+void Fl_Window::xclass(const char* c) {
+  xclass_ = c;
+  if(!default_xclass_ && c) default_xclass_ = strdup(c);
+}
 
 void Fl_Window::iconlabel(const char *iname) {
   unsigned saveflags = flags();
@@ -181,7 +187,6 @@
   return current_;
 }
 
-
 //
 // End of "$Id$".
 //
Index: FL/Fl_Window.H
===================================================================
--- FL/Fl_Window.H      (revision 7168)
+++ FL/Fl_Window.H      (working copy)
@@ -57,6 +57,8 @@
 */
 class FL_EXPORT Fl_Window : public Fl_Group {
 
+  static const char *default_xclass_;
+
   friend class Fl_X;
   Fl_X *i; // points at the system-specific stuff
 
@@ -324,7 +326,7 @@
   void label(const char* label, const char* iconlabel); // platform dependent 
   void copy_label(const char* a);
   /** See void Fl_Window::xclass(const char*) */
-  const char* xclass() const   {return xclass_;}
+  const char* xclass() const   {if(xclass_) return xclass_; else return 
default_xclass_;}
   /**
     A string used to tell the system what type of window this is. Mostly
     this identifies the picture to draw in the icon. <I>Under X, this is
@@ -339,7 +341,7 @@
     visible effect. The passed pointer is stored unchanged. The string 
     is not copied.
   */
-  void xclass(const char* c)   {xclass_ = c;}
+  void xclass(const char* c);
   /** Gets the current icon window target dependent data. */
   const void* icon() const     {return icon_;}
   /** Sets the current icon window target dependent data. */
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to