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

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: Fix deps problem. 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 452c096a06a1e4baa0fc296cc2cbf8062703f913..e6f166b06e51e10e7797a89ddf404ad65e540ca3 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 {
@@ -324,6 +323,13 @@ base::TimeDelta TimeDeltaFromXEventTime(uint32_t timestamp) {
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