Hi Stefan,

> I've hit a problem when using the button_press_event to pop up a
> wx.MessageBox. After the messagebox is loaded the mouse becomes completely
> unresponsive (even outside the application) until the application is shut
> down (by using ALT+F4). I'm making a feature where the user, after right
> clicking on the figure (after doing some manipulations etc), are requested
> to answer a question in a message box.
>
> This problem seems only to occur on Linux..
>
> Am I doing something wrong or is this a bug?
>
> I've attached the source that demonstrates the problem.

Oddly, I saw very similar behavior recently (I didn't see the
attachment...).  What I found was that the canvas was still
responsive, but that it "stole" the mouse from any other window (wx
widgets or system widgets) and that this happened on Linux but not
Windows.

I believe that adding
    self.ReleaseMouse()
at the end of the event handler will alleviate this problem.  It might
be best to do (assuming you bound mouse events with the
    Canvas.mpl_connect() ) to do
    evt.guiEvent.Skip()
    if self.HasCapture(): self.ReleaseMouse()

I haven't fully explored this problem myself, but I am no longer
experiencing it...

Cheers,

--Matt Newville <newville at cars.uchicago.edu>

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to