bug report: motion_notify_event in backend_gtk.py

Hello everyone,

I just upgraded my matplotlib from 0.80 to to 0.83.1 and discovered a bug in the GTK backend. To be specific, the following code, beginning by line 171 in backend_gtk.py, is the problem:

    def motion_notify_event(self, widget, event):
        if event.is_hint:
            x, y, state = event.window.get_pointer()
            x = event.x
            y = event.y
            state = event.state

        # flipy so y=0 is bottom of canvas
        y = self.figure.bbox.height() - y

        if state:
            FigureCanvasBase.motion_notify_event(self, x, y)
        return True

Due to the 'if state' clause, the Canvas will only receive the 'motion_notify_event' if at the same time the mouse button is pressed. This has not been the case in previous version of matplotlib. There is e.g. no such distinction in backend_qt.py.


Niklas Volbers.


Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201