diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-13 21:12:44 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-13 21:12:44 +0100 |
commit | f0acc85e5c31a7df366c7dd9492438731a1d65ef (patch) | |
tree | 78010a14a23bd0c0a09609228e56260be370d990 /dw | |
parent | b45b1791eee02392840984d6836368c004fbfb5a (diff) | |
parent | 41fcd4d8148404ebcad1ed19f11858a4b502148e (diff) |
merge with cvs
Diffstat (limited to 'dw')
-rw-r--r-- | dw/findtext.hh | 2 | ||||
-rw-r--r-- | dw/fltkviewbase.cc | 4 | ||||
-rw-r--r-- | dw/style.hh | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/dw/findtext.hh b/dw/findtext.hh index d0c20206..e9fb57c2 100644 --- a/dw/findtext.hh +++ b/dw/findtext.hh @@ -65,7 +65,7 @@ private: inline static bool charsEqual (char c1, char c2, bool caseSens) { return caseSens ? c1 == c2 : tolower (c1) == tolower (c2) || - isspace (c1) && isspace (c2); } + (isspace (c1) && isspace (c2)); } public: FindtextState (); diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index a282efd8..6e0f5bd7 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -204,6 +204,10 @@ int FltkViewBase::handle (int event) translateViewYToCanvasY (event_y ()), getDwButtonState (), event_button ()); //printf ("PUSH => %s\n", processed ? "true" : "false"); + if (processed) { + /* pressed dw content; fltk widgets should no longer have focus */ + ::fltk::focus(NULL); + } return processed ? true : Group::handle (event); case RELEASE: diff --git a/dw/style.hh b/dw/style.hh index 492efd30..0dd7fbd4 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -346,11 +346,11 @@ inline Length createAbsLength(int n) { return (n << 2) | 1; } /** \brief Returns a percentage, \em v is relative to 1, not to 100. */ inline Length createPerLength(double v) { - return (int)(v * (1 << 18)) & ~3 | 2; } + return ((int)(v * (1 << 18)) & ~3) | 2; } /** \brief Returns a relative length. */ inline Length createRelLength(double v) { - return (int)(v * (1 << 18)) & ~3 | 3; } + return ((int)(v * (1 << 18)) & ~3) | 3; } /** \brief Returns true if \em l is an absolute length. */ inline bool isAbsLength(Length l) { return (l & 3) == 1; } |