[PATCH 1/3 wayland-fits] core/pointer: Keep track of the focus serial
Neil Roberts
neil at linux.intel.com
Wed Sep 25 11:06:50 PDT 2013
The focus serial is needed to correctly send a cursor so it is useful
to be able to verify that this is working correctly.
---
src/test/core/pointer.cpp | 2 ++
src/test/core/pointer.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/test/core/pointer.cpp b/src/test/core/pointer.cpp
index be6f9a9..eb94fd3 100644
--- a/src/test/core/pointer.cpp
+++ b/src/test/core/pointer.cpp
@@ -29,6 +29,7 @@ namespace core {
Pointer::Pointer(const Seat& seat)
: seat_(seat)
, focus_(NULL)
+ , focusSerial_(0)
, x_(-1)
, y_(-1)
, button_(0)
@@ -73,6 +74,7 @@ bool Pointer::hasFocus(wl_surface* surface)
// << wl_fixed_to_int(y) << std::endl;
pointer->focus_ = wl_surface;
+ pointer->focusSerial_ = serial;
pointer->x_ = wl_fixed_to_int(x);
pointer->y_ = wl_fixed_to_int(y);
}
diff --git a/src/test/core/pointer.h b/src/test/core/pointer.h
index e891142..3607861 100644
--- a/src/test/core/pointer.h
+++ b/src/test/core/pointer.h
@@ -57,6 +57,7 @@ public:
const uint32_t button() const { return button_; }
const uint32_t buttonState() const { return buttonState_; }
wl_surface* focus() const { return focus_; }
+ const uint32_t focusSerial() const { return focusSerial_; }
bool hasFocus(wl_surface*);
@@ -76,6 +77,7 @@ private:
const Seat& seat_;
wl_surface* focus_;
+ uint32_t focusSerial_;
int32_t x_;
int32_t y_;
uint32_t button_;
--
1.8.3.1
More information about the wayland-devel
mailing list