diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-01 11:29:53 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-01 11:29:53 -0400 |
commit | b1fdbc950ab2cd17b09d8d23556d0cced6966b96 (patch) | |
tree | 6d67d7b3003fffe117c5e637dc50e3e67a5022f9 | |
parent | 203ce6f77717d0ef0128e434c039fbece6381817 (diff) |
crossing-events part3 (fix leaving a link into a non-dw widget)
This patch also disables unused code in Layout::leaveNotify()
-rw-r--r-- | dw/layout.cc | 4 | ||||
-rw-r--r-- | dw/textblock.cc | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc index 1e3da7ca..1c8c44b7 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -823,6 +823,7 @@ void Layout::enterNotify (View *view, int x, int y, ButtonState state) */ void Layout::leaveNotify (View *view, ButtonState state) { +#if 0 Widget *lastWidget; EventCrossing event; @@ -835,6 +836,9 @@ void Layout::leaveNotify (View *view, ButtonState state) event.currentWidget = widgetAtPoint; lastWidget->leaveNotify (&event); } +#else + moveOutOfView (state); +#endif } /* diff --git a/dw/textblock.cc b/dw/textblock.cc index e1689ea5..3a2bf49c 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -592,7 +592,12 @@ void Textblock::enterNotifyImpl (core::EventCrossing *event) void Textblock::leaveNotifyImpl (core::EventCrossing *event) { - _MSG(" tb=%p, LEAVE NotifyImpl\n", this); + _MSG(" tb=%p, LEAVE NotifyImpl: hoverLink=%d\n", this, hoverLink); + + /* leaving the viewport can't be handled by motionNotifyImpl() */ + if (hoverLink >= 0) + layout->emitLinkEnter (this, -1, -1, -1, -1); + if (hoverTooltip) { hoverTooltip->onLeave(); hoverTooltip = NULL; |