From 76ae60f9518ae8b0042157bdc0c3f7304abe3a0e Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 18 Jan 2013 12:45:44 +0900 Subject: libcaribou: fix dereferencing Gdk.XEvent pointer with Vala 0.16 https://bugzilla.gnome.org/show_bug.cgi?id=691992 --- libcaribou/xadapter.vala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libcaribou') 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; -- cgit v1.2.1