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

Unified Diff: ui/events/x/events_x_utils.cc

Issue 1602173005: Add PlatformWindow/Event related code for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: XEventDispatcher added. Created 4 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
Index: ui/events/x/events_x_utils.cc
diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc
index fb762f5294f1d8a2081e907cf04ad91e6c323161..a5247f2cd42d58b78be8e980484c8601e8dc1ad1 100644
--- a/ui/events/x/events_x_utils.cc
+++ b/ui/events/x/events_x_utils.cc
@@ -26,7 +26,6 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/x/x11_atom_cache.h"
-#include "ui/gfx/x/x11_types.h"
namespace {
@@ -306,6 +305,13 @@ bool GetGestureTimes(const XEvent& xev, double* start_time, double* end_time) {
namespace ui {
+XID XWindowFromXEvent(const XEvent& xev) {
+ XID target = xev.xany.window;
+ if (xev.type == GenericEvent)
+ target = static_cast<XIDeviceEvent*>(xev.xcookie.data)->event;
+ return target;
+}
+
EventType EventTypeFromXEvent(const XEvent& xev) {
// Allow the DeviceDataManager to block the event. If blocked return
// ET_UNKNOWN as the type so this event will not be further processed.

Powered by Google App Engine
This is Rietveld 408576698