[mutter/wip/carlosg/udev-client-warnings: 5/5] backends/native: Shuffle udev client initialization in MetaSeatNative
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/udev-client-warnings: 5/5] backends/native: Shuffle udev client initialization in MetaSeatNative
- Date: Wed, 26 Feb 2020 18:32:34 +0000 (UTC)
commit 88bb24f66e9288e0232c249877670e1d13f38e0f
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Feb 26 11:38:39 2020 +0100
backends/native: Shuffle udev client initialization in MetaSeatNative
This may be used indirectly before creation as we dispatch libinput events
right after creation (to let input devices be known), so those device
additions would trigger the touch-mode checks.
Creating it in advance results in checks being correctly performed, although
redundantly.
Spotted by Bastien Nocera.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1067
src/backends/native/meta-seat-native.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c
index f94f43c96..7e0feab44 100644
--- a/src/backends/native/meta-seat-native.c
+++ b/src/backends/native/meta-seat-native.c
@@ -2528,6 +2528,8 @@ meta_seat_native_constructed (GObject *object)
udev_unref (udev);
+ seat->udev_client = g_udev_client_new ((const gchar *[]) { "input", NULL });
+
dispatch_libinput (seat);
source = meta_event_source_new (seat);
@@ -2548,10 +2550,8 @@ meta_seat_native_constructed (GObject *object)
xkb_keymap_led_get_index (xkb_keymap, XKB_LED_NAME_SCROLL);
}
- seat->udev_client = g_udev_client_new ((const gchar *[]) { "input", NULL });
seat->has_external_keyboard = has_external_keyboard (seat);
seat->has_touchscreen = has_touchscreen (seat);
-
update_touch_mode (seat);
if (G_OBJECT_CLASS (meta_seat_native_parent_class)->constructed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]