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
--- FL/Fl_Window.H.original     2008-09-18 16:09:34.000000000 -0300
+++ FL/Fl_Window.H      2008-10-01 06:57:53.000000000 -0300
@@ -55,6 +55,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
 
@@ -261,7 +263,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
@@ -275,7 +277,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 */
--- src/Fl_Window.cxx.original  2008-09-25 15:26:33.000000000 -0300
+++ src/Fl_Window.cxx   2008-10-01 06:57:43.000000000 -0300
@@ -39,6 +39,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);
@@ -152,6 +154,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) {
   // FIXME: 'flags' is 32 bit large!
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to