diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H
index cb90226..8167149 100644
--- a/FL/Fl_Menu_Item.H
+++ b/FL/Fl_Menu_Item.H
@@ -240,7 +240,7 @@ struct FL_EXPORT Fl_Menu_Item {
     for the menu item's callback function.
     \see Fl_Callback_p Fl_MenuItem::callback() const
    */
-  void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)p;}
+  void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)(fl_intptr_t)p;}
 
   /**
     Gets the user_data() argument that is sent to the callback function.
@@ -264,7 +264,7 @@ struct FL_EXPORT Fl_Menu_Item {
     and stores it in the menu item's userdata() member.
     This may not be portable to some machines.
   */
-  void argument(long v) {user_data_ = (void*)v;}
+  void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;}
 
   /** Gets what key combination shortcut will trigger the menu item. */
   int shortcut() const {return shortcut_;}
@@ -394,7 +394,7 @@ struct FL_EXPORT Fl_Menu_Item {
     the callback.
     You must first check that callback() is non-zero before calling this.
   */
-  void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);}
+  void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)(fl_intptr_t)arg);}
 
   // back-compatibility, do not use:
 
diff --git a/FL/Fl_Value_Slider.H b/FL/Fl_Value_Slider.H
index 462cdb4..b6b4e5c 100644
--- a/FL/Fl_Value_Slider.H
+++ b/FL/Fl_Value_Slider.H
@@ -34,6 +34,7 @@ class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
     Fl_Font textfont_;
     Fl_Fontsize textsize_;
     Fl_Color textcolor_;
+    short textwidth_, textheight_;
 protected:
     void draw();
 public:
@@ -51,6 +52,14 @@ public:
     Fl_Color textcolor() const {return textcolor_;}
     /**    Sets the color of the text in the value box.  */
     void textcolor(Fl_Color s) {textcolor_ = s;}
+    /**    Sets the width of the text box in pixels (horizontal mode only).  */
+    void textwidth(int s) {textwidth_ = (short)s;}
+    /**    Gets the width of the text box in pixels (horizontal mode only).  */
+    int textwidth() const {return(textwidth_);}
+    /**    Sets the height of the text box in pixels (vertical mode only).  */
+    void textheight(int s) {textheight_ = (short)s;}
+    /**    Gets the height of the text box in pixels (vertical mode only).  */
+    int textheight() const {return(textheight_);}
 };
 
 #endif
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index de6166f..d3b4e15 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -584,7 +584,7 @@ public:
       \param[in] cb new callback
       \param[in] p user data
    */
-  void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)p;}
+  void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)(fl_intptr_t)p;}
 
   /** Gets the user data for this widget.
       Gets the current user data (void *) argument that is passed to the callback function.
@@ -606,7 +606,7 @@ public:
       \todo The user data value must be implemented using \em intptr_t or similar
       to avoid 64-bit machine incompatibilities.
    */
-  void argument(long v) {user_data_ = (void*)v;}
+  void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;}
 
   /** Returns the conditions under which the callback is called.
 
@@ -856,7 +856,7 @@ public:
       \param[in] arg call the callback with \p arg as the user data argument
       \see callback()
    */
