Do not disable touchscreen on DPMS off if touch-mode is disabled

Resolves: RHEL-31742
This commit is contained in:
Carlos Garnacho 2025-04-24 16:19:57 +02:00
parent c462fa47fb
commit f907998194
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 5471f40995b71cf838951a9e2fb2672e64aec66d Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Thu, 24 Apr 2025 16:41:32 +0200
Subject: [PATCH] backends: Avoid disabling touchscreen outside of touch mode
The reasons to disable touchscreen on dpms off apply mostly to
devices where the touch mode is useful, and not so much outside of
those.
---
src/backends/meta-input-mapper.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c
index a0a4b8a..a8d7a10 100644
--- a/src/backends/meta-input-mapper.c
+++ b/src/backends/meta-input-mapper.c
@@ -695,6 +695,7 @@ input_mapper_power_save_mode_changed_cb (MetaMonitorManager *monitor_manager,
{
ClutterInputDevice *device;
MetaLogicalMonitor *logical_monitor;
+ ClutterSeat *seat;
MetaMonitor *builtin;
MetaPowerSave power_save_mode;
gboolean on;
@@ -718,6 +719,10 @@ input_mapper_power_save_mode_changed_cb (MetaMonitorManager *monitor_manager,
if (!device)
return;
+ seat = clutter_input_device_get_seat (device);
+ if (!clutter_seat_get_touch_mode (seat))
+ return;
+
g_signal_emit (mapper, signals[DEVICE_ENABLED], 0, device, on);
}
--
2.49.0

View File

@ -10,7 +10,7 @@
Name: mutter
Version: 40.9
Release: 24%{?dist}
Release: 25%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -152,6 +152,9 @@ Patch66: 0001-backend-native-Use-drmModeCloseFB-for-flicker-free-l.patch
# RHEL-21286
Patch67: double-key-event-handling.patch
# RHEL-31742
Patch68: 0001-backends-Avoid-disabling-touchscreen-outside-of-touc.patch
BuildRequires: chrpath
BuildRequires: pango-devel
BuildRequires: startup-notification-devel
@ -299,6 +302,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Thu Apr 24 2025 Carlos Garnacho <cgarnach@redhat.com> - 40.9-25
- Do not disable touchscreen on DPMS off if touch-mode is disabled
Resolves: RHEL-31742
* Tue Jan 28 2025 Carlos Garnacho <cgarnach@redhat.com> - 40.9-24
- Fix stuck modifier keys
Resolves: RHEL-21286