summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHannes Bistry <hannesb@gmx.net>2009-04-14 12:10:30 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-04-14 12:26:10 +0100
commit77050a72f8c54a62ab344402aa15d8645150596a (patch)
tree316814b73f2fa0b6a42f4cc2289304b4f5092f5f /sys
parentdffd1bcc976c432d3827a0a9a34f5ad24edec3d9 (diff)
ximagesink: fix mouse pointer offsets in navigation event if window is smaller than the image
Fixes #570768.
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 9dec0cdf..e2d73fcf 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -1852,11 +1852,11 @@ gst_ximagesink_navigation_send_event (GstNavigation * navigation,
g_mutex_unlock (ximagesink->flow_lock);
- if (gst_structure_get_double (structure, "pointer_x", &x)) {
+ if (x_offset > 0 && gst_structure_get_double (structure, "pointer_x", &x)) {
x -= x_offset / 2;
gst_structure_set (structure, "pointer_x", G_TYPE_DOUBLE, x, NULL);
}
- if (gst_structure_get_double (structure, "pointer_y", &y)) {
+ if (y_offset > 0 && gst_structure_get_double (structure, "pointer_y", &y)) {
y -= y_offset / 2;
gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE, y, NULL);
}