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

[STR New]

Link: http://www.fltk.org/str.php?L2264
Version: 1.3-current


Hi. I've encountered nasty bug with labels. I've tried to figure out how to
reproduce it for quite long time. So:

I have this little example: window with several widgets(see screenshots).
Pressing on "click me" button will take value from text input widget(upper
one) and set it as label for text output widget. This cause very often that
label of input text widget(unrelated one) becomes "dirty" (see screenshots)

I already know that actually I have to call function to redraw parent
window, because I'm changing external label, and everything would seem
fine, but this will just hide this bug. Because it occurs to me in some
other cases: hide/show of another window(currently I'm trying to figure
out how to reproduce it more or less constantly). Sometime even inner
labels(e.g. button's label) becomes dirty.
If I use fltk without xft support everything is fine.

$ uname -orsf
Linux 2.6.30-gentoo-r4 x86_64 GNU/Linux

See example.cpp and screenshots.


Link: http://www.fltk.org/str.php?L2264
Version: 1.3-current
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Output.H>

Fl_Output* w;
Fl_Input*  e;
Fl_Window *main_win;

void cb_click(Fl_Button*, void*)
{
   w->label(e->value());
}

int main(int argc, char **argv)
{

   { main_win = new Fl_Double_Window(330, 165);
      main_win->selection_color((Fl_Color)48);
      main_win->callback((Fl_Callback*)cb_click, (void*)(main_win));
      main_win->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
      main_win->when(FL_WHEN_CHANGED);
      { Fl_Button* o = new Fl_Button(25, 25, 70, 20, "click me");
         o->callback((Fl_Callback*)cb_click);
      } // Fl_Button* o
      { e = new Fl_Input(190, 25, 105, 30, "input:");
      } // Fl_Input* e
      { w = new Fl_Output(215, 95, 70, 30, "some label");
      } // Fl_Output* w
      main_win->end();
   } // Fl_Double_Window* main_win

   main_win->show();
   return Fl::run();
}
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to