[Sugar-devel] PyGame/ Sugargame issues with GTK 3
Alan Jhonn Aguiar Schwyn
alanjas at hotmail.com
Tue Feb 18 19:37:27 EST 2014
Hi,
The problem of no keyboards events appears in GTK-2 too.Maybe you need "grab_focus" to get them. See the function:
_pygamecanvas.grab_focus()
This is my code for Conozco America activity:
self.actividad = conozco.Conozco(self)self._pygamecanvas = sugargame.canvas.PygameCanvas(self)self.set_canvas(self._pygamecanvas)self._pygamecanvas.grab_focus()self._pygamecanvas.run_pygame(self.actividad.principal)
> Date: Wed, 19 Feb 2014 09:03:58 +1100
> From: quozl at laptop.org
> To: sugar-devel at lists.sugarlabs.org
> Subject: Re: [Sugar-devel] PyGame/ Sugargame issues with GTK 3
>
> G'day James,
>
> I've not seen this problem myself, nor have I tried, but I shall
> speculate:
>
> - make sure the window has focus; without focus the events may not be
> delivered, and I have a vague memory of focus manipulation in one of
> the pygame/gtk toolkits,
>
> - add code to sugargame temporarily to print received events, in an
> attempt to diagnose which half of the stack is misbehaving.
>
> --
> James Cameron
> http://quozl.linux.org.au/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140218/c22f5142/attachment.html>
More information about the Sugar-devel
mailing list