diff options
Diffstat (limited to 'chromium/ui/ozone/platform/wayland/wayland_pointer.h')
-rw-r--r-- | chromium/ui/ozone/platform/wayland/wayland_pointer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chromium/ui/ozone/platform/wayland/wayland_pointer.h b/chromium/ui/ozone/platform/wayland/wayland_pointer.h index 9550da69334..9515dfccdac 100644 --- a/chromium/ui/ozone/platform/wayland/wayland_pointer.h +++ b/chromium/ui/ozone/platform/wayland/wayland_pointer.h @@ -5,6 +5,7 @@ #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_ #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_ +#include "base/macros.h" #include "ui/events/ozone/evdev/event_dispatch_callback.h" #include "ui/gfx/geometry/point_f.h" #include "ui/ozone/platform/wayland/wayland_cursor.h" @@ -12,6 +13,8 @@ namespace ui { +class WaylandWindow; + class WaylandPointer { public: WaylandPointer(wl_pointer* pointer, const EventDispatchCallback& callback); @@ -26,6 +29,10 @@ class WaylandPointer { WaylandCursor* cursor() { return cursor_.get(); } + void reset_window_with_pointer_focus() { + window_with_pointer_focus_ = nullptr; + } + private: // wl_pointer_listener static void Enter(void* data, @@ -60,11 +67,18 @@ class WaylandPointer { wl::Object<wl_pointer> obj_; EventDispatchCallback callback_; gfx::PointF location_; + // Flags is a bitmask of EventFlags corresponding to the pointer/keyboard + // state. int flags_ = 0; // Keeps track of current modifiers. These are needed in order to properly // update |flags_| with newest modifiers. int keyboard_modifiers_ = 0; + + // The window the mouse is over. + WaylandWindow* window_with_pointer_focus_ = nullptr; + + DISALLOW_COPY_AND_ASSIGN(WaylandPointer); }; } // namespace ui |