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

📄 imwheel3.patch

📁 gpm-1.20.0.tar.gz
💻 PATCH
📖 第 1 页 / 共 4 页
字号:
    if (opt_special && event->type & GPM_DOWN)       return processSpecial(event);  !   return (!wheel_fakeup);  }    /*-------------------------------------------------------------------*/****************** 925,931 ****  {    int ctlfd, newfd;    struct sockaddr_un ctladdr;!   int i, len, kd_mode, fd;    struct   timeval timeout;    int maxfd=-1;    int pending;--- 972,978 ----  {    int ctlfd, newfd;    struct sockaddr_un ctladdr;!   int i, len, kd_mode, fd, j;    struct   timeval timeout;    int maxfd=-1;    int pending;****************** 1087,1093 ****      if (ioctl(fd, KDGETMODE, &kd_mode)<0)        oops("ioctl(KDGETMODE)");      close(fd);!     if (kd_mode != KD_TEXT && !opt_repeater)        {        wait_text(&mouse_table[1].fd);        maxfd=max(maxfd,mouse_table[1].fd);--- 1134,1140 ----      if (ioctl(fd, KDGETMODE, &kd_mode)<0)        oops("ioctl(KDGETMODE)");      close(fd);!     if (kd_mode != KD_TEXT && !opt_repeater && !opt_wheel_repeater)        {        wait_text(&mouse_table[1].fd);        maxfd=max(maxfd,mouse_table[1].fd);****************** 1107,1123 ****        which_mouse=mouse_table+i; /* used to access options */        if (FD_ISSET(which_mouse->fd,&selSet))  	  {  	  FD_CLR(which_mouse->fd,&selSet); pending--;! 	  if (processMouse(which_mouse->fd, &event, m_type, kd_mode))! 	    /*! 	     * pass it to the client, if any! 	     * or to the default handler, if any! 	     * or to the selection handler! 	     */ /* FIXME -- check event.vc */! 	    (cinfo[event.vc] && do_client(cinfo[event.vc], &event))! 	       || (cinfo[0]        && do_client(cinfo[0],        &event))! 	       ||  do_selection(&event);! 	  }        }    /*....................................... got connection, process it */--- 1154,1191 ----        which_mouse=mouse_table+i; /* used to access options */        if (FD_ISSET(which_mouse->fd,&selSet))  	  {+           Gpm_Event eventbuf;+           int wheel_done;+   	  FD_CLR(which_mouse->fd,&selSet); pending--;!           wheel_done=0;!           do!             {! 	    if (processMouse(which_mouse->fd, &event, m_type, kd_mode))!               {!                 memcpy(&eventbuf,&event,sizeof(Gpm_Event));! 	      /*! 	       * pass it to the client, if any! 	       * or to the default handler, if any! 	       * or to the selection handler! 	       */ /* FIXME -- check event.vc */! 	      (cinfo[event.vc] && do_client(cinfo[event.vc], &event))! 	         || (cinfo[0]        && do_client(cinfo[0],        &event))! 	         ||  do_selection(&event);!                 memcpy(&event,&eventbuf,sizeof(Gpm_Event));! 	      }!             gpm_debug_log(LOG_DEBUG,"event.type=0x%x  event.buttons=%d\n", event.type, event.buttons);!             if(!wheel_done && opt_wheel &&!                (event.type&(GPM_DOWN|GPM_DRAG)) &&!                (event.buttons&(GPM_B_UP|GPM_B_DOWN)))!               {! !               gpm_debug_log(LOG_DEBUG,"Button Up!\n");!               wheel_done=1;!               eventFlag=1;!               }!             } while(eventFlag);!           }        }    /*....................................... got connection, process it */****************** 1197,1202 ****                    prgname, getpid(), prgname);    exit(0);  }! ! ! --- 1265,1269 ----                    prgname, getpid(), prgname);    exit(0);  }! /* vim:sw=2:ts=8! "*/diff -c gpm-cvstree.orig/gpm.h gpm-cvstree/gpm.h*** gpm-cvstree.orig/gpm.h	Thu Jan 27 23:19:29 2000--- gpm-cvstree/gpm.h	Mon Feb 14 18:28:31 2000****************** 4,9 ****--- 4,12 ----   * Copyright 1994,1995   rubini@linux.it (Alessandro Rubini)   * 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****************** 69,80 ****--- 72,87 ----    #define GPM_NODE_CTL      GPM_NODE_DEV  #define GPM_NODE_FIFO     _PATH_DEV	"gpmdata"+ #define GPM_WHEEL_FIFO    _PATH_DEV	"gpmwheel"    /*....................................... Cfg buttons */    #define GPM_B_LEFT      4  #define GPM_B_MIDDLE    2  #define GPM_B_RIGHT     1+ #define GPM_B_UP        8+ #define GPM_B_DOWN      16+     /*....................................... The event types */  diff -c gpm-cvstree.orig/gpmCfg.h gpm-cvstree/gpmCfg.h*** gpm-cvstree.orig/gpmCfg.h	Tue Jan 18 06:10:30 2000--- gpm-cvstree/gpmCfg.h	Mon Feb 14 18:28:31 2000****************** 4,9 ****--- 4,12 ----   * Copyright 1994-1996   rubini@linux.it   * Copyright (C) 1998 	Ian Zimmerman <itz@rahul.net>   *+  * Modified 9/8/1998 by Jonathan Atkins for wheel support+  *                      <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, ordiff -c gpm-cvstree.orig/gpmInt.h gpm-cvstree/gpmInt.h*** gpm-cvstree.orig/gpmInt.h	Tue Jan  4 18:11:25 2000--- gpm-cvstree/gpmInt.h	Mon Feb 14 18:32:35 2000****************** 4,9 ****--- 4,12 ----   * 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****************** 64,69 ****--- 67,73 ----    int howmany;            /* howmany bytes to read at a time */    int getextra;           /* does it get an extra byte? (only mouseman) */    int absolute;           /* flag indicating absolute pointing device */+   int wheel;              /* flag for wheel mice */      int (*repeat_fun)(Gpm_Event *state, int fd); /* repeat this event into fd */                            /* itz Mon Jan 11 23:27:54 PST 1999 */****************** 87,92 ****--- 91,97 ----    char *opt_type, *opt_dev, *opt_sequence;    int opt_baud,opt_sample,opt_delta, opt_accel, opt_scale, opt_scaley;    int opt_time, opt_cluster, opt_three, opt_glidepoint_tap;+   int opt_wheel;    char *opt_options; /* extra textual configuration */    Gpm_Type *m_type;    int fd;****************** 109,114 ****--- 114,120 ----  #define opt_time     (which_mouse->opt_time)  #define opt_cluster  (which_mouse->opt_cluster)  #define opt_three    (which_mouse->opt_three)+ #define opt_wheel    (which_mouse->opt_wheel)  #define opt_glidepoint_tap (which_mouse->opt_glidepoint_tap)  #define opt_options  (which_mouse->opt_options)  ****************** 121,134 ****  extern char *opt_lut;  extern int opt_test, opt_ptrdrag;  extern int opt_kill;! extern int opt_repeater, opt_double;  extern char* opt_repeater_type;  extern int opt_kernel, opt_explicittype;  extern int opt_aged;  extern time_t opt_age_limit;  extern char *opt_special;  extern int opt_rawrep;! extern int fifofd;  extern char *consolename; /* the selected one */    extern Gpm_Type *repeated_type;--- 127,141 ----  extern char *opt_lut;  extern int opt_test, opt_ptrdrag;  extern int opt_kill;! extern int opt_repeater, opt_wheel_repeater, opt_double;! extern int opt_wheel_swap;  extern char* opt_repeater_type;  extern int opt_kernel, opt_explicittype;  extern int opt_aged;  extern time_t opt_age_limit;  extern char *opt_special;  extern int opt_rawrep;! extern int fifofd, wheel_fifofd;  extern char *consolename; /* the selected one */    extern Gpm_Type *repeated_type;diff -c gpm-cvstree.orig/gpn.c gpm-cvstree/gpn.c*** gpm-cvstree.orig/gpn.c	Fri Jan 14 01:11:05 2000--- gpm-cvstree/gpn.c	Mon Feb 14 18:28:31 2000****************** 8,13 ****--- 8,16 ----   * Tue,  5 Jan 1999 23:26:10 +0000, modified by James Troup <james@nocrew.org>   * (usage): typo (s/an unexistent/a non-existent/)   *+  * 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****************** 187,192 ****--- 190,196 ----           "    -A [limit]       start with selection disabled (`aged')\n"           "    -b baud-rate     sets the baud rate (default %d)\n"           "    -B sequence      allows changing the buttons (default '%s')\n"+          "       wheel         Swap direction of wheel rotation\n"           "    -d delta         sets the delta value (default %d) (must be 2 or more)\n"           "    -D	       debug mode: don't auto-background\n"           "    -g tap-button    sets the button (1-3) that is emulated by tapping on\n"****************** 210,216 ****           "                     Use a non-existent type (e.g. \"help\") to get a list\n"           "    -T               test: read mouse, no clients\n"           "    -v               print version and exit\n"!          "    -V verbosity     increase number of logged messages\n",            DEF_ACCEL, DEF_BAUD, DEF_SEQUENCE, DEF_DELTA, DEF_TIME, DEF_LUT,           DEF_SCALE, DEF_SAMPLE, DEF_TYPE);    return 1;--- 214,222 ----           "                     Use a non-existent type (e.g. \"help\") to get a list\n"           "    -T               test: read mouse, no clients\n"           "    -v               print version and exit\n"!          "    -V verbosity     increase number of logged messages\n"!          "    -w               activate wheel\n"!          "    -W               activate wheel repeater\n",           DEF_ACCEL, DEF_BAUD, DEF_SEQUENCE, DEF_DELTA, DEF_TIME, DEF_LUT,           DEF_SCALE, DEF_SAMPLE, DEF_TYPE);    return 1;****************** 319,325 ****  int   cmdline(int argc, char **argv)  {!   char options[]="a:A::b:B:d:Dg:hi:kl:m:Mo:pqr:R::s:S:t:TvV::23";    int i, opt;    static struct {char *in; char *out;} seq[] = {      {"123","01234567"},--- 325,331 ----  int   cmdline(int argc, char **argv)  {!   char options[]="a:A::b:B:d:Dg:hi:kl:m:Mo:pqr:R::s:S:t:TvVwW::23";    int i, opt;    static struct {char *in; char *out;} seq[] = {      {"123","01234567"},****************** 349,355 ****            if (optarg) opt_age_limit = atoi(optarg);            break;          case 'b': opt_baud = atoi(optarg); break;!         case 'B': opt_sequence = optarg; break;          case 'd': opt_delta = atoi(optarg); break;          case 'D': gpm_log_daemon = 0; break;          case 'g':--- 355,367 ----            if (optarg) opt_age_limit = atoi(optarg);

⌨️ 快捷键说明

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