summaryrefslogtreecommitdiff
path: root/libcaribou
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2013-01-18 12:45:44 +0900
committerDaiki Ueno <ueno@unixuser.org>2013-01-21 14:20:15 +0900
commit76ae60f9518ae8b0042157bdc0c3f7304abe3a0e (patch)
tree7bef730d8bd648145b785caf3919c6e22c679aa2 /libcaribou
parent56f3428d12ed5b73c36723f5bb355fe4b920f79c (diff)
downloadcaribou-76ae60f9518ae8b0042157bdc0c3f7304abe3a0e.tar.gz
libcaribou: fix dereferencing Gdk.XEvent pointer with Vala 0.16
https://bugzilla.gnome.org/show_bug.cgi?id=691992
Diffstat (limited to 'libcaribou')
-rw-r--r--libcaribou/xadapter.vala11
1 files changed, 11 insertions, 0 deletions
diff --git a/libcaribou/xadapter.vala b/libcaribou/xadapter.vala
index c7c314d..49aeb68 100644
--- a/libcaribou/xadapter.vala
+++ b/libcaribou/xadapter.vala
@@ -86,7 +86,18 @@ namespace Caribou {
}
private Gdk.FilterReturn x_event_filter (Gdk.XEvent xevent, Gdk.Event event) {
+ // After the following commit, Vala changed the definition
+ // of Gdk.XEvent from struct to class:
+ // http://git.gnome.org/browse/vala/commit/?id=9c52e7b7
+ //
+ // This affects the meaning of address-of (&) operator:
+ // '&xevent' now refers to the address of XEvent*, not
+ // XEvent.
+#if VALA_0_16
+ void* pointer = xevent;
+#else
void* pointer = &xevent;
+#endif
Xkb.Event* xkbev = (Xkb.Event *) pointer;
X.Event* xev = (X.Event *) pointer;