Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: webkit/api/src/gtk/WebInputEventFactory.cpp

Issue 115330: linux: Adding events to windowless plugins on Linux (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/api/public/WebInputEvent.h ('k') | webkit/api/src/mac/WebInputEventFactory.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/gtk/WebInputEventFactory.cpp
===================================================================
--- webkit/api/src/gtk/WebInputEventFactory.cpp (revision 16673)
+++ webkit/api/src/gtk/WebInputEventFactory.cpp (working copy)
@@ -62,6 +62,12 @@
if (state & GDK_META_MASK)
modifiers |= WebInputEvent::MetaKey;
#endif
+ if (state & GDK_BUTTON1_MASK)
+ modifiers |= WebInputEvent::LeftButtonDown;
+ if (state & GDK_BUTTON2_MASK)
+ modifiers |= WebInputEvent::MiddleButtonDown;
+ if (state & GDK_BUTTON3_MASK)
+ modifiers |= WebInputEvent::RightButtonDown;
return modifiers;
}
@@ -71,6 +77,7 @@
{
WebKeyboardEvent result;
+ result.timeStampSeconds = gdkEventTimeToWebEventTime(event->time);
result.modifiers = gdkStateToWebEventModifiers(event->state);
switch (event->type) {
@@ -123,6 +130,8 @@
result.modifiers = gdkStateToWebEventModifiers(event->state);
result.x = static_cast<int>(event->x);
result.y = static_cast<int>(event->y);
+ result.windowX = result.x;
+ result.windowY = result.y;
result.globalX = static_cast<int>(event->x_root);
result.globalY = static_cast<int>(event->y_root);
result.clickCount = 0;
@@ -165,6 +174,8 @@
result.modifiers = gdkStateToWebEventModifiers(event->state);
result.x = static_cast<int>(event->x);
result.y = static_cast<int>(event->y);
+ result.windowX = result.x;
+ result.windowY = result.y;
result.globalX = static_cast<int>(event->x_root);
result.globalY = static_cast<int>(event->y_root);
@@ -200,6 +211,8 @@
result.modifiers = gdkStateToWebEventModifiers(event->state);
result.x = static_cast<int>(event->x);
result.y = static_cast<int>(event->y);
+ result.windowX = result.x;
+ result.windowY = result.y;
result.globalX = static_cast<int>(event->x_root);
result.globalY = static_cast<int>(event->y_root);
« no previous file with comments | « webkit/api/public/WebInputEvent.h ('k') | webkit/api/src/mac/WebInputEventFactory.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698