x11/event: Avoid compiler warnings with HAVE_XGE undefined

This commit is contained in:
Emmanuele Bassi 2011-07-15 16:03:00 +01:00
parent 2dc69dc63d
commit bc1c3e003d

View File

@ -243,6 +243,7 @@ events_queue (ClutterBackend *backend)
#ifdef HAVE_XGE #ifdef HAVE_XGE
XGetEventData (xdisplay, &xevent.xcookie); XGetEventData (xdisplay, &xevent.xcookie);
#endif #endif
if (_clutter_backend_translate_event (backend, &xevent, event)) if (_clutter_backend_translate_event (backend, &xevent, event))
_clutter_event_push (event, FALSE); _clutter_event_push (event, FALSE);
else else
@ -280,11 +281,11 @@ clutter_x11_handle_event (XEvent *xevent)
{ {
ClutterX11FilterReturn result; ClutterX11FilterReturn result;
ClutterBackend *backend; ClutterBackend *backend;
ClutterBackendX11 *backend_x11;
Display *xdisplay;
ClutterEvent *event; ClutterEvent *event;
gint spin = 1; gint spin = 1;
#ifdef HAVE_XGE #ifdef HAVE_XGE
ClutterBackendX11 *backend_x11;
Display *xdisplay;
gboolean allocated_event; gboolean allocated_event;
#endif #endif
@ -302,12 +303,13 @@ clutter_x11_handle_event (XEvent *xevent)
clutter_threads_enter (); clutter_threads_enter ();
backend = clutter_get_default_backend (); backend = clutter_get_default_backend ();
backend_x11 = CLUTTER_BACKEND_X11 (backend);
xdisplay = backend_x11->xdpy;
event = clutter_event_new (CLUTTER_NOTHING); event = clutter_event_new (CLUTTER_NOTHING);
#ifdef HAVE_XGE #ifdef HAVE_XGE
backend_x11 = CLUTTER_BACKEND_X11 (backend);
xdisplay = backend_x11->xdpy;
allocated_event = XGetEventData (xdisplay, &xevent->xcookie); allocated_event = XGetEventData (xdisplay, &xevent->xcookie);
#endif #endif