mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
events: Improve check for native backend
This commit is contained in:
parent
d380d30ef4
commit
fe823b3553
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user