[Sugar-devel] flickering mouse in an activity on an xo

Gary Martin garycmartin at googlemail.com
Sun Aug 29 13:51:33 EDT 2010


Hi Erik,

On 29 Aug 2010, at 18:17, Erik Blankinship wrote:

> 
> FWIW, the cursor flickers just like that in pygame based activities. Physics is pygame based, and the flicker was pretty annoying as the cursor is a key part of the UI, pygame also didn't pickup the Sugar cursor default shape — so I cheated, I switch off the cursor, and place a pygame sprite in the same place. No flicker, correct looking cursor. Total hack of course (though code in the end was easy/minimal).
> 
> Just a handful of lines in physics.py, most of which there to hide the fake pygame canvas cursor when the cursor moves into the toolbar area:
> 
>     http://git.sugarlabs.org/projects/physics/repos/mainline/blobs/master/physics.py
> 
> Interesting...  thanks for sharing the workaround.  That should work for the hamster library too.  When I get a chance to try it out, I will report back to this thread.
> 
> Is there somewhere to get the sugar cursor graphics within sugar itself?  I see that physics imports its own local copy:
> http://git.sugarlabs.org/projects/physics/repos/mainline/blobs/master/standardcursor.png 

You can find the original git rep that I made standardcursor.png out of at:

	http://git.sugarlabs.org/projects/sugar-artwork/repos/mainline/trees/master/cursor/sugar

But you'll note that the png's (a sequence of 12 animation states, and one hotspot file), requires a slice and dice to get an individual cursor out.

These png images, to the best of my knowledge, do not end up in an actual build – the build scripts do some funky things with these and output a rather curious format (Xcursor I think), that seem to live in:

	/usr/share/icons/sugar/cursors

Sure it all makes perfect sense for an X windows developer – there's probably some X library somewhere for reading them in and converting to other image representations.

Regards,
--Gary



More information about the Sugar-devel mailing list