diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/platform/gtk/MouseEventGtk.cpp | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/platform/gtk/MouseEventGtk.cpp')
-rw-r--r-- | WebCore/platform/gtk/MouseEventGtk.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/platform/gtk/MouseEventGtk.cpp b/WebCore/platform/gtk/MouseEventGtk.cpp index 29ea371..f441f00 100644 --- a/WebCore/platform/gtk/MouseEventGtk.cpp +++ b/WebCore/platform/gtk/MouseEventGtk.cpp @@ -31,11 +31,13 @@ #include "Assertions.h" #include <gdk/gdk.h> +#include <gtk/gtkversion.h> namespace WebCore { // FIXME: Would be even better to figure out which modifier is Alt instead of always using GDK_MOD1_MASK. +// Keep this in sync with the other platform event constructors PlatformMouseEvent::PlatformMouseEvent(GdkEventButton* event) { m_timestamp = event->time; @@ -44,7 +46,12 @@ PlatformMouseEvent::PlatformMouseEvent(GdkEventButton* event) m_shiftKey = event->state & GDK_SHIFT_MASK; m_ctrlKey = event->state & GDK_CONTROL_MASK; m_altKey = event->state & GDK_MOD1_MASK; - m_metaKey = event->state & GDK_MOD2_MASK; +#if GTK_CHECK_VERSION(2,10,0) + m_metaKey = event->state & GDK_META_MASK; +#else + // GDK_MOD2_MASK doesn't always mean meta so we can't use it + m_metaKey = false; +#endif switch (event->type) { case GDK_BUTTON_PRESS: |