xmodmap patch for changing less buttons
Matthias Hopf
mhopf at suse.de
Mon Mar 20 09:08:43 PST 2006
Hi,
I'll commit the following patch shortly if nobody objects; it allows for
modifying only a small number of buttons, even if more buttons are
defined by a button mapping.
The only question is: Should the user get a warning message (like it is
done right now), or only a short notice (currently it is three lines),
or should we be quiet?
Matthias
--
Matthias Hopf <mhopf at suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat at mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ labs www.mshopf.de
-------------- next part --------------
? xmodmap.1x
Index: handle.c
===================================================================
RCS file: /cvs/xorg/app/xmodmap/handle.c,v
retrieving revision 1.3
diff -u -p -b -r1.3 handle.c
--- handle.c 30 Oct 2004 20:33:44 -0000 1.3
+++ handle.c 20 Mar 2006 17:08:22 -0000
@@ -906,10 +906,12 @@ do_pointer(char *line, int len)
}
if (i > 0 && i != nbuttons) {
- badheader ();
- fprintf (stderr, "number of buttons, must have %d instead of %d\n",
- nbuttons, i);
- return;
+ fprintf (stderr, "Warning: Wrong number of buttons given "
+ "(should be %d instead of %d).\n", nbuttons, i);
+ fprintf (stderr, "Warning: Only setting the first %d buttons.\n", i);
+ fprintf (stderr, "Warning: Using the old values for the remaining"
+ " buttons.\n");
+ i = nbuttons;
}
uop = AllocStruct (union op);
More information about the xorg
mailing list