aboutsummaryrefslogtreecommitdiff
path: root/dw/fltkviewport.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-02-23 08:19:03 +0000
committercorvid <corvid@lavabit.com>2011-02-23 08:19:03 +0000
commit144a37853adef52ba8024329859daea1c5c96c6f (patch)
treef994a3cb8cde2fc11ada937652663ebb0c544640 /dw/fltkviewport.cc
parent151ad1018b0c1481474617ca96d393d95dd8a07e (diff)
view and form widget focusing
Diffstat (limited to 'dw/fltkviewport.cc')
-rw-r--r--dw/fltkviewport.cc27
1 files changed, 7 insertions, 20 deletions
diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc
index 12796405..d0080a05 100644
--- a/dw/fltkviewport.cc
+++ b/dw/fltkviewport.cc
@@ -223,17 +223,6 @@ int FltkViewport::handle (int event)
case FL_FOCUS:
/** \bug Draw focus box. */
-#if 0
-PORT1.3
- /* If the user clicks with the left button we take focus
- * and thereby unfocus any form widgets.
- * Otherwise we let fltk do the focus handling.
- */
- if (Fl::event_button() == FL_LEFT_MOUSE || focus_index() < 0) {
- focus_index(-1);
- return 1;
- }
-#endif
break;
case FL_UNFOCUS:
@@ -241,17 +230,15 @@ PORT1.3
break;
case FL_PUSH:
- take_focus();
- if (Fl::event_button() == FL_MIDDLE_MOUSE) {
+ if (FltkWidgetView::handle (event) == 0 &&
+ Fl::event_button() == FL_MIDDLE_MOUSE) {
/* pass event so that middle click can open link in new window */
- if (FltkWidgetView::handle (event) == 0) {
- dragScrolling = 1;
- dragX = Fl::event_x();
- dragY = Fl::event_y();
- setCursor (core::style::CURSOR_MOVE);
- }
- return 1;
+ dragScrolling = 1;
+ dragX = Fl::event_x();
+ dragY = Fl::event_y();
+ setCursor (core::style::CURSOR_MOVE);
}
+ return 1;
break;
case FL_DRAG: