⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imwheel3.patch

📁 gpm-1.20.0.tar.gz
💻 PATCH
📖 第 1 页 / 共 4 页
字号:
Common subdirectories: gpm-cvstree.orig/CVS and gpm-cvstree/CVSdiff -c gpm-cvstree.orig/Makefile.in gpm-cvstree/Makefile.in*** gpm-cvstree.orig/Makefile.in	Fri Jan 21 00:10:00 2000--- gpm-cvstree/Makefile.in	Mon Feb 14 18:28:31 2000****************** 142,148 ****  	for i in mev gpm-root; do \  		$(INSTALL_PROGRAM) $$i $(bindir)/$$i ;\  	done! 	$(INSTALL_PROGRAM) -o root -m 4755 disable-paste $(bindir)/disable-paste  	# POSIX requires the range of a for loop be nonempty and Bash  	# 2.x goes along; unfortunately that means an additional  	# headache in cases like this--- 142,148 ----  	for i in mev gpm-root; do \  		$(INSTALL_PROGRAM) $$i $(bindir)/$$i ;\  	done! 	$(INSTALL_PROGRAM)  disable-paste $(bindir)/disable-paste  	# POSIX requires the range of a for loop be nonempty and Bash  	# 2.x goes along; unfortunately that means an additional  	# headache in cases like thisdiff -c gpm-cvstree.orig/config.h.in gpm-cvstree/config.h.in*** gpm-cvstree.orig/config.h.in	Thu Jan 27 23:19:29 2000--- gpm-cvstree/config.h.in	Mon Feb 14 18:40:49 2000****************** 1,6 ****  /* config.h.in.  Generated automatically from configure.in by autoheader.  */  /* Copyright (C) 1998 Ian Zimmerman <itz@transbay.net> */! /* $Id: config.h.in,v 1.5 2000/01/27 22:09:00 rubini Exp $ */      /* Define if using alloca.c.  */--- 1,6 ----  /* config.h.in.  Generated automatically from configure.in by autoheader.  */  /* Copyright (C) 1998 Ian Zimmerman <itz@transbay.net> */! /* $Id: acconfig.h,v 1.1.1.1 1999/09/14 15:29:41 paci Exp $ */      /* Define if using alloca.c.  */****************** 53,66 ****  /* Define if you have the <linux/tty.h> header file.  */  #undef HAVE_LINUX_TTY_H  - /* Define if you have the <ncurses.h> header file.  */- #undef HAVE_NCURSES_H-   /* Define if you have the <ncurses/curses.h> header file.  */  #undef HAVE_NCURSES_CURSES_H  ! /* Define if you have the <sys/sysmacros.h> header file.  */! #undef HAVE_SYS_SYSMACROS_H    /* Define if you have the <syslog.h> header file.  */  #undef HAVE_SYSLOG_H--- 53,66 ----  /* Define if you have the <linux/tty.h> header file.  */  #undef HAVE_LINUX_TTY_H    /* Define if you have the <ncurses/curses.h> header file.  */  #undef HAVE_NCURSES_CURSES_H  ! /* Define if you have the <ncurses.h> header file.  */! #undef HAVE_NCURSES_H    /* Define if you have the <syslog.h> header file.  */  #undef HAVE_SYSLOG_H+ + /* Define if you have the <sys/sysmacros.h> header file.  */+ #undef HAVE_SYS_SYSMACROS_HCommon subdirectories: gpm-cvstree.orig/doc and gpm-cvstree/docOnly in gpm-cvstree: gpm-root.cdiff -c gpm-cvstree.orig/gpm.c gpm-cvstree/gpm.c*** gpm-cvstree.orig/gpm.c	Mon Feb  7 12:40:11 2000--- gpm-cvstree/gpm.c	Mon Feb 14 18:43:01 2000****************** 5,10 ****--- 5,13 ----   * Copyright (C) 1994-1999   Alessandro Rubini <rubini@linux.it>   * Copyright (C) 1998 	     Ian Zimmerman <itz@rahul.net>   *+  * Modified on 9/8/1998 by Jonathan Atkins for use with wheel mice+  *                         <jcatki@most.fw.hac.com>+  *   *   This program is free software; you can redistribute it and/or modify   *   it under the terms of the GNU General Public License as published by   *   the Free Software Foundation; either version 2 of the License, or****************** 62,68 ****    DEF_BAUD, DEF_SAMPLE, DEF_DELTA, DEF_ACCEL, DEF_SCALE, 0 /* scaley */,    DEF_TIME, DEF_CLUSTER, DEF_THREE, DEF_GLIDEPOINT_TAP,    (char *)NULL /* extra */,!   (Gpm_Type *)NULL    },  };  struct mouse_features *which_mouse;--- 65,71 ----    DEF_BAUD, DEF_SAMPLE, DEF_DELTA, DEF_ACCEL, DEF_SCALE, 0 /* scaley */,    DEF_TIME, DEF_CLUSTER, DEF_THREE, DEF_GLIDEPOINT_TAP,    (char *)NULL /* extra */,!   (int)(Gpm_Type *)NULL    },  };  struct mouse_features *which_mouse;****************** 74,80 ****  int opt_test=DEF_TEST;  int opt_ptrdrag=DEF_PTRDRAG;  int opt_kill=0;! int opt_repeater=0, opt_double=0;  char* opt_repeater_type = 0;  int opt_aged = 0;  char *opt_special=NULL; /* special commands, like reboot or such */--- 77,84 ----  int opt_test=DEF_TEST;  int opt_ptrdrag=DEF_PTRDRAG;  int opt_kill=0;! int opt_repeater=0, opt_wheel_repeater=0, opt_double=0;! int opt_wheel_swap=0;  char* opt_repeater_type = 0;  int opt_aged = 0;  char *opt_special=NULL; /* special commands, like reboot or such */****************** 86,92 ****  char *prgname;  struct winsize win;  int maxx, maxy;! int fifofd=-1;    int eventFlag=0;  Gpm_Cinfo *cinfo[MAX_VC+1];--- 90,96 ----  char *prgname;  struct winsize win;  int maxx, maxy;! int fifofd=-1, wheel_fifofd=-1;    int eventFlag=0;  Gpm_Cinfo *cinfo[MAX_VC+1];****************** 403,408 ****--- 407,413 ----    fd_set fdSet;    static int newB=0, oldB=0, oldT=0; /* old buttons and Type to chain events */    /* static int buttonlock, buttonlockflag; */+   static int wheel_fakeup;    #define GET_TIME(tv) (gettimeofday(&tv, (struct timezone *)NULL))  #define DIF_TIME(t1,t2) ((t2.tv_sec -t1.tv_sec) *1000+ \****************** 410,415 ****--- 415,421 ----        oldT=event->type;+   wheel_fakeup=0;      if (eventFlag)      {****************** 422,428 ****        }      event->dx=nEvent.dx;      event->dy=nEvent.dy;!     event->buttons=nEvent.buttons;      }    else      {--- 428,442 ----        }      event->dx=nEvent.dx;      event->dy=nEvent.dy;!     if(opt_wheel && nEvent.buttons&(GPM_B_UP|GPM_B_DOWN))!       {!       event->buttons=nEvent.buttons&7;!       oldB=newB; newB=event->buttons;!       event->type=GPM_UP;!       wheel_fakeup=1;!       }!     else!       event->buttons=nEvent.buttons;      }    else      {****************** 443,449 ****        event->modifiers = nEvent.modifiers; /* propagate modifiers */          /* propagate buttons */!       nEvent.buttons = opt_sequence[nEvent.buttons]&7; /* change the order */        oldB=newB; newB=nEvent.buttons;        if (!i) event->buttons=nEvent.buttons;  --- 457,465 ----        event->modifiers = nEvent.modifiers; /* propagate modifiers */          /* propagate buttons */!          gpm_debug_log(LOG_DEBUG,"nEvent.buttons=%d  opt_sequence=%d  opt_wheel=%d\n",nEvent.buttons,opt_sequence[nEvent.buttons&7]&7,opt_wheel);!       nEvent.buttons = (opt_sequence[nEvent.buttons&7]&7)|!                  (opt_wheel?((nEvent.buttons&GPM_B_UP)|(nEvent.buttons&GPM_B_DOWN)):0);        oldB=newB; newB=nEvent.buttons;        if (!i) event->buttons=nEvent.buttons;  ****************** 476,484 ****--- 492,527 ----            } /* eventFlag */  +     if(!wheel_fakeup)+       {  /*....................................... update the button number */      if ((event->buttons&GPM_B_MIDDLE) && !opt_three) opt_three++;+   if ((event->buttons&GPM_B_UP || event->buttons&GPM_B_DOWN) && !opt_wheel)+          opt_wheel++;+   if (opt_wheel && event->buttons&(GPM_B_UP|GPM_B_DOWN))+          gpm_debug_log(LOG_DEBUG,"Wheel - %s%s\n",(event->buttons&GPM_B_UP?"Up ":""),+              (event->buttons&GPM_B_DOWN?"Down":""));+ + + /* .................................... repeat wheel to special fifo */+ +   if(wheel_fifofd+      && (event->buttons&(GPM_B_DOWN|GPM_B_UP))+      && event->buttons>oldB) /* button down, not up! (not the wheel motion) */+     {+     unsigned char buffer[1];+ +     event->type=GPM_DOWN;+     if(event->buttons&GPM_B_DOWN)+      /* button 5 is down */+      if (!opt_wheel_swap) { buffer[0]=5; } else { buffer[0]=4; }+     else+      /* button 4 is down */+      if (!opt_wheel_swap) { buffer[0]=4; } else { buffer[0]=5; }+     /* LOG(("repeat wheel: %s\n",buffer)); */+     write(wheel_fifofd,buffer,1);+     }    /*....................................... we're a repeater, aren't we? */  ****************** 499,504 ****--- 542,550 ----  	     event->y=nEvent.y;            }          repeated_type->repeat_fun(event, fifofd); /* itz Mon Jan 11 23:39:44 PST 1999 */+         /* From original patch+         buffer[0]=((event->buttons&7) ^ 0x07) | 0x80;+         */        }      return 0; /* no events nor information for clients */      }****************** 559,571 ****      event->type = (event->buttons ? GPM_DRAG : GPM_MOVE);    else      event->type = (event->buttons > oldB ? GPM_DOWN : GPM_UP);      switch(event->type)                    /* now provide the cooked bits */      {      case GPM_DOWN:        GET_TIME(tv2);!       if (tv1.tv_sec && (DIF_TIME(tv1,tv2)<opt_time)) /* check first click */! 	statusC++, statusC%=3; /* 0, 1 or 2 */        else statusC=0;        event->type|=(GPM_SINGLE<<statusC);      break;--- 605,618 ----      event->type = (event->buttons ? GPM_DRAG : GPM_MOVE);    else      event->type = (event->buttons > oldB ? GPM_DOWN : GPM_UP);+   }      switch(event->type)                    /* now provide the cooked bits */      {      case GPM_DOWN:        GET_TIME(tv2);!       if ((!opt_wheel || (event->buttons&7)) && tv1.tv_sec && (DIF_TIME(tv1,tv2)<opt_time)) /* check first click */!         statusC++, statusC%=3; /* 0, 1 or 2 */        else statusC=0;        event->type|=(GPM_SINGLE<<statusC);      break;****************** 573,579 ****      case GPM_UP:        GET_TIME(tv1);        event->buttons^=oldB; /* for button-up, tell which one */!       event->type|= (oldT&GPM_MFLAG);        event->type|=(GPM_SINGLE<<statusC);        break;  --- 620,626 ----      case GPM_UP:        GET_TIME(tv1);        event->buttons^=oldB; /* for button-up, tell which one */!       event->type|=(oldT&GPM_MFLAG);        event->type|=(GPM_SINGLE<<statusC);        break;  ****************** 625,631 ****    if (opt_special && event->type & GPM_DOWN)       return processSpecial(event);  !   return 1;  }    /*-------------------------------------------------------------------*/--- 672,678 ----

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -