Package: python-gi
Version: 3.3.91-1
Severity: normal

Dear Maintainer,

scrolling down with the mouse wheel over a Gtk.StatusIcon emits lot of
GDK_SCROLL_UP events, actually much more than scroll down events.
I can't reproduce this using PyGtk on the same machine, so I guess it's
not related to my machine.

I attached a test script which demonstrates the problem: when launched,
it creates a status icon (actually, without icon), and scrolling over
prints in the console the events received. Specifying the "-p" option
runs the same example with PyGtk, which doesn't have the problem.

Thanks,

 Jonathan


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-gi depends on:
ii  gir1.2-glib-2.0        1.32.1-1
ii  libc6                  2.13-37
ii  libffi5                3.0.10-3
ii  libgirepository-1.0-1  1.32.1-1
ii  libglib2.0-0           2.33.12+really2.32.4-3
ii  python                 2.7.3-3

python-gi recommends no packages.

Versions of packages python-gi suggests:
pn  python-gi-cairo  <none>

-- no debconf information
#!/usr/bin/env python

import sys

def gi():
    print("Using GObject Introspection")
    from gi.repository import Gtk


    def on_scroll_event(widget, event):
        v, direction = event.get_scroll_direction()
        print(direction)

    icon = Gtk.StatusIcon()
    icon.connect("scroll-event", on_scroll_event)
    Gtk.main()

def pygtk():
    print("Using PyGtk")
    import gtk

    def on_scroll_event(widget, event):
        print(event.direction)

    icon = gtk.StatusIcon()
    icon.connect("scroll-event", on_scroll_event)
    gtk.main()

if __name__ == '__main__':
    if "-p" in sys.argv:
        pygtk()
    else:
        gi()

Reply via email to