[gtk+] Initialize variables
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Initialize variables
- Date: Thu, 14 Oct 2010 12:15:28 +0000 (UTC)
commit 34b117865a36c21918b6432cc6b9c379e8cfe907
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 14 08:12:11 2010 -0400
Initialize variables
valgrind was complaining about uninitialized values here, and
sure enough, gdkdevice-xi.c doesn't set device position.
gdk/gdkwindow.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6e39e86..46539ea 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5069,6 +5069,9 @@ gdk_window_get_device_position (GdkWindow *window,
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
+ tmp_x = 0;
+ tmp_y = 0;
+
display = gdk_window_get_display (window);
child = display->device_hooks->window_get_device_position (display, device, window,
&tmp_x, &tmp_y, &tmp_mask);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]