Added redraw on focus vi FL_PUSH for roller, browser and slider

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4425 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-07-16 08:25:06 +00:00
parent 56933d2b80
commit b500645a5e
4 changed files with 13 additions and 3 deletions

View File

@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745)
- Added redraw of some widgets to show focus change (STR #910)
- Fl::set_font would not clear 'pretty' name (STR #902)
- Fixed unescaped '@' in fonts demo (STR #867)
- Fluid should not open the Display connection anymore if

View File

@ -605,7 +605,10 @@ int Fl_Browser_::handle(int event) {
switch (event) {
case FL_PUSH:
if (!Fl::event_inside(X, Y, W, H)) return 0;
if (Fl::visible_focus()) Fl::focus(this);
if (Fl::visible_focus()) {
Fl::focus(this);
redraw();
}
my = py = Fl::event_y();
change = 0;
if (type() == FL_NORMAL_BROWSER || !top_)

View File

@ -37,7 +37,10 @@ int Fl_Roller::handle(int event) {
int newpos = horizontal() ? Fl::event_x() : Fl::event_y();
switch (event) {
case FL_PUSH:
if (Fl::visible_focus()) Fl::focus(this);
if (Fl::visible_focus()) {
Fl::focus(this);
redraw();
}
handle_push();
ipos = newpos;
return 1;

View File

@ -278,7 +278,10 @@ int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
}
int Fl_Slider::handle(int event) {
if (event == FL_PUSH && Fl::visible_focus()) Fl::focus(this);
if (event == FL_PUSH && Fl::visible_focus()) {
Fl::focus(this);
redraw();
}
return handle(event,
x()+Fl::box_dx(box()),