events: Improve check for native backend

This commit is contained in:
Jasper St. Pierre 2014-05-29 12:06:09 -04:00
parent d380d30ef4
commit fe823b3553

View File

@ -33,6 +33,7 @@
#include "bell.h"
#include "workspace-private.h"
#include "backends/meta-backend.h"
#include "backends/native/meta-backend-native.h"
#include "backends/native/meta-idle-monitor-native.h"
#include "backends/x11/meta-backend-x11.h"
@ -1827,16 +1828,15 @@ meta_display_handle_xevent (MetaDisplay *display,
static void
handle_idletime_for_event (const ClutterEvent *event)
{
/* This is handled by XSync under X11. */
MetaBackend *backend = meta_get_backend ();
if (META_IS_BACKEND_NATIVE (backend))
{
ClutterInputDevice *device, *source_device;
MetaIdleMonitor *core_monitor, *device_monitor;
int device_id;
/* This is handled by XSync under X11. */
#if defined(CLUTTER_WINDOWING_X11)
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
return;
#endif
device = clutter_event_get_device (event);
if (device == NULL)
return;
@ -1856,6 +1856,7 @@ handle_idletime_for_event (const ClutterEvent *event)
device_monitor = meta_idle_monitor_get_for_device (device_id);
meta_idle_monitor_native_reset_idletime (device_monitor);
}
}
}
static gboolean