From 99d39d4db69ca57281ea5cfe0b592ade0e34f6da Mon Sep 17 00:00:00 2001 From: corvid Date: Sun, 1 May 2011 06:13:52 +0000 Subject: 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. --- dw/fltkviewport.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dw/fltkviewport.cc') diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc index 58233004..c0574dff 100644 --- a/dw/fltkviewport.cc +++ b/dw/fltkviewport.cc @@ -208,9 +208,8 @@ int FltkViewport::handle (int event) _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) { -- cgit v1.2.3