changeset 1996:e80effb57d8a

check scrollbar visibility before sending it events There's probably useful untangling of the scrollbar code that one could do because they're probably supposed to resize to zero thickness when we can't see them, but... And as for the modifier check, it was originally added in http://cvs.auriga.wearlab.de/cgi-bin/cvsweb.cgi/dw2/dw/fltkviewport.cc?cvsroot=dillo#rev1.21 which just says "Fixed an include for OpenBSD compatibility." -- so I have no idea whether it's there for a reason. If a reason reveals itself, I can add a comment.
author corvid <corvid@lavabit.com>
date Sun, 01 May 2011 06:13:52 +0000
parents 5c3180af5df3
children 6debdc67273e 05efd54ba3ef
files dw/fltkviewport.cc
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkviewport.cc	Sat Apr 30 22:18:45 2011 -0300
+++ b/dw/fltkviewport.cc	Sun May 01 06:13:52 2011 +0000
@@ -208,9 +208,8 @@
    _MSG("FltkViewport::handle %d\n", event);
 
    if (!dragScrolling &&
-       (Fl::event_inside(vscrollbar) ||
-        (Fl::event_inside(hscrollbar) &&
-         !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT)))))
+       ((vscrollbar->visible() && Fl::event_inside(vscrollbar)) ||
+        (hscrollbar->visible() && Fl::event_inside(hscrollbar))))
       return Fl_Group::handle(event);
 
    switch(event) {