aboutsummaryrefslogtreecommitdiff
path: root/dw/image.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-07-21 01:05:37 +0000
committercorvid <corvid@lavabit.com>2009-07-21 01:05:37 +0000
commit24a7fb9e8358eb0659cd554fc21038b3ac1d0d7a (patch)
treea869ee00debe60c202cb5eb1f1c8d8f17560f805 /dw/image.cc
parenta1a0b14bc42e761cb67241858d725780bc126809 (diff)
oops, emitLinkClick x,y must be -1 for usemap
Diffstat (limited to 'dw/image.cc')
-rw-r--r--dw/image.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/dw/image.cc b/dw/image.cc
index 7e0c05dd..b5d6082b 100644
--- a/dw/image.cc
+++ b/dw/image.cc
@@ -305,14 +305,11 @@ bool Image::buttonPressImpl (core::EventButton *event)
bool Image::buttonReleaseImpl (core::EventButton *event)
{
- int x = -1, y = -1;
-
- if (mapList || isMap) {
- x = contentX(event);
- y = contentY(event);
- }
- currLink = mapList ? mapList->link (mapKey, x, y) : getStyle()->x_link;
+ currLink = mapList ? mapList->link (mapKey, contentX(event),contentY(event)):
+ getStyle()->x_link;
if (clicking) {
+ int x = isMap ? contentX(event) : -1;
+ int y = isMap ? contentY(event) : -1;
clicking = false;
emitLinkClick (currLink, getStyle()->x_img, x, y, event);
return true;