summaryrefslogtreecommitdiffstats
path: root/webkit/glue/event_conversion.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 21:58:49 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 21:58:49 +0000
commitf11a676e8cb6503bf7ed3881d4d20a49612e3cbd (patch)
tree121a58e821b437f62be7a188776c83ef577b9653 /webkit/glue/event_conversion.cc
parentd6890fac98901cfd564bd87096870ed27285b5fc (diff)
downloadchromium_src-f11a676e8cb6503bf7ed3881d4d20a49612e3cbd.zip
chromium_src-f11a676e8cb6503bf7ed3881d4d20a49612e3cbd.tar.gz
chromium_src-f11a676e8cb6503bf7ed3881d4d20a49612e3cbd.tar.bz2
Fix mouse and keyboard input a bit.
Review URL: http://codereview.chromium.org/10886 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/event_conversion.cc')
-rw-r--r--webkit/glue/event_conversion.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc
index b780d05..b93da38 100644
--- a/webkit/glue/event_conversion.cc
+++ b/webkit/glue/event_conversion.cc
@@ -73,6 +73,18 @@ MakePlatformMouseEvent::MakePlatformMouseEvent(Widget* widget,
m_eventType = MouseEventMoved;
break;
+ // TODO(port): make these platform agnostic when we restructure this code.
+#if defined(OS_LINUX)
+ case WebInputEvent::MOUSE_DOUBLE_CLICK:
+ ++m_clickCount;
+ // fall through
+ case WebInputEvent::MOUSE_DOWN:
+ ++m_clickCount;
+ last_click_time_ = current_time;
+ last_click_button = m_button;
+ m_eventType = MouseEventPressed;
+ break;
+#else
case WebInputEvent::MOUSE_DOWN:
case WebInputEvent::MOUSE_DOUBLE_CLICK:
if (!cancel_previous_click && (m_button == last_click_button)) {
@@ -86,6 +98,7 @@ MakePlatformMouseEvent::MakePlatformMouseEvent(Widget* widget,
m_clickCount = last_click_count_;
m_eventType = MouseEventPressed;
break;
+#endif
case WebInputEvent::MOUSE_UP:
m_clickCount = last_click_count_;