Pointer::Pointer(const Seat& seat) : seat_(seat) , focus_(NULL) , focusSerial_(0) , x_(-1) , y_(-1) , button_(0) , buttonState_(0) , axis_(0) , axisValue_(0.f) , wl_pointer_(NULL) , btnNotify_() { ASSERT(seat.capabilities() & WL_SEAT_CAPABILITY_POINTER); wl_pointer_ = wl_seat_get_pointer(seat); ASSERT(wl_pointer_ != NULL); wl_pointer_set_user_data(*this, this); static const wl_pointer_listener listener = { enter, leave, motion, button, axis}; wl_pointer_add_listener(*this, &listener, this); }