[patch] allow drag scrolling on images without link
Hi, the patch below allows drag scrolling on images that don't have a link. Cheers, Johannes diff -r 2d5370131f9f dw/image.cc --- a/dw/image.cc Sat Mar 08 16:56:13 2008 +0100 +++ b/dw/image.cc Mon Mar 10 22:06:20 2008 +0100 @@ -157,12 +157,15 @@ void Image::leaveNotifyImpl (core::Event bool Image::buttonPressImpl (core::EventButton *event) { - if (event->button == 3){ + if (event->button == 3) { (void)emitLinkPress(getStyle()->x_link, getStyle()->x_img, -1,-1,event); + return true; + } else if (getStyle()->x_link != -1) { + clicking = true; + return true; } else { - clicking = true; + return false; } - return true; } bool Image::buttonReleaseImpl (core::EventButton *event) @@ -170,8 +173,10 @@ bool Image::buttonReleaseImpl (core::Eve if (clicking) { clicking = false; emitLinkClick (getStyle()->x_link, getStyle()->x_img, -1, -1, event); + return true; + } else { + return false; } - return true; } void Image::draw (core::View *view, core::Rectangle *area)
On Tue, Mar 11, 2008 at 06:15:24PM -0400, Jorge Arellano Cid wrote:
Hi,
On Mon, Mar 10, 2008 at 10:09:29PM +0100, Johannes Hofmann wrote:
Hi,
the patch below allows drag scrolling on images that don't have a link.
Oh, I committed a patch fix to let click-to-load over unloaded images to work again (i.e. from img-off mode).
Good point. Thanks, Johannes
participants (2)
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de