mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 11:00:54 -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 "bell.h"
|
||||||
#include "workspace-private.h"
|
#include "workspace-private.h"
|
||||||
#include "backends/meta-backend.h"
|
#include "backends/meta-backend.h"
|
||||||
|
#include "backends/native/meta-backend-native.h"
|
||||||
#include "backends/native/meta-idle-monitor-native.h"
|
#include "backends/native/meta-idle-monitor-native.h"
|
||||||
#include "backends/x11/meta-backend-x11.h"
|
#include "backends/x11/meta-backend-x11.h"
|
||||||
|
|
||||||
@ -1826,17 +1827,16 @@ meta_display_handle_xevent (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_idletime_for_event (const ClutterEvent *event)
|
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;
|
ClutterInputDevice *device, *source_device;
|
||||||
MetaIdleMonitor *core_monitor, *device_monitor;
|
MetaIdleMonitor *core_monitor, *device_monitor;
|
||||||
int device_id;
|
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);
|
device = clutter_event_get_device (event);
|
||||||
if (device == NULL)
|
if (device == NULL)
|
||||||
return;
|
return;
|
||||||
@ -1857,6 +1857,7 @@ handle_idletime_for_event (const ClutterEvent *event)
|
|||||||
meta_idle_monitor_native_reset_idletime (device_monitor);
|
meta_idle_monitor_native_reset_idletime (device_monitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_display_handle_event (MetaDisplay *display,
|
meta_display_handle_event (MetaDisplay *display,
|
||||||
|
Loading…
Reference in New Issue
Block a user