After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162326 - BUTTON_PRESS_EVENT not caught
BUTTON_PRESS_EVENT not caught
Status: RESOLVED INCOMPLETE
Product: libgnomecanvas
Classification: Deprecated
Component: items
unspecified
Other Linux
: Normal major
: ---
Assigned To: libgnomecanvas maintainers
libgnomecanvas maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-27 14:28 UTC by Jamie Wilkinson
Modified: 2008-06-08 13:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Jamie Wilkinson 2004-12-27 14:28:30 UTC
An application I am working on has an object derived from Gnome::Canvas::Canvas,
and contains some objects derived from Gnome::Canvas::Pixbuf; I set a signal
handler in the Pixbuf-derived object, and I can see that it receives all events
except Gdk::BUTTON_PRESS_EVENT (i.e. ENTER and LEAVE_NOTIFY, MOUSE_MOTION and
even BUTTON_RELEASE).

Google searching results in only this other post describing the same problem:

http://mail.gnome.org/archives/gtkmm-list/2004-July/msg00083.html

Unfortunately, the recommended answer presented in that thread, use 'add_events'
to make sure that the event mask is set correctly, doesn't work because
Canvas::Item doesn't derive from Gtk::Widget, it derives directly from Gtk::Object.

The expected behaviour is that Canvas::Item s also receive the BUTTON_PRESS
event; currently my workaround is to move the item signal handler into the
canvas itself and special case a button press event that is also over an Item,
which is an inelegant solution.

Interestingly, the canvas_events.cc example from the libgnomecanvasmm module
(i.e. via viewcvs on cvs.gnome.org) (when the sigc::slot functino calls are
replaced with sigc::mem_fun so that it actually compiles) does respond to button
press events on the items, but with as far as I can tell identical code I can't
reproduce that (correct) behaviour.

I'm using libgnomecanvasmm-2.6 and related libraries as packaged in Ubuntu
Warty.  Marking as severity "major" because the behaviour suggests that the
implementation is incomplete.
Comment 1 Sven Herzberg 2006-11-22 13:24:07 UTC
Can you provide a test case for this bug? (In c, if possible, if not, c++ is fine as well)
Comment 2 André Klapper 2008-06-08 13:05:21 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!