Re: Where'd my gtk+-1.2 mouse events go ?
- From: Chris Sparks <mrada catalina-inter net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Where'd my gtk+-1.2 mouse events go ?
- Date: Thu, 14 Aug 2003 17:35:25 -0700
I can see why since it worked! I have given up on trying to get GDK events
to work with
my software. Too complicated.
Chris
Noah Levitt wrote:
Call gdk_window_get_pointer () in your motion notify
handler. Read about this in the scribble part of the
tutorial http://gtk.org/tutorial/sec-eventhandling.html
(Why on earth are you developing for gtk+ 1.2?!)
Noah
On Thu, Aug 14, 2003 at 1:36:43 -0600, Nix wrote:
Hi ! I have a drawing area inside a viewport inside a scrollwindow. I
have set the followings on the drawing area:
gtk_widget_set_events (GTK_WIDGET (drawing_area), GDK_EXPOSURE_MASK
| GDK_LEAVE_NOTIFY_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
| GDK_KEY_PRESS_MASK
| GDK_POINTER_MOTION_MASK
| GDK_POINTER_MOTION_HINT_MASK);
This should give me unfettered access to all mouse and mouse motion
events. That is, if I were to add a printf to the motion_notify
handler, when I move the mouse, it should dowse the terminal in printf
messages, right ? Well, not in my case, for some reason.
I have printfs for button_press_event, motion_notify_event, and
button_release_event. When the mouse enters the drawing area, it
generates exactly 1 (!) motion event. If I depress the mouse button, it
generates 1 button_press_event (unsurprisingly). If I then drag the
mouse, it once again generates exactly 1 motion event. Why only 1 ?
This seems to work well enough on other windows.
Does the scrollwindow, or the viewport my drawing area is embedded in
absorb the motion and mouse button events ?
TIA
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]