From: Darren D. <dsd...@gm...> - 2008-12-03 15:00:51
|
On Wed, Dec 3, 2008 at 9:26 AM, Gregor Thalhammer < gre...@gm...> wrote: > > > 2008/12/2 Darren Dale <dsd...@gm...> > >> >> >> On Tue, Dec 2, 2008 at 10:41 AM, John Hunter <jd...@gm...> wrote: >> >>> On Tue, Dec 2, 2008 at 8:34 AM, Gregor Thalhammer >>> <gre...@gm...> wrote: >>> >>> > If a mouse button is pressed while leaving the figure the behaviour is >>> > somewhat strange. First, a figure_leave_event is emitted. Then, further >>> > moving the mouse outside the figure a new figure_enter_event is >>> created. >>> > This is the case since all mouse events, also movements outside the >>> window, >>> > are captured as long as a mouse button is pressed. This is a very >>> convenient >>> > behaviour for panning/zooming. However, when finally releasing the >>> mouse >>> > button no figure_leave_event is triggered. With the GTK backend such an >>> > event is created. >>> > So what should be the desired behaviour? >>> >>> Ahh, I hadn't considered this problem. It arises because I am using >>> mpl location events to trigger the figure enter event. The solution >>> is to use the gui event for the figure enter event too -- basically >>> the gui needs to call the canvas.enter_notify_event. I added your >>> patch and modified gtk to handle the enter_notify_event in svn r6468. >>> Can you update, repatch wx to use it (and Darren qt)? >> >> >> This is done for qt and qt4. In qt, if you hold the button, leave the >> figure, enter the second figure, and release the button, the old figure >> receives the leave event, but the new figure does not receive the enter >> event. This seems like an issue with qt3, the new figure does receive the >> enter event with qt4. >> > > with the patched wx backend I observe the same behaviour. The second figure > does not recieve an enter event. This might be because the wx backend > captures the mouse if a button is pressed, i.e., all mouse events are > redirected to the first figure. > > > I noticed that if one moves the cursor rapidly through the figure and > axes, some events are not captured. For example, the cursor is in an axes > but the last event the axes received was a leave event. I'm not sure how > that could be improved, do you see it as well? > > Exactly this behaviour I can't see with the wx backend. Did I understood > correctly: You manage to place the mouse within an axis, without having > received a enter event? > Yes, this is the behavior I see. |