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.
This commit is contained in:
Emmanuele Bassi 2012-07-29 13:39:13 +01:00
parent 228b74f624
commit fc04f015a6
3 changed files with 7 additions and 3 deletions

View File

@ -141,6 +141,8 @@ cogl_gdk_filter (GdkXEvent *xevent,
return GDK_FILTER_CONTINUE;
}
#endif
return GDK_FILTER_CONTINUE;
}
static gboolean

View File

@ -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,

View File

@ -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))