bug in the xgetmouse function

Marcos Cardinot mcardinot at gmail.com
Fri Apr 27 16:13:07 CEST 2012


Hi,

I was studying in a datatip codes and found a bug that happened when the
user wants to drag a datatip. Initially, I thought there was some problem
with the file datatipMove.sci.

After performing some tests, I found that the error is in the xgetmouse
function, which is not providing coordinate data correctly (always returns
0 and 0).

After running git blame on sci_xgetmouse.c, I discovered that the bug was
introduced during commit" 582dead8368ac857e5b3ddd1c64360
716da76887

I checked a few lines that were commented out and that the "pixelCoords"
was not being passed to the scilab stack.

After these changes the function xgetmouse is working well and datatip bug
no longer exists. Now you can drag datatip normally.

I do not know if the rows removed lines in my patch have to do with
coordinates in sub-plots, but according to my tests everything seems to be
working fine.

Should I open a bug, even though I am already submitting a patch?

Also, do you think I should leave the commented-out lines?
I am not sure if they can be useful in the future.

Thanks
Marcos Cardinot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20120427/00d22a1b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xgetmouse.patch
Type: application/octet-stream
Size: 1490 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20120427/00d22a1b/attachment.obj>


More information about the dev mailing list