Sun Apr 14 20:10:29 2024 UTC (25d)
Only limit the scroll warning, but continue to send the scroll events.


(mlelstv)
diff -r1.17 -r1.18 xsrc/external/mit/xf86-input-ws/dist/src/ws.c

cvs diff -r1.17 -r1.18 xsrc/external/mit/xf86-input-ws/dist/src/ws.c (expand / switch to unified diff)

--- xsrc/external/mit/xf86-input-ws/dist/src/ws.c 2024/02/07 18:01:48 1.17
+++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c 2024/04/14 20:10:29 1.18
@@ -737,31 +737,33 @@ wsReadInput(InputInfoPtr pInfo) @@ -737,31 +737,33 @@ wsReadInput(InputInfoPtr pInfo)
737 if (dw < 0) { 737 if (dw < 0) {
738 DBG(4, ErrorF("W -> button %d\n", 738 DBG(4, ErrorF("W -> button %d\n",
739 priv->negativeW)); 739 priv->negativeW));
740 wbutton = 1 << (priv->negativeW - 1); 740 wbutton = 1 << (priv->negativeW - 1);
741 } else { 741 } else {
742 DBG(4, ErrorF("W -> button %d\n", 742 DBG(4, ErrorF("W -> button %d\n",
743 priv->positiveW)); 743 priv->positiveW));
744 wbutton = 1 << (priv->positiveW - 1); 744 wbutton = 1 << (priv->positiveW - 1);
745 } 745 }
746 buttons |= wbutton; 746 buttons |= wbutton;
747 dw = 0; 747 dw = 0;
748 } 748 }
749#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 749#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
750 static int warned = 0; 750 if (hscroll || vscroll) {
751 if ((hscroll || vscroll) && !warned) { 751 static int warned = 0;
752 warned = 1; 752 if (!warned) {
753 xf86Msg(X_WARNING, "%s: hscroll=%d, vscroll=%d\n", 753 warned = 1;
754 pInfo->name, hscroll, vscroll); 754 xf86Msg(X_WARNING, "%s: hscroll=%d, vscroll=%d\n",
 755 pInfo->name, hscroll, vscroll);
 756 }
755 valuator_mask_zero(priv->scroll_mask); 757 valuator_mask_zero(priv->scroll_mask);
756 valuator_mask_set_double(priv->scroll_mask, 758 valuator_mask_set_double(priv->scroll_mask,
757 HSCROLL_AXIS, (double) hscroll); 759 HSCROLL_AXIS, (double) hscroll);
758 valuator_mask_set_double(priv->scroll_mask, 760 valuator_mask_set_double(priv->scroll_mask,
759 VSCROLL_AXIS, (double) vscroll); 761 VSCROLL_AXIS, (double) vscroll);
760 xf86PostMotionEventM(pInfo->dev, FALSE, priv->scroll_mask); 762 xf86PostMotionEventM(pInfo->dev, FALSE, priv->scroll_mask);
761 } 763 }
762#endif 764#endif
763 if (priv->lastButtons != buttons) { 765 if (priv->lastButtons != buttons) {
764 /* button event */ 766 /* button event */
765 wsSendButtons(pInfo, buttons); 767 wsSendButtons(pInfo, buttons);
766 } 768 }
767 if (zbutton != 0) { 769 if (zbutton != 0) {