wmbutton: Middle button enabled by default

The mouse middle button should be enabled by default (see the help
and the manpage). This patch solves this bug.

The MIDMOUSE definition is removed because the value of MIDMOUSE
changes the middle button behaviour. Now, the middle button always works,
except if the user uses the -m argument.

Now the manpage and the help show the same info.
This commit is contained in:
Rodolfo García Peñas (kix) 2012-08-21 20:38:48 +02:00 committed by Carlos R. Mafra
parent 991c54732d
commit cc68392ccb
3 changed files with 2 additions and 7 deletions

View file

@ -116,11 +116,7 @@ void show_usage() {
fprintf(stderr,"-F <font> Custom tooltip font (e.g. -b\\&h-lucidatypewriter-medium-*-*-*-12-*)\n");
fprintf(stderr,"-v Verbose Mode.\n");
fprintf(stderr,"-h Help. This message.\n");
#if MIDMOUSE
fprintf(stderr,"-m Disable Middle Mouse functionality.\n");
#else
fprintf(stderr,"-m Enable Middle Mouse functionality.\n");
#endif
fprintf(stderr,"-s Swap tooltip colors.\n");
fprintf(stderr,"-n Turn off tooltips.\n");
fprintf(stderr,"\n");

View file

@ -296,7 +296,7 @@ int main(int argc, char **argv)
break;
case Button2:
if (Config.mmouse) {
if (!Config.mmouse) {
N = whichButton(report.xbutton.x, report.xbutton.y);
if ((N >= 0) && (N <= NUMB_OF_APPS)) {
button_pressed = N + MMASK;
@ -339,7 +339,7 @@ int main(int argc, char **argv)
break;
case Button2:
if (Config.mmouse) {
if (!Config.mmouse) {
N = whichButton(report.xbutton.x, report.xbutton.y);
if ((N >= 0) && (N <= NUMB_OF_APPS) && (N == button_pressed))
RunAppN(N + MMASK);

View file

@ -36,7 +36,6 @@
/****** Define Other Options ****************************************/
#define VERB 0 /* Enable=1, Disable=0: Debugging (verbose) Mode*/
#define MIDMOUSE 1 /* Define Middle Mouse functionality */
#define LMASK 0 /* left button mask: run app # mask + button #*/
#define MMASK 10 /* middle button mask: run app # mask + button #*/
#define RMASK 20 /* right button mask: run app # mask + button #*/