[gtk+] Fix valgrind warning about uninitialized value
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix valgrind warning about uninitialized value
- Date: Sun, 23 Jan 2011 22:28:29 +0000 (UTC)
commit b2b73a349eb8a99d533080344f835830b788e7cf
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 23 23:09:58 2011 +0100
Fix valgrind warning about uninitialized value
mods_state->effective is not being set in XIQueryPointer() currently, so
use base|latched|locked instead, effective is nothing else than a shorthand
for these ORs, and these 3 values are set correctly anytime.
gdk/x11/gdkdevice-xi2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 78b9de6..24699bf 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -677,7 +677,7 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
guint state = 0;
if (mods_state)
- state = (guint) mods_state->effective;
+ state = (guint) mods_state->base | mods_state->latched | mods_state->locked;
if (buttons_state)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]