]> source.dussan.org Git - tigervnc.git/commitdiff
Re-commit MSVC build fixes, which were forcibly removed by 4675. Please (a) bring...
authorDRC <dcommander@users.sourceforge.net>
Tue, 4 Oct 2011 02:09:13 +0000 (02:09 +0000)
committerDRC <dcommander@users.sourceforge.net>
Tue, 4 Oct 2011 02:09:13 +0000 (02:09 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4689 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/fltk/FL/Fl_Widget.H
common/fltk/src/fl_draw_pixmap.cxx

index 5cc6a7960f77f4be7f2d78145ed9fcdba544c343..041b2d36e8bfe1e0ab08efc6f890b82da9a18b1d 100644 (file)
@@ -108,6 +108,7 @@ struct FL_EXPORT Fl_Label {
  */
 class FL_EXPORT Fl_Widget {
   friend class Fl_Group;
+  friend class Fl_X;
 
   Fl_Group* parent_;
   Fl_Callback* callback_;
index 8296f6712da7dd0f90121d32eaaf5856675571b5..b02448597e4ba77df6fc0b1c971aca10599ef7a4 100644 (file)
@@ -128,7 +128,7 @@ int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) {
   if ((chars_per_pixel < 1) || (chars_per_pixel > 2))
     return 0;
 
-  uchar colors[1<<(chars_per_pixel*8)][4];
+  uchar (*colors)[4] = new uchar [1<<(chars_per_pixel*8)][4];
 
 #ifdef WIN32
   color_count = 0;
@@ -229,6 +229,7 @@ int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) {
     }
   }
   
+  delete [] colors;
   return 1;
 }
 
@@ -242,10 +243,12 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
   if (!fl_measure_pixmap(cdata, w, h))
     return 0;
 
-  uchar buffer[w*h*4];
+  uchar *buffer = new uchar[w*h*4];
 
-  if (!fl_convert_pixmap(cdata, buffer, bg))
+  if (!fl_convert_pixmap(cdata, buffer, bg)) {
+    delete buffer;
     return 0;
+  }
 
   // FIXME: Hack until fl_draw_image() supports alpha properly
 #ifdef  __APPLE_QUARTZ__
@@ -292,6 +295,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
     }
 #endif
 
+  delete buffer;
   return 1;
 }