problem with libwnck (and python bindings?)



hi all, (i hope this is the right list, sorry if it's not)

i'm writing a script that (at the moment) checks which windows have the
is_urgent flag (wnck_window_needs_attention(), in the lib). i connect a
function to the 'state-changed' but when i activate a window that's got
that flag set (i see it flashing on the windows list applet), my script
segfaults. i'm pasting down the code, if anybody's willing to check:

import wnck, gtk, gobject
class Test:

  def __init__(self):
    self.screen = wnck.screen_get_default()
    self.screen.connect('window-opened',self.wnck_window_opened)
    
  def wnck_window_opened(self,screen,window):
    # print 'opened: ', screen, window
    window.connect('state-changed',self.check_windows)

  def check_windows(self):
    print "checking"

t = Test()
gtk.main()


libwnck18 and python-gnome2-extras are version 2.12.0 (ubuntu hoary) 
but i tried backporting 2.13.0 from dapper and got the same problem

thanks,
francesco




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]