[mutter/gnome-3-26] backend: Reset current device id when current device removed
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-26] backend: Reset current device id when current device removed
- Date: Thu, 9 Nov 2017 09:46:45 +0000 (UTC)
commit 74e88dd18f2d66d8ab861dacfab3e1ba07065ac5
Author: Benoit Gschwind <gschwind gnu-log net>
Date: Wed Oct 25 22:13:30 2017 +0200
backend: Reset current device id when current device removed
Bluetooth mouse usually goes in sleep state after a timeout, when that
happen the mouse is disconnected and on_device_removed function is
called. Before the patch if a touch device is available the
on_device_removed function hide the cursor. The issue is that the cursor
does not reappear once the bluetooth mouse is reconnected because
MetaBackend::current_device_id is not invalidated when on_device_removed
was called.
The patch set MetaBackend::current_device_id to 0 if the current device
is removed. This will make update_last_device to be triggered as soon as
another input device is used or the bluetooth mouse reconnect, as
consequence that the cursor reappear. The id 0 is never given to devices
and can safely used as undefine id.
https://bugzilla.gnome.org/show_bug.cgi?id=761067
src/backends/meta-backend.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index c856823..798dc5f 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -337,6 +337,8 @@ on_device_removed (ClutterDeviceManager *device_manager,
gboolean has_touchscreen, has_pointing_device;
ClutterInputDeviceType device_type;
+ priv->current_device_id = 0;
+
device_type = clutter_input_device_get_device_type (device);
has_touchscreen = check_has_slave_touchscreen (device_manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]