videoscale: Add option for navigation events to scale and respect internal region without borders
Submitted by Dimitrios Katsaros
Link to original bug (#762986)
Description
The current version of videoscale scales navigation events based on the input to output ratio. If the output includes borders, the scaling includes the border area, which causes navigation events to be misaligned compared to the position of the mouse. This can be illustrated with the following example:
gst-launch-1.0 videotestsrc ! navigationtest ! video/x-raw,width=1024,height=512 ! videoscale ! videoconvert ! ximagesink
If the output window is resized to include borders, moving the mouse over the output
This patch provides a fix for this behavior, scaling the navigation events based on only the internal region and not the borders. All events that are within the borders are discarded.