[clutter] gdk: Fix compilation on non-X11 platforms
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gdk: Fix compilation on non-X11 platforms
- Date: Sun, 29 Jul 2012 12:40:13 +0000 (UTC)
commit fc04f015a6df2e3b5d245698a73240ca38b889ac
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Jul 29 13:39:13 2012 +0100
gdk: Fix compilation on non-X11 platforms
The GDK backend may not work on non-X11 platforms, yet, but it's not a
good reason to let it introduce random build breakage.
clutter/gdk/clutter-backend-gdk.c | 2 ++
clutter/gdk/clutter-event-gdk.c | 3 ++-
clutter/gdk/clutter-stage-gdk.c | 5 +++--
3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
index 42bdc79..ca4c454 100644
--- a/clutter/gdk/clutter-backend-gdk.c
+++ b/clutter/gdk/clutter-backend-gdk.c
@@ -141,6 +141,8 @@ cogl_gdk_filter (GdkXEvent *xevent,
return GDK_FILTER_CONTINUE;
}
#endif
+
+ return GDK_FILTER_CONTINUE;
}
static gboolean
diff --git a/clutter/gdk/clutter-event-gdk.c b/clutter/gdk/clutter-event-gdk.c
index 1663138..92d3610 100644
--- a/clutter/gdk/clutter-event-gdk.c
+++ b/clutter/gdk/clutter-event-gdk.c
@@ -258,7 +258,8 @@ clutter_gdk_handle_event (GdkEvent *gdk_event)
event->scroll.y = gdk_event->scroll.y;
event->scroll.modifier_state = gdk_event->scroll.state;
event->scroll.axes = NULL;
- event->scroll.direction = gdk_event->scroll.direction;
+ /* XXX: must keep ClutterScrollDirection compatible with GdkScrollDirection */
+ event->scroll.direction = (ClutterScrollDirection) gdk_event->scroll.direction;
clutter_event_set_device (event, device);
clutter_event_set_source_device (event, source_device);
clutter_event_set_scroll_delta (event,
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index 28c95e3..0e32caf 100644
--- a/clutter/gdk/clutter-stage-gdk.c
+++ b/clutter/gdk/clutter-stage-gdk.c
@@ -64,6 +64,7 @@ G_DEFINE_TYPE_WITH_CODE (ClutterStageGdk,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_STAGE_WINDOW,
clutter_stage_window_iface_init));
+#ifdef CLUTTER_WINDOWING_X11
static void
clutter_stage_gdk_update_foreign_event_mask (CoglOnscreen *onscreen,
guint32 event_mask,
@@ -75,7 +76,7 @@ clutter_stage_gdk_update_foreign_event_mask (CoglOnscreen *onscreen,
event masks */
gdk_window_set_events (stage_gdk->window, event_mask | CLUTTER_STAGE_GDK_EVENT_MASK);
}
-
+#endif
static void
clutter_stage_gdk_set_gdk_geometry (ClutterStageGdk *stage)
@@ -485,7 +486,7 @@ clutter_gdk_get_stage_window (ClutterStage *stage)
{
ClutterStageWindow *impl;
- g_return_val_if_fail (CLUTTER_IS_STAGE (stage), None);
+ g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
impl = _clutter_stage_get_window (stage);
if (!CLUTTER_IS_STAGE_GDK (impl))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]