Hello,

I'm trying to use kaa.display to set the focus to the Freevo window
but it does nothing.
The attached code is an example of what i'm trying to do.

Does anyone know if there's something missing?

Thanks
#!/usr/bin/python

import pygame, kaa, kaa.display

def focus_out():
    print "focus out"

def focus_in():
    print "focus in"

pygame.init()
pygame.display.init()
pygame.display.set_mode((800, 450))

window_info = pygame.display.get_wm_info()

if window_info and window_info.has_key('window'):
    print window_info
    print 'w %x, wm %x, fswm %x' % (window_info['window'], window_info['wmwindow'], window_info['fswindow'])

    x11 = kaa.display.X11Window(window = window_info['window'])

    x11.signals['focus_out_event'].connect(focus_out)
    x11.signals['focus_in_event'].connect(focus_in)

kaa.main.run()

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to