[gcompris-devel] [PATCH] Fixes to make 2click mode work better

Bruno Coudoin bruno.coudoin at gcompris.net
Thu Jul 14 06:18:32 UTC 2011


Le mercredi 13 juillet 2011 à 22:20 +0200, Mattias Lindblad a écrit :
> Hi all,
> 
> I have had some problems with using the "2 clicks" mode in some of the
> boards, for example the geography board. The problem is that when the
> pointer moves outside of the dragged item (which may occur when doing
> a fast drag or having a slow computer), the item gets stuck. I
> descriped the problem in more detail in Ubuntu Launchpad:
> https://bugs.launchpad.net/ubuntu/+source/gcompris/+bug/777349
> 
> However, filing a bug in Launchpad didn't automagically solve the
> problem for me :) So I had a look at the code instead, and found some
> problems with the drag handling in 2 click mode. And while testing my
> fixes, I also noted noticed that moving an already placed item is
> almost impossible in 2 clicks mode.
> 
> Below is my proposed solution to both these problems. The first
> problem is solved by always getting the canvas coordinates when
> dragging in 2 clicks mode, and converting them to item-referenced
> coordinates. The second problem is solved by making the shadows never
> receive any events.
> 
> I have tested the patches in both 2-click mode and normal mode, and
> found no problems as far as I can tell.

Thanks a lot, I commited your patch. I also fixed a potential crash in
shapegame that arrived when moving a piece in the wrong position.

-- 
Bruno Coudoin
http://gcompris.net  Free educational software for kids
http://toulibre.org  Logiciel Libre à Toulouse
http://april.org     Promouvoir et défendre le Logiciel Libre





More information about the Gcompris-devel mailing list