wxbackend scroll_event trouble

Hello,

on my macOSX (didn’t check other OS), scroll_event misses every other two event when I use mouse wheel

(wx.EVT_MOUSEWHEEL works fine)

exemple code:

import wx
import numpy
import matplotlib
import sys
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas

class TestFrame(wx.Frame):
def init(self,parent,title):
wx.Frame.init(self,parent,title=title,size=(500,500))
self.sp = wx.SplitterWindow(self)
self.p1 = WxPanel(self.sp)
self.p2 = MplPanel(self.sp)
self.sp.SplitVertically(self.p1,self.p2)

class WxPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent,-1,size=(50,50))
self.Bind(wx.EVT_MOUSEWHEEL,self.OnMouseWheel)

def OnMouseWheel(self,event):
    print "wx scroll event"
    sys.stdout.flush()

class MplPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent,-1,size=(50,50))
self.figure = Figure()
self.axes = self.figure.add_subplot(111)
self.axes.plot(numpy.arange(0.0,10,1.0),[0,1,0,1,0,2,1,2,1,0])
self.canvas = FigureCanvas(self,-1,self.figure)
self.canvas.mpl_connect(‘scroll_event’, self.OnMouseWheel)

def OnMouseWheel(self,event):
     print "mpl scroll event"
     sys.stdout.flush()

app = wx.App(redirect=False)
frame = TestFrame(None, ‘Hello World!’)
frame.Show()
app.MainLoop()

any idea?

What version of wxPython and MPL are you using?
I just tried with and don’t see any issues with skipped mouse wheel
events:
wxPython classic 3.0.2 classic on Python 2.7 and wxPython Phoenix a
recent snapshot with both Python 2.7 and Python 3.4, my MPL version
is 1.4.3 with PR� 3421 applied
().
BUT, all this on Windows 8.1, so maybe a OSX issue?
Werner

···

On 10/4/2015 12:26, Yves Le Feuvre
wrote:

Hello,

      on my macOSX (didn't check other OS), scroll_event misses

every other two event when I use mouse wheel

(wx.EVT_MOUSEWHEEL works fine)

https://github.com/matplotlib/matplotlib/pull/3421