-  void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)arg);}
+  void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)(fl_intptr_t)arg);}
 
   // Causes a widget to invoke its callback function with arbitrary arguments.
   // Documentation and implementation in Fl_Widget.cxx
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx
index ad6d9c6..752824b 100644
--- a/fluid/Fl_Menu_Type.cxx
+++ b/fluid/Fl_Menu_Type.cxx
@@ -281,14 +281,14 @@ int Fl_Menu_Item_Type::flags() {
 
 void Fl_Menu_Item_Type::write_item() {
   static const char * const labeltypes[] = {
-    "FL_NORMAL_LABEL",
-    "FL_NO_LABEL",
-    "FL_SHADOW_LABEL",
-    "FL_ENGRAVED_LABEL",
-    "FL_EMBOSSED_LABEL",
-    "FL_MULTI_LABEL",
-    "FL_ICON_LABEL",
-    "FL_IMAGE_LABEL"
+    "(uchar)FL_NORMAL_LABEL",
+    "(uchar)FL_NO_LABEL",
+    "(uchar)FL_SHADOW_LABEL",
+    "(uchar)FL_ENGRAVED_LABEL",
+    "(uchar)FL_EMBOSSED_LABEL",
+    "(uchar)FL_MULTI_LABEL",
+    "(uchar)FL_ICON_LABEL",
+    "(uchar)FL_IMAGE_LABEL"
   };
 
   write_comment_inline_c(" ");
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 4a85f14..98c78b9 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -2188,6 +2188,7 @@ void Fl_Widget_Type::write_code1() {
   indentation += 2;
 
   if (wused) write_c("%sw = o;\n", indent());
+  if (wused) write_c("%so = w;\n", indent());
 
   write_widget_code();
 }
diff --git a/src/Fl_Value_Slider.cxx b/src/Fl_Value_Slider.cxx
index ac06271..b2567b9 100644
--- a/src/Fl_Value_Slider.cxx
+++ b/src/Fl_Value_Slider.cxx
@@ -32,15 +32,17 @@ Fl_Value_Slider::Fl_Value_Slider(int X, int Y, int W, int H, const char*l)
   textfont_ = FL_HELVETICA;
   textsize_ = 10;
   textcolor_ = FL_FOREGROUND_COLOR;
+  textwidth_ = 35;
+  textheight_ = 25;
 }
 
 void Fl_Value_Slider::draw() {
   int sxx = x(), syy = y(), sww = w(), shh = h();
   int bxx = x(), byy = y(), bww = w(), bhh = h();
   if (horizontal()) {
-    bww = 35; sxx += 35; sww -= 35;
+    bww = textwidth(); sxx += textwidth(); sww -= textwidth();
   } else {
-    syy += 25; bhh = 25; shh -= 25;
+    syy += textheight(); bhh = textheight(); shh -= textheight();
   }
   if (damage()&FL_DAMAGE_ALL) draw_box(box(),sxx,syy,sww,shh,color());
   Fl_Slider::draw(sxx+Fl::box_dx(box()),
@@ -62,9 +64,9 @@ int Fl_Value_Slider::handle(int event) {
   }
   int sxx = x(), syy = y(), sww = w(), shh = h();
   if (horizontal()) {
-    sxx += 35; sww -= 35;
+    sxx += textwidth(); sww -= textwidth();
   } else {
-    syy += 25; shh -= 25;
+    syy += textheight(); shh -= textheight();
   }
   return Fl_Slider::handle(event,
 			   sxx+Fl::box_dx(box()),
diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx
index bde2b46..4807b84 100644
--- a/src/fl_boxtype.cxx
+++ b/src/fl_boxtype.cxx
@@ -293,14 +293,16 @@ static struct {
   {fl_down_box,		1,1,2,2,0}, // _FL_GTK_THIN_ROUND_DOWN_BOX
   {fl_up_box,		2,2,4,4,0}, // _FL_GTK_ROUND_UP_BOX
   {fl_down_box,		2,2,4,4,0}, // _FL_GTK_ROUND_DOWN_BOX
-  {fl_up_box,		2,2,4,4,0}, // _FL_GLEAM_UP_BOX
-  {fl_down_box,		2,2,4,4,0}, // _FL_GLEAM_DOWN_BOX
-  {fl_up_frame,		2,2,4,4,0}, // _FL_GLEAM_UP_FRAME
-  {fl_down_frame,	2,2,4,4,0}, // _FL_GLEAM_DOWN_FRAME
-  {fl_up_box,		1,1,2,2,0}, // _FL_GLEAM_THIN_UP_BOX
-  {fl_down_box,		1,1,2,2,0}, // _FL_GLEAM_THIN_DOWN_BOX
-  {fl_up_box,	       	2,2,4,4,0}, // _FL_GLEAM_ROUND_UP_BOX
-  {fl_down_box,		2,2,4,4,0}, // _FL_GLEAM_ROUND_DOWN_BOX
+/* >>>>>>> Apply Csaba's full patch from STR #2813. */
+  {fl_up_box,		2,2,3,3,0}, // _FL_GLEAM_UP_BOX,
+  {fl_down_box,		2,2,3,3,0}, // _FL_GLEAM_DOWN_BOX,
+  {fl_up_frame,		2,2,3,3,0}, // _FL_GLEAM_UP_FRAME,
+  {fl_down_frame,	2,2,3,3,0}, // _FL_GLEAM_DOWN_FRAME,
+  {fl_up_box,		1,1,1,1,0}, // _FL_GLEAM_THIN_UP_BOX,
+  {fl_down_box,		1,1,1,1,0}, // _FL_GLEAM_THIN_DOWN_BOX,
+  {fl_up_box,		2,2,3,3,0}, // _FL_GLEAM_ROUND_UP_BOX,
+  {fl_down_box,		2,2,3,3,0}, // _FL_GLEAM_ROUND_DOWN_BOX,
+/* <<<<<<< Apply Csaba's full patch from STR #2813. */
   {fl_up_box,		3,3,6,6,0}, // FL_FREE_BOX+0
   {fl_down_box,		3,3,6,6,0}, // FL_FREE_BOX+1
   {fl_up_box,		3,3,6,6,0}, // FL_FREE_BOX+2
diff --git a/test/arc.cxx b/test/arc.cxx
index 699be6b..81a60e0 100644
--- a/test/arc.cxx
+++ b/test/arc.cxx
@@ -75,11 +75,8 @@ int main(int argc, char** argv) {
     s->step(1);
     s->value(args[n]);
     s->align(FL_ALIGN_LEFT);
-#ifdef __LP64__
-    s->callback(slider_cb, (void*)(long long) n);
-#else
-    s->callback(slider_cb, (void*) n);
-#endif
+    s->callback(slider_cb, (void*)(fl_intptr_t)n);
+
   }
 
   window.end();
diff --git a/test/curve.cxx b/test/curve.cxx
index 42e9319..01e9847 100644
--- a/test/curve.cxx
+++ b/test/curve.cxx
@@ -91,11 +91,7 @@ int main(int argc, char** argv) {
     s->step(1);
     s->value(args[n]);
     s->align(FL_ALIGN_LEFT);
-#ifdef __LP64__
-    s->callback(slider_cb, (void*) (long long)n);
-#else
-    s->callback(slider_cb, (void*)n);
-#endif
+    s->callback(slider_cb, (void*)(fl_intptr_t)n);
   }
   Fl_Toggle_Button but(50,y,50,25,"points");
   but.callback(points_cb);
diff --git a/test/forms.cxx b/test/forms.cxx
index a558bc3..4288dd0 100644
--- a/test/forms.cxx
+++ b/test/forms.cxx
@@ -38,26 +38,26 @@ typedef struct { int val; const char *name; } VN_struct;
 
 static VN_struct btypes[]=
 {
-   {FL_NO_BOX,"no box"},
-   {FL_UP_BOX, "up box"},
-   {FL_DOWN_BOX,"down box"},
-   {FL_BORDER_BOX,"border box"},
-   {FL_SHADOW_BOX,"shadow box"},
-   {FL_FLAT_BOX,"flat box"},
-   {FL_FRAME_BOX,"frame box"},
-   {FL_EMBOSSED_BOX,"embossed box"},
-   {FL_ROUNDED_BOX,"rounded box"},
-   {FL_RFLAT_BOX,"rflat box"},
-   {FL_RSHADOW_BOX,"rshadow box"}, // renamed for fltk
-   {FL_OVAL_BOX,"oval box"},
-   {FL_ROUNDED3D_UPBOX,"rounded3d upbox"},
-   {FL_ROUNDED3D_DOWNBOX,"rounded3d downbox"},
-   {FL_OVAL3D_UPBOX,"oval3d upbox"},
-   {FL_OVAL3D_DOWNBOX,"oval3d downbox"},
-   {FL_PLASTIC_UP_BOX,"plastic upbox"},
-   {FL_PLASTIC_DOWN_BOX,"plastic downbox"},
-   {FL_GTK_UP_BOX,"GTK up box"},
-   {FL_GTK_ROUND_UP_BOX,"GTK round up box"},
+   {(int)FL_NO_BOX,"no box"},
+   {(int)FL_UP_BOX, "up box"},
+   {(int)FL_DOWN_BOX,"down box"},
+   {(int)FL_BORDER_BOX,"border box"},
+   {(int)FL_SHADOW_BOX,"shadow box"},
+   {(int)FL_FLAT_BOX,"flat box"},
+   {(int)FL_FRAME_BOX,"frame box"},
+   {(int)FL_EMBOSSED_BOX,"embossed box"},
+   {(int)FL_ROUNDED_BOX,"rounded box"},
+   {(int)FL_RFLAT_BOX,"rflat box"},
+   {(int)FL_RSHADOW_BOX,"rshadow box"}, // renamed for fltk
+   {(int)FL_OVAL_BOX,"oval box"},
+   {(int)FL_ROUNDED3D_UPBOX,"rounded3d upbox"},
+   {(int)FL_ROUNDED3D_DOWNBOX,"rounded3d downbox"},
+   {(int)FL_OVAL3D_UPBOX,"oval3d upbox"},
+   {(int)FL_OVAL3D_DOWNBOX,"oval3d downbox"},
+   {(int)FL_PLASTIC_UP_BOX,"plastic upbox"},
+   {(int)FL_PLASTIC_DOWN_BOX,"plastic downbox"},
+   {(int)FL_GTK_UP_BOX,"GTK up box"},
+   {(int)FL_GTK_ROUND_UP_BOX,"GTK round up box"},
    {FL_GLEAM_UP_BOX,"Gleam up box"},
    /* sentinel */
    {-1}
