ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Gtk2-GoBoard/GoBoard.pm
(Generate patch)

Comparing Gtk2-GoBoard/GoBoard.pm (file contents):
Revision 1.9 by root, Wed Jun 25 21:25:03 2008 UTC vs.
Revision 1.10 by elmex, Fri Jun 27 13:08:06 2008 UTC

638 638
639 my $x = int (($x - $self->{kx}[0]) * $size / ($self->{kx}[$size] - $self->{kx}[0]) + 0.5) - 1; 639 my $x = int (($x - $self->{kx}[0]) * $size / ($self->{kx}[$size] - $self->{kx}[0]) + 0.5) - 1;
640 my $y = int (($y - $self->{ky}[0]) * $size / ($self->{ky}[$size] - $self->{ky}[0]) + 0.5) - 1; 640 my $y = int (($y - $self->{ky}[0]) * $size / ($self->{ky}[$size] - $self->{ky}[0]) + 0.5) - 1;
641 641
642 my $pos = $self->{cursorpos}; 642 my $pos = $self->{cursorpos};
643 if ($x != $pos->[0] || $y != $pos->[1]) { 643 if ((not (defined $pos) && $x >= 0 && $x < $size && $y >= 0 && $y < $size)
644 || $x != $pos->[0]
645 || $y != $pos->[1]) {
644 646
645 $self->cursor (0); 647 $self->cursor (0);
646 648
647 if ($x >= 0 && $x < $size 649 if ($x >= 0 && $x < $size
648 && $y >= 0 && $y < $size) { 650 && $y >= 0 && $y < $size) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines