0

I am trying to handle x events for a drawing area widget so the user can pan around and draw on it. Press event and release event handlers are called but not the motion notify event. I added Gdk::POINTER_MOTION_MASK and overrode on_motion_notify_event(GdkEventButton *event) handler but it doesn't get called. Am I doing something wrong?

Eitan T
  • 32,660
  • 14
  • 72
  • 109
Sam Bickley
  • 127
  • 4

1 Answers1

1

If you did exactly what you stated, the problem is that you overloaded the right method name, but the wrong argument type. The correct overload is this (from the docs):

  virtual bool Gtk::Widget::on_motion_notify_event(GdkEventMotion * event)

Note the different argument type.

ergosys
  • 47,835
  • 5
  • 49
  • 70