[mutter] backends/native: Also check touch-mode on object initialization
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends/native: Also check touch-mode on object initialization
- Date: Fri, 21 Feb 2020 15:32:41 +0000 (UTC)
commit 41d72e86e0921db4ccd9786e7a6f064fa0919fde
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Feb 20 12:04:15 2020 +0100
backends/native: Also check touch-mode on object initialization
On a Surface Pro 2017, touch-mode is currently only detected correctly
after detaching and attaching the Type Cover (detachable keyboard) once,
it seems that `has_external_keyboard` is only set to the correct value
after MetaSeatNative is initialized.
So fix that and call `update_touch_mode()` once again when the object is
initialized and the `has_external_keyboard` and `has_touchscreen`
properties have been finally updated.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1075
src/backends/native/meta-seat-native.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c
index 4c77b7af9..f94f43c96 100644
--- a/src/backends/native/meta-seat-native.c
+++ b/src/backends/native/meta-seat-native.c
@@ -2552,6 +2552,8 @@ meta_seat_native_constructed (GObject *object)
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)
G_OBJECT_CLASS (meta_seat_native_parent_class)->constructed (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]