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

Unified Diff: ui/base/events/event.cc

Issue 11761027: context menu does not work if one already open (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tweak Created 7 years, 11 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 | « no previous file | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event.cc
diff --git a/ui/base/events/event.cc b/ui/base/events/event.cc
index e999f3334375acdb3ea16b1a62e598476e693555..f6ed1a3a6e7348b025eebbb79c6039c7720211ff 100644
--- a/ui/base/events/event.cc
+++ b/ui/base/events/event.cc
@@ -104,6 +104,14 @@ std::string EventTypeName(ui::EventType type) {
return std::string();
}
+bool IsX11SendEventTrue(const base::NativeEvent& event) {
+#if defined(USE_X11)
+ if (event && event->xany.send_event)
+ return true;
+#endif
+ return false;
+}
+
} // namespace
namespace ui {
@@ -299,6 +307,9 @@ bool MouseEvent::IsRepeatedClickEvent(
(event2.flags() & ~EF_IS_DOUBLE_CLICK))
return false;
+ if (IsX11SendEventTrue(event2.native_event()))
+ return false;
+
base::TimeDelta time_difference = event2.time_stamp() - event1.time_stamp();
if (time_difference.InMilliseconds() > kDoubleClickTimeMS)
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698