]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't ignore events from XI2 slave devices anymore
authorPo Lu <luangruo@yahoo.com>
Sat, 19 Feb 2022 08:21:51 +0000 (16:21 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 19 Feb 2022 08:21:51 +0000 (16:21 +0800)
All the machinery needed to keep track of events from those
devices is already in place, so that's no longer required.

* src/xterm.c (x_get_scroll_valuator_delta):
(xi_reset_scroll_valuators_for_device_id):
(handle_one_xevent): Don't ignore XI devices that are not master
pointers or keyboards.

src/xterm.c

index af456389aba3f27041f36b19675b73df33a4853a..2dc420a8deefd39be1e75511d55d3a602130b9c4 100644 (file)
@@ -689,7 +689,7 @@ x_get_scroll_valuator_delta (struct x_display_info *dpyinfo, int device_id,
     {
       struct xi_device_t *device = &dpyinfo->devices[i];
 
-      if (device->device_id == device_id && device->master_p)
+      if (device->device_id == device_id)
        {
          for (int j = 0; j < device->scroll_valuator_count; ++j)
            {
@@ -803,7 +803,7 @@ xi_reset_scroll_valuators_for_device_id (struct x_display_info *dpyinfo, int id,
   struct xi_device_t *device = xi_device_from_id (dpyinfo, id);
   struct xi_scroll_valuator_t *valuator;
 
-  if (!device || !device->master_p)
+  if (!device)
     return;
 
   if (!device->scroll_valuator_count)
@@ -11314,7 +11314,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
              device = xi_device_from_id (dpyinfo, xev->deviceid);
 
-             if (!device || !device->master_p)
+             if (!device)
                goto XI_OTHER;
 
              bv.button = xev->detail;
@@ -11487,7 +11487,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
              device = xi_device_from_id (dpyinfo, xev->deviceid);
 
-             if (!device || !device->master_p)
+             if (!device)
                goto XI_OTHER;
 
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
@@ -12132,7 +12132,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              XIGesturePinchEvent *pev = (XIGesturePinchEvent *) xi_event;
              struct xi_device_t *device = xi_device_from_id (dpyinfo, pev->deviceid);
 
-             if (!device || !device->master_p)
+             if (!device)
                goto XI_OTHER;
 
 #ifdef HAVE_XWIDGETS