[caribou] libcaribou: fix dereferencing Gdk.XEvent pointer with Vala 0.16
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] libcaribou: fix dereferencing Gdk.XEvent pointer with Vala 0.16
- Date: Mon, 21 Jan 2013 05:22:23 +0000 (UTC)
commit 76ae60f9518ae8b0042157bdc0c3f7304abe3a0e
Author: Daiki Ueno <ueno unixuser org>
Date: Fri Jan 18 12:45:44 2013 +0900
libcaribou: fix dereferencing Gdk.XEvent pointer with Vala 0.16
https://bugzilla.gnome.org/show_bug.cgi?id=691992
libcaribou/xadapter.vala | 11 +++++++++++
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]