if you want to ignore the motion event when a button is not pressed, then check for this, and if there's nothing to do then return from the callback without doing anything. this will cost you milliseconds.
i have found, in general, the best way to deal with these sorts of requirements vs. library abilities is to analyze both and find the technical solution (as per the library's abilities) that does what you need.
and with gtk and friends, i've never found that a solution wasn't possible (yet, vs. my specific requirements, of course). sometimes you just need to be creative and "tease it out," as it were.
richard
On Fri, Jan 6, 2012 at 4:28 AM, victor-victor <nadaeck@xxxxxxxxxxx> wrote:
Hello paul
Well yes of course; I meant that when I replace 'mainWindow' by
>> 1) my widget is a drawing area; the 2 signals are emited when I use the
>> mainWindow widget (that contains the drawingarea) but not the drawing
>> area
>> widget in itself; I don't see where is the problem;
>you set the event mask for the mainWindow and then you connected to
>signals emitted by mainWindow. what do you expect?
'drawingArea' (the drawing area widget) at both locations, nothing happens
at all.
As far as I understand, this mask allows to "receive pointer motion events
>> 2) I use the GDK_BUTTON_MOTION_MASK option because I want the mouse
>> motion
>> to be considered only when the mouse button is pressed; in my case, EVERY
>> mouse motion is reported...
>not sure why you think this mask does this.
while any button is pressed " according to the gdk doc
(http://developer.gimp.org/api/2.0/gdk/gdk-Events.html)
Victor
--
View this message in context: http://old.nabble.com/combined-mouse-and-button-event-in-a-drawing-area-tp33090815p33090885.html
Sent from the Gtk+ - General mailing list archive at Nabble.com.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list