MouseCallback gives unsigned values when mouse is outside the window (Bug #3446)


Added by Adi Shavit about 11 years ago. Updated over 9 years ago.


Status:Open Start date:2013-12-19
Priority:Normal Due date:
Assignee:Adi Shavit % Done:

0%

Category:highgui-gui
Target version:-
Affected version:2.4.8 (latest release) Operating System:Windows
Difficulty: HW Platform:x64
Pull request:

Description

When the mouse goes out of the window, e.g. while the button is still pressed, the MouseCallback event is received with the wrong coordinates.
When the mouse is above or to the left of the window, the values x and/or y (which are int) get are the unsigned short casting of the expected negative values.
Casting x/y to short returns the correct negative position.
On Windows x and y are recieved as the low and high words of a single int.
When separating them into 2 separate ints they should be cast to shorts before the assignment to allow for negative values.
See this row here .


Associated revisions

Revision d368a7ce
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3446 from pokeefe:fix-compilation-without-videoio

History

Updated by Anna Kogan about 11 years ago

Hello Adi,

Thank you for reporting the problem. If you could find on a solution for the issue, a contribution (see How_to_contribute) would be very appreciated!

  • Affected version changed from 2.4.0 - 2.4.6 to 2.4.8 (latest release)
  • Assignee set to Adi Shavit

Updated by Andrew Senin about 11 years ago

  • Status changed from New to Open

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4662

Also available in: Atom PDF