re: Removing a superfluous warning from xf86-input-ws/dist/src/ws.c

2024-02-06 Thread matthew green
> On Mon 05 Feb 2024 at 10:18:09 +1100, matthew green wrote:
> > perhaps convert into a DBG(4, ...)?
>
> On Mon 05 Feb 2024 at 02:20:25 +0300, Valery Ushakov wrote:
> > May be make it reported only once, so that the message is still there
> > in the log, but it's not spammed uselessly, adding no new information?
>
> I think I like the second suggestion slightly better, so I'll go with
> that. I'll do a test build first, even though it seems trivial. I didn't
> do a build in a while anyway...

i like this.  thanks.


.mrg.


Re: Removing a superfluous warning from xf86-input-ws/dist/src/ws.c

2024-02-06 Thread Rhialto
On Mon 05 Feb 2024 at 20:57:11 +0100, Rhialto wrote:
> I think I like the second suggestion slightly better, so I'll go with
> that. I'll do a test build first, even though it seems trivial. I didn't
> do a build in a while anyway...

I'll commit this then, if that looks ok. (I'm asking to double-check
since this isn't my usual area of committing - I test-compiled it but
unfortunately the build for -current doesn't drop in into 10.0RC3 as I
have it installed)

Index: ws.c
===
RCS file: /cvsroot/xsrc/external/mit/xf86-input-ws/dist/src/ws.c,v
retrieving revision 1.16
diff -u -r1.16 ws.c
--- ws.c4 Dec 2021 15:21:55 -   1.16
+++ ws.c6 Feb 2024 17:40:57 -
@@ -747,7 +747,9 @@
dw = 0;
}
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
-   if (hscroll || vscroll) {
+   static int warned = 0;
+   if ((hscroll || vscroll) && !warned) {
+   warned = 1;
xf86Msg(X_WARNING, "%s: hscroll=%d, vscroll=%d\n",
pInfo->name, hscroll, vscroll);
valuator_mask_zero(priv->scroll_mask);

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature


Re: Removing a superfluous warning from xf86-input-ws/dist/src/ws.c

2024-02-05 Thread Rhialto
On Mon 05 Feb 2024 at 10:18:09 +1100, matthew green wrote:
> perhaps convert into a DBG(4, ...)?

On Mon 05 Feb 2024 at 02:20:25 +0300, Valery Ushakov wrote:
> May be make it reported only once, so that the message is still there
> in the log, but it's not spammed uselessly, adding no new information?

I think I like the second suggestion slightly better, so I'll go with
that. I'll do a test build first, even though it seems trivial. I didn't
do a build in a while anyway...

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature


Re: Removing a superfluous warning from xf86-input-ws/dist/src/ws.c

2024-02-04 Thread Valery Ushakov
On Sun, Feb 04, 2024 at 20:23:24 +0100, Rhialto wrote:

> and it prints this warning every time I scroll using the touchpad on my
> ThinkPad. Apparently it is a "new" way for touchpads to report scrolling
> (both horizontal and vertica).
> 
> These messages are filling up my /var/log/Xorg.0.log and wearing out my
> NVMe unnecesarily.
> 
> This touchpad method is not supported by the xf86-input-mouse driver so
> with that one the touchpad doesn't scroll.
> 
> Shall I just remove the warning?

May be make it reported only once, so that the message is still there
in the log, but it's not spammed uselessly, adding no new information?

-uwe


re: Removing a superfluous warning from xf86-input-ws/dist/src/ws.c

2024-02-04 Thread matthew green
> if (hscroll || vscroll) {
> xf86Msg(X_WARNING, "%s: hscroll=%d, vscroll=%d\n",
> pInfo->name, hscroll, vscroll);
[ ... ]

> This touchpad method is not supported by the xf86-input-mouse driver so
> with that one the touchpad doesn't scroll.
>
> Shall I just remove the warning?

perhaps convert into a DBG(4, ...)?

it certainly shouldn't be generated log flood so downgrade or
removal is the right answer.

thanks.


.mrg.


Removing a superfluous warning from xf86-input-ws/dist/src/ws.c

2024-02-04 Thread Rhialto
In xsrc/external/mit/xf86-input-ws/dist/src/ws.c there is this fragment:

#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
if (hscroll || vscroll) {
xf86Msg(X_WARNING, "%s: hscroll=%d, vscroll=%d\n",
pInfo->name, hscroll, vscroll);
valuator_mask_zero(priv->scroll_mask);
valuator_mask_set_double(priv->scroll_mask,
HSCROLL_AXIS, (double) hscroll);
valuator_mask_set_double(priv->scroll_mask,
VSCROLL_AXIS, (double) vscroll);
xf86PostMotionEventM(pInfo->dev, FALSE, 
priv->scroll_mask);
}
#endif

and it prints this warning every time I scroll using the touchpad on my
ThinkPad. Apparently it is a "new" way for touchpads to report scrolling
(both horizontal and vertica).

These messages are filling up my /var/log/Xorg.0.log and wearing out my
NVMe unnecesarily.

This touchpad method is not supported by the xf86-input-mouse driver so
with that one the touchpad doesn't scroll.

Shall I just remove the warning?

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature