[mutter/wip/carlosg/tablet-mapping-fixes: 21/23] backends: Do not emit pointless signals remapping pad devices




commit 04eda556e79bc340bbc02889bd25de1d0882b1ed
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Nov 24 18:29:50 2021 +0100

    backends: Do not emit pointless signals remapping pad devices
    
    The matrix and aspect ratio of the tablet is irrelevant on pads, and
    it actually triggers warnings when trying change that on those devices:
    
    gnome-shell:42536): mutter-CRITICAL **: 17:22:41.994: meta_input_device_native_get_mapping_mode_in_impl: 
assertion 'device_type == CLUTTER_TABLET_DEVICE || device_type == CLUTTER_PEN_DEVICE || device_type == 
CLUTTER_ERASER_DEVICE' failed
    
    This is unnecessary to do on pad devices, these just need to be moved
    together with their respective stylus.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2107>

 src/backends/meta-input-mapper.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c
index c0a32a3820..9760bacc2d 100644
--- a/src/backends/meta-input-mapper.c
+++ b/src/backends/meta-input-mapper.c
@@ -257,6 +257,10 @@ mapper_input_info_set_output (MetaMapperInputInfo  *input,
 
   input->output = output;
 
+  /* These devices don't require emission about mapping/ratio */
+  if (clutter_input_device_get_device_type (input->device) == CLUTTER_PAD_DEVICE)
+    return;
+
   if (output && monitor)
     {
       meta_monitor_manager_get_monitor_matrix (mapper->monitor_manager,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]