mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 07:26:57 +08:00
Fix focus box redraw bug for buttons with FL_NO_BOX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
CHANGES IN FLTK 1.1.1
|
CHANGES IN FLTK 1.1.1
|
||||||
|
|
||||||
|
- Fl_Button redraw fix for bug #620979 (focus boxes and
|
||||||
|
check buttons).
|
||||||
- Fl_Text_Display fix for bug #620633 (crash on
|
- Fl_Text_Display fix for bug #620633 (crash on
|
||||||
redisplay).
|
redisplay).
|
||||||
- Fl_Output now calls its callback when the user clicks
|
- Fl_Output now calls its callback when the user clicks
|
||||||
|
|||||||
+10
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.17 2002/10/10 19:39:48 easysw Exp $"
|
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.18 2002/10/10 20:08:16 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Button widget for the Fast Light Tool Kit (FLTK).
|
// Button widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -118,7 +118,14 @@ int Fl_Button::handle(int event) {
|
|||||||
case FL_FOCUS :
|
case FL_FOCUS :
|
||||||
case FL_UNFOCUS :
|
case FL_UNFOCUS :
|
||||||
if (Fl::visible_focus()) {
|
if (Fl::visible_focus()) {
|
||||||
redraw();
|
if (box() == FL_NO_BOX) {
|
||||||
|
// Widgets with the FL_NO_BOX boxtype need a parent to
|
||||||
|
// redraw, since it is responsible for redrawing the
|
||||||
|
// background...
|
||||||
|
int X = x() > 0 ? x() - 1 : 0;
|
||||||
|
int Y = y() > 0 ? y() - 1 : 0;
|
||||||
|
window()->damage(FL_DAMAGE_ALL, X, Y, w() + 2, h() + 2);
|
||||||
|
} else redraw();
|
||||||
return 1;
|
return 1;
|
||||||
} else return 0;
|
} else return 0;
|
||||||
case FL_KEYBOARD :
|
case FL_KEYBOARD :
|
||||||
@@ -148,5 +155,5 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.17 2002/10/10 19:39:48 easysw Exp $".
|
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.18 2002/10/10 20:08:16 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user