changeset 3959:a012eab2c057

can't use fl_oldfocus anymore -- this will make focus behaviour somewhat screwy http://lists.dillo.org/pipermail/dillo-dev/2014-November/010273.html A couple of months ago, Lauri Kasanen made some changes to fltk's linker stuff, and I guess we're seeing the effect here. As for focus behaviour being screwy, if you click on a page to give it focus, then move the cursor away and then back onto the page, it won't get focus again -- focus will go to an input or the location bar or something.
author corvid
date Sun, 16 Nov 2014 05:35:16 +0000
parents 8111dadacb40
children e6512b63be59
files dw/fltkviewbase.cc dw/fltkviewbase.hh
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkviewbase.cc	Sat Nov 15 01:39:27 2014 +0100
+++ b/dw/fltkviewbase.cc	Sun Nov 16 05:35:16 2014 +0000
@@ -27,8 +27,6 @@
 #include <stdio.h>
 #include "../lout/msg.h"
 
-extern Fl_Widget* fl_oldfocus;
-
 using namespace lout::object;
 using namespace lout::container::typed;
 
@@ -71,7 +69,7 @@
    canvasHeight = 1;
    bgColor = FL_WHITE;
    mouse_x = mouse_y = 0;
-   focused_child = NULL;
+   // focused_child = NULL;
    exposeArea = NULL;
    if (backBuffer == NULL) {
       backBuffer = new BackBuffer ();
@@ -357,6 +355,8 @@
    case FL_LEAVE:
       theLayout->leaveNotify (this, getDwButtonState ());
       break;
+#if 0
+   // BUG: starting with fltk-1.3.3, we can't use fl_oldfocus.
    case FL_FOCUS:
       if (focused_child && find(focused_child) < children()) {
          /* strangely, find() == children() if the child is not found */
@@ -366,6 +366,7 @@
    case FL_UNFOCUS:
       focused_child = fl_oldfocus;
       return 0;
+#endif
    case FL_KEYBOARD:
       if (Fl::event_key() == FL_Tab)
          return manageTabToFocus();
--- a/dw/fltkviewbase.hh	Sat Nov 15 01:39:27 2014 +0100
+++ b/dw/fltkviewbase.hh	Sun Nov 16 05:35:16 2014 +0000
@@ -56,7 +56,7 @@
    core::Layout *theLayout;
    int canvasWidth, canvasHeight;
    int mouse_x, mouse_y;
-   Fl_Widget *focused_child;
+   // Fl_Widget *focused_child;
 
    virtual int translateViewXToCanvasX (int x) = 0;
    virtual int translateViewYToCanvasY (int y) = 0;