GNOME Bugzilla – Bug 90127
Bug in example 'rulers' and wrong enum names in Gtk::Ruler's ref doc
Last modified: 2004-12-22 21:47:04 UTC
The example 'rulers' doesn't work at the moment because pointer motion events (on which the motion of the marker on the rulers is triggered) are quite rare. This is because 'Gdk::POINTER_MOTION_HINT_MASK' has been added to the event mask of the drawing area. Also while a mouse button is pressed, no motion events will be emitted unless 'Gdk::BUTTON_PRESSED_MASK' is added to the event mask of the drawing area. This seems strange and I'll report on the gtk+ ml. Gtk::Ruler's reference documentation contains gdk macro names instead of our enum names.
Created attachment 10341 [details] [review] A patch to fix the described problems.
Is this now the same as the C example?
No, they do something really weird and if I do the same in gtkmm (using C code because I can't access the protected member function Gtk::Widget::on_motion_notify_event()) it somewhat works but only if no mouse button is not held down: gtk_widget_set_events (area, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); ... g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event", G_CALLBACK (EVENT_METHOD (hrule, motion_notify_event)), hrule);
Yes, I remember that now. Thanks a lot